Browse Source

学车动态添加有没有评论判断

master
unknown 6 months ago
parent
commit
e05c10156a
  1. 3
      config/request.js
  2. 6
      pages/indexEntry/enroll/registInfo/chooseCoach/chooseCoach.vue
  3. 2
      pages/tabbar/index/index.vue
  4. 4
      pages/tabbar/learnCar/comp/subject2.vue
  5. 4
      pages/tabbar/learnCar/comp/subject3.vue
  6. 4
      pages/tabbar/learnCar/comp/topInfo.vue
  7. 14
      pages/tabbar/learnCar/index.vue
  8. 32
      pages/userCenter/login/login.vue
  9. 23
      store/modules/user.js

3
config/request.js

@ -57,7 +57,8 @@ module.exports = (vm) => {
}
}
if(data.code==401) {
vm.$store.commit('goLogin')
vm.$store.commit('goLogin', true)
}
// 自定义参数

6
pages/indexEntry/enroll/registInfo/chooseCoach/chooseCoach.vue

@ -1,5 +1,5 @@
<template>
<view class="main">
<view class="pageBg">
<u-sticky>
<view class="searchBox">
<u-search placeholder="请输入教练姓名" v-model="params.name" :show-action="false" @search="searchFn"> </u-search>
@ -12,6 +12,7 @@
<view class="rigthT">{{item.mobile}}</view>
</view>
</view>
<nodata v-if="!list.length&&status=='nomore'"></nodata>
<u-loadmore :status="status" v-if="list.length>30" :icon-type="'flower'" />
</view>
</template>
@ -72,8 +73,7 @@
</script>
<style lang="scss" scoped>
.main {
background-color: #f8f8f8;
.pageBg {
.searchBox {
background-color: #fff;
padding: 16rpx 32rpx;

2
pages/tabbar/index/index.vue

@ -208,8 +208,6 @@
this.initApi()
},
onShow() {
// if(!this.vuex_cityInfo.lat) {
// this.$store.dispatch('getCity')
// }

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

@ -16,14 +16,14 @@
<view class="h1"><text class="active">学习状态</text></view>
<!-- 考试结果 -->
<view class="exam" v-if="showExam">
<view class="card" v-if="info.studentExamVO.examResult>89">
<view class="card" v-if="info.studentExamVO.pass">
<view class="flex-b padTb">
<view class="lab">科目二考试成绩已通过</view>
<view class="date">
{{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }}
</view>
</view>
<view class="flex-b bg">
<view class="flex-b bg" v-if="!info.studentExamVO.canComment">
<view class="row">
<view class="text">考试成绩{{ info.studentExamVO.examResult }}</view>
<view class="btn" @click="$goPage('/pages/carEntry/evaluate/evaluate?subject=2&coachType=1')">去评价</view>

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

@ -16,14 +16,14 @@
<view class="h1"><text class="active">学习状态</text></view>
<!-- 考试结果 -->
<view class="exam" v-if="showExam">
<view class="card" v-if="info.studentExamVO.examResult>89">
<view class="card" v-if="info.studentExamVO.pass">
<view class="flex-b padTb">
<view class="lab">科目三考试成绩已通过</view>
<view class="date">
{{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }}
</view>
</view>
<view class="flex-b bg">
<view class="flex-b bg" v-if="!info.studentExamVO.canComment">
<view class="row">
<view class="text">考试成绩{{ info.studentExamVO.examResult }}</view>
<view class="btn" @click="$goPage('/pages/carEntry/evaluate/evaluate?subject=3&coachType=1')">去评价</view>

4
pages/tabbar/learnCar/comp/topInfo.vue

@ -17,14 +17,14 @@
<view class="row">
<view class="timeItem">
<view class="flex">
<view class="time">{{dynamics.ValidTtime||0}}</view>
<view class="time">{{dynamics.validTime||0}}</view>
<view class="uni">分钟</view>
</view>
<view class="lab">已完成学时</view>
</view>
<view class="timeItem">
<view class="flex">
<view class="time">{{dynamics.TotalTime||0}}</view>
<view class="time">{{dynamics.classHour||0}}</view>
<view class="uni">分钟</view>
</view>
<view class="lab">应完成学时</view>

14
pages/tabbar/learnCar/index.vue

@ -4,7 +4,7 @@
<view class="" style="height: 100rpx;"></view>
<!-- <u-button @click="requestSingleFreshLocationFn">单次定位</u-button> -->
<!-- <u-button @click="getInitFaceVerifyFn">人脸核身</u-button> -->
<topInfo :carType="curObject.name" @changeSubject="changeSubject" :dynamics="dynamics"></topInfo>
<topInfo :carType="curObject.name" @changeSubject="changeSubject" :dynamics="subjectStatus.studentClassHourVO"></topInfo>
<subject1 v-if="curObject.id==1"></subject1>
<subject2 v-if="curObject.id==2" :subjectStatus="subjectStatus"></subject2>
<subject3 v-if="curObject.id==3" :subjectStatus="subjectStatus"></subject3>
@ -28,7 +28,9 @@
id: 2,
},
dynamics: {},
subjectStatus: {}
subjectStatus: {
studentClassHourVO: {}
}
}
},
onLoad() {
@ -40,14 +42,14 @@
},
onShow() {
this.getStudentSubject1StatusFn()
this.getStudentProcessFn()
// this.getStudentProcessFn()
},
methods: {
//
changeSubject(val) {
console.log(val)
this.curObject = val
this.getStudentProcessFn()
// this.getStudentProcessFn()
this.getStudentSubject1StatusFn()
},
@ -58,7 +60,8 @@
let arrFn = [getStudentSubject1Status, getStudentSubject2Status, getStudentSubject3Status, getStudentSubject4Status]
const {data: res} = await arrFn[this.curObject.id-1]({studentId: this.studentId})
this.subjectStatus = res
console.log(res)
// console.log(res)
console.log(this.subjectStatus.studentClassHourVO)
},
async getStudentProcessFn() {
const {data: res} = await getStudentProcess({studentId: this.studentId})
@ -77,7 +80,6 @@
obj.TotalTime = res.subjectFourTotalTime
}
this.dynamics = obj
console.log(this.dynamics)
}
}
}

