Browse Source

修改评价按扭

master
unknown 5 months ago
parent
commit
4893e338b6
  1. 2
      config/api.js
  2. 2
      config/request.js
  3. 21
      pages/tabbar/learnCar/comp/subject2.vue
  4. 1
      pages/tabbar/learnCar/comp/subject3.vue

2
config/api.js

@ -25,7 +25,7 @@ export const addSchoolComment = (data={}) => http.post('business/appcomplain/add
// 创建教练评价
export const addCoachComment = (data={}) => http.post('business/appcomplain/addCoachComment', data,)
// 我的评价
export const getUsersCommentById = (params) => http.get('business/appcomplain/getUsersById', {params: params})
export const getUsersCommentById = (data) => http.post('business/appcomplain/getUsersById', data)
// 获得学员档案记录
export const getStudentinfo = () => http.get('app/student-record/get', )
// 驾校评论分页

2
config/request.js

@ -27,14 +27,12 @@ module.exports = (vm) => {
// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
config.data = config.data || {}
// 根据custom参数中配置的是否需要token,添加对应的请求头
console.log('--------------')
config.data['timestamp'] = Date.now()
let jsonString = JSON.stringify(config.data)
let strSecretKey = jsonString + secretKey
let hash = md5(strSecretKey)
config.header['Signature'] = hash
config.data = jsonString
console.log(config.data)
let token = vm.$store.state.user.vuex_loginInfo.accessToken
if(token) {
config.header.Authorization = 'Bearer ' + token

21
pages/tabbar/learnCar/comp/subject2.vue

@ -4,7 +4,7 @@
<!-- 学习状态 -->
<view class="learnStatus">
<!-- v-if="vuex_userInfo.trainProcess" -->
<view class="card mt20" >
<view class="card mt20" v-if="vuex_userInfo.trainProcess">
<view class="flex-b">
<view class="lab">实操预约</view>
<view class="link-arrow"
@ -16,6 +16,19 @@
</view>
</view>
<view class="h1"><text class="active">学习状态</text></view>
<!-- 评价 -->
<view class="card mb20" v-if="info.studentExamVO&&info.studentExamVO.canComment" style="margin: 20rpx 0;">
<view class="flex-b">
<view class="lab">学员评价</view>
<view class="link-arrow"
@click.stop="$goPage('/pages/carEntry/evaluate/evaluate?subject=2&coachType=1')">
<view class="txt">去评价</view>
<u-icon name="arrow-right" color="#3776FF" :size="16"></u-icon>
</view>
<!-- <view class="btn" @click.stop="$goPage('/pages/carEntry/evaluate/evaluate?subject=2&coachType=1')">去学习</view> -->
</view>
</view>
<!-- 考试结果 -->
<view class="exam" v-if="showExam">
<view class="card" v-if="info.studentExamVO.pass">
@ -25,12 +38,12 @@
{{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }}
</view>
</view>
<view class="flex-b bg">
<!-- <view class="flex-b bg">
<view class="row">
<view class="text">考试成绩{{ info.studentExamVO.examResult }}</view>
<view class="btn" @click="$goPage('/pages/carEntry/evaluate/evaluate?subject=2&coachType=1')" v-if="!info.studentExamVO.canComment">去评价</view>
</view>
</view>
</view> -->
</view>
<view class="card" v-else>
@ -163,9 +176,11 @@
if (studentExamVO.pass) {
//
this.changeStep('showExam')
//
} else if (res.studentClassHourVO.classHourReachStatus) {
//
let ExamVOTime = studentExamVO.examTime
//
let ExamReservationVOTime = examReservationVO.examTime
//
if (!ExamVOTime && !ExamReservationVOTime) this.changeStep('showAppointmentExam')

1
pages/tabbar/learnCar/comp/subject3.vue

@ -3,6 +3,7 @@
<!-- 学习状态 -->
<view class="learnStatus">
<!-- v-if="vuex_userInfo.trainProcess" -->
<view class="card mt20" v-if="vuex_userInfo.trainProcess">
<view class="flex-b" >
<view class="lab">实操预约</view>

Loading…
Cancel
Save