Browse Source

更新

master
unknown 1 year ago
parent
commit
d3be083633
  1. 1
      common/js/mixins.js
  2. 5
      components/user-info/user-info.vue
  3. 6
      config/api.js
  4. 4
      manifest.json
  5. 14
      pages/tabbar/student/index.vue
  6. 25
      pages/userCenter/forgetPwd/forgetPwd.vue
  7. 3
      pages/userCenter/myCar/myCar.vue
  8. 6
      pages/userCenter/personaInfo/personaInfo.vue
  9. 1
      pages/userCenter/schoolCoach/schoolCoach.vue
  10. 1
      pages/userCenter/schoolSite/schoolSite.vue
  11. 9
      pages/userCenter/studentComment/studentComment.vue

1
common/js/mixins.js

@ -9,6 +9,7 @@ export default {
vuex_userInfo: state=>state.user.vuex_userInfo,
vuex_deptId: state=>state.user.vuex_userInfo.user.deptId,
vuex_coachId: state=>state.user.vuex_userInfo.user.coachId,
vuex_schoolId: state=>state.user.vuex_userInfo.user.schoolId,
vuex_loginInfo: state=>state.user.vuex_loginInfo,
}),

5
components/user-info/user-info.vue

@ -5,7 +5,7 @@
</view>
<view class="info" @click="$goPage('/pages/userCenter/personaInfo/personaInfo')">
<view class="name_row">
<view class="name">{{ vuex_userInfo.user.nickname}}</view>
<view class="name oneRowText">{{ vuex_userInfo.user.nickname}}</view>
<view class="icon">
<image src="@/static/images/coach/ic_gengduo.png" mode=""></image>
</view>
@ -48,6 +48,7 @@
.name {
font-size: 48rpx;
font-weight: 500;
width: 300rpx;
}
.icon {
@ -72,8 +73,8 @@
}
.tag {
width: 112rpx;
height: 44rpx;
padding: 0 10rpx;
background: rgba(25, 137, 250, 0.1);
border-radius: 22rpx;
font-size: 20rpx;

6
config/api.js

@ -60,6 +60,12 @@ export const coachDetail = (params) => http.get('business/coach/get', {params})
export const coachCommentPage = (params) => http.get('app/coach-comment/page', {params})
// 获得驾校评价
export const schoolCommentPage = (params) => http.get('business/school-comment/page', {params})
// 修改用户密码
export const updatePassword = (data) => http.put('system/user/profile/update-password', data)
// 获得考场分页
// export const sitePage = (data) => http.get('business/site/page', data)

4
manifest.json

@ -50,7 +50,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx2d71605af3b620e6",
"appid" : "wxae509f512c11c039",
"setting" : {
"urlCheck" : false,
"es6" : true,
@ -82,7 +82,7 @@
"disableHostCheck" : true,
"proxy" : {
"/api" : {
"target" : "http://192.168.1.36:48080/",
"target" : "http://192.168.1.39:48080/",
"changeOrigin" : true,
"secure" : true,
"pathRewrite" : {

14
pages/tabbar/student/index.vue

@ -30,7 +30,7 @@
</view>
</view> -->
<view class="searchBox" v-if="identity=='校长'">
<searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
<searchRow placeholder="搜索学员姓名、学员手机号" @searchFn="searchFn"></searchRow>
</view>
<topUserInfo v-if="identity=='实操教练'"/>
@ -128,7 +128,7 @@
]
],
params: {
"pageNo": 1, "pageSize": 10, status: 1, trainType: ''
"pageNo": 1, "pageSize": 10, status: 1, name: ''
},
total: 20,
list: []
@ -138,9 +138,14 @@
uni.hideTabBar();
},
onLoad() {
this.params.schoolId = this.vuex_schoolId
this.studentRecordPageFn()
},
methods: {
searchFn(val) {
this.params.name = val
this.listInit()
},
confirmDatePicker(val) {
this.showDatePicker = false
@ -149,8 +154,9 @@
let startTimer = this.screen.timer + '00:00:00'
let endTimer = this.screen.timer+ '23:59:59'
console.log(endTimer)
this.params.applyDate = [startTimer, endTimer]
// this.params['applyDate[0]'] = encodeURI(startTimer)
// this.params.applyDate = [startTimer, endTimer]
this.params.startTime = startTimer
this.params.endTime = endTimer
// this.params['applyDate[1]'] = encodeURI(endTimer)
this.listInit()
},

25
pages/userCenter/forgetPwd/forgetPwd.vue

@ -26,12 +26,13 @@
</view>
</view>
<view class="btnBg" :class="{hui: !highlight}">确认修改</view>
<view class="btnBg" :class="{hui: !highlight}" @click="updatePasswordFn">确认修改</view>
</view>
</view>
</template>
<script>
import { updatePassword } from '@/config/api.js'
export default {
data() {
return {
@ -51,6 +52,28 @@
return false
}
}
},
methods: {
async updatePasswordFn() {
let obj = {
newPassword: this.FormData.pwd1,
oldPassword: this.FormData.oldPwd
}
const res = await updatePassword(obj)
if(res.code==0) {
this.$u.toast('密码修改成功')
setTimeout(()=>{
uni.switchTab({
url: '/pages/tabbar/mine/index'
})
},1500)
this.FormData = {
oldPwd: '',
pwd1: '',
pwd2: '',
}
}
}
}
}
</script>

3
pages/userCenter/myCar/myCar.vue

@ -42,6 +42,9 @@
}
},
onLoad() {
this.params.schoolId = this.vuex_schoolId
this.params.coachId = this.vuex_coachId
this.carPageFn()
},
onPullDownRefresh() {

6
pages/userCenter/personaInfo/personaInfo.vue

@ -5,7 +5,7 @@
<view class="card">
<view class="row">
<view class="lab">手机号</view>
<view class="val">18267103167</view>
<view class="val"> {{ vuex_userInfo.user.phone}} </view>
</view>
</view>
@ -28,12 +28,12 @@
</view>
</view> -->
<view class="card">
<!-- <view class="card">
<view class="row">
<view class="lab">收款银行卡</view>
<view class="val">48372*****03928</view>
</view>
</view>
</view> -->
<view class="btnBox">
<view class="logout" @click="$goPage('/pages/login/login')">退出登录</view>

1
pages/userCenter/schoolCoach/schoolCoach.vue

@ -46,6 +46,7 @@
}
},
onLoad() {
this.params.schoolId = this.vuex_schoolId
this.coachPageFn()
},
onPullDownRefresh() {

1
pages/userCenter/schoolSite/schoolSite.vue

@ -48,6 +48,7 @@
}
},
onLoad() {
this.params.schoolId = this.vuex_schoolId
this.sitePageFn()
},
onPullDownRefresh() {

9
pages/userCenter/studentComment/studentComment.vue

@ -21,7 +21,7 @@
</template>
<script>
import { schoolCommentPage } from '@/config/api.js'
import { schoolCommentPage, coachCommentPage } from '@/config/api.js'
export default {
data() {
return {
@ -44,6 +44,7 @@
}
},
onLoad() {
this.params.schoolId = this.vuex_schoolId
this.schoolCommentPageFn()
},
onPullDownRefresh() {
@ -67,7 +68,11 @@
this.schoolCommentPageFn()
},
async schoolCommentPageFn() {
const {data: res} = await schoolCommentPage(this.params)
if(this.identity=='校长') {
var {data: res} = await schoolCommentPage(this.params)
}else {
var {data: res} = await coachCommentPage(this.params)
}
this.params.pageNo ++
let arr = res.list.map(item=>{
if(item.images) {

Loading…
Cancel
Save