32
pages/userCenter/login/login.vue

@ -5,7 +5,7 @@
<u-icon name="arrow-left" color="#333" size="28"></u-icon>
</view>
</view> -->
<u-navbar title=" " :bgColor="bgColor" :autoBack="true"></u-navbar>
<u-navbar title=" " :bgColor="bgColor" :autoBack="true" :leftIcon="autoBack"></u-navbar>
<view class="title">短信验证码登录</view>
<view class="form">
<view class="form-item">
@ -49,11 +49,15 @@
codeText: '获取验证码',
FormData: {},
codeOn: false,
bgColor: 'transparent'
bgColor: 'transparent',
autoBack:'arrow-left'
}
},
onLoad(options) {
this.isCheck = options.isCheck=='true'?true:false
// alert(options.autoBack)
if(options.autoBack) this.autoBack = ''
console.log(this.autoBack)
},
computed: {
isPhone() {
@ -81,7 +85,7 @@
scene: 1,
mobile: FormData.phone,
}).then(()=>{
var time = 30;
var time = 60;
this.codeText = time + "秒后重新发送"
var timer = setInterval(() => {
time--;
@ -107,16 +111,28 @@
}
const res = await loginSMS(obj)
this.$store.commit('update_vuex_loginInfo',res.data)
this.$store.dispatch('getUserInfo')
// this.$goPage('/pages/userCenter/login/face')
uni.switchTab({
url: '/pages/tabbar/index/index'
})
await this.$store.dispatch('getUserInfo')
let login_front = uni.getStorageSync('login_front')
if(login_front) {
let switchBar = ['/pages/tabbar/index/index', '/pages/tabbar/learnCar/index', '/pages/tabbar/mine/index']
if(switchBar.includes('login_front')) {
uni.switchTab({
url: login_front
})
}else {
this.$goPage(login_front)
}
}else {
uni.switchTab({
url: '/pages/tabbar/index/index'
})
}
}
}
}
</script>
<style lang="scss" scoped>
.main {

23
store/modules/user.js

@ -31,13 +31,28 @@ const user = {
update_apiOk(state, payload) {
state.apiOk = payload
},
goLogin(state) {
goLogin(state, type) {
uni.clearStorageSync()
state.vuex_loginInfo = {}
state.vuex_userInfo = {}
uni.navigateTo({
url: '/pages/userCenter/login/login'
})
const pages = getCurrentPages();
const page = pages[pages.length - 1].$page.fullPath; //完整路由地址
console.log(pages)
let url = '/pages/userCenter/login/login'
if(page!= url) {
console.log('当前页面')
console.log(type)
if(type) {
url = url+'?autoBack=yes'
// uni.redirectTo({
// url
// })
}
uni.navigateTo({
url
})
}
},
// 为非平台学员开一条路

Loading…
Cancel
Save