From fbdd6366e79fe50a8a45ac035d3e76d1ec77420d Mon Sep 17 00:00:00 2001 From: unknown <331404948@qq.com> Date: Wed, 13 Mar 2024 19:05:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=BE=E5=88=B0=E6=8E=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/utils.js | 7 +- config/api.js | 14 ++ config/request.js | 4 +- pages.json | 9 +- pages/carEntry/operaAppointment/comp/step1.vue | 1 + pages/carEntry/signature/signature.vue | 233 ++++++++++++++++++++++ pages/indexEntry/enroll/enroll.vue | 77 +++---- pages/indexEntry/enroll/registInfo/registInfo.vue | 2 +- pages/indexEntry/signIn/signAndOut/signAndOut.vue | 97 ++++++--- pages/mineEntry/myAppointment/myAppointment.vue | 5 +- pages/tabbar/index/index.vue | 19 +- pages/tabbar/learnCar/comp/subject2.vue | 7 + pages/tabbar/learnCar/comp/topInfo.vue | 21 ++ 13 files changed, 404 insertions(+), 92 deletions(-) create mode 100644 pages/carEntry/signature/signature.vue diff --git a/common/js/utils.js b/common/js/utils.js index ef9ad33..35dc5d2 100644 --- a/common/js/utils.js +++ b/common/js/utils.js @@ -123,7 +123,8 @@ const install = (Vue, vm) => { store.commit('goLogin') return } - store.commit('updateNonPlatformStudent', false) + return vm.$goPage('/pages/indexEntry/signIn/signAndOut/signAndOut') + // store.commit('updateNonPlatformStudent', false) if( vm.vuex_userInfo.applyStep<2) { vm.$goPage('/pages/indexEntry/enroll/enroll') } @@ -131,6 +132,10 @@ const install = (Vue, vm) => { if( vm.vuex_userInfo.applyStep&& vm.vuex_userInfo.applyStep<5) { return vm.$goPage('/pages/indexEntry/enroll/registInfo/registInfo') } + + if( vm.vuex_userInfo.applyStep>5) { + return vm.$goPage('/pages/indexEntry/signIn/signAndOut/signAndOut') + } } let isImagePath = (path)=> { diff --git a/config/api.js b/config/api.js index 6556ec0..716b089 100644 --- a/config/api.js +++ b/config/api.js @@ -196,6 +196,20 @@ export const getStudentSubject2Status = (data) => http.post('app/student-process export const getStudentSubject3Status = (data) => http.post('app/student-process/getStudentSubject3Status', data) // 获得科目四学习状态 export const getStudentSubject4Status = (data) => http.post('app/student-process/getStudentSubject4Status', data) +// 实操签到 +export const operationSigin = (params={}) => http.get('business/coach/sign/in', {params}) +// 学员签到信息校验接口 +export const vailStudentInfo = (params={}) => http.get('business/coach/sign/vailStudentInfo', {params}) +// 签退 +export const signOutAuth = (data) => http.post('business/student/sign/outAuth', data) + + + + + + + + diff --git a/config/request.js b/config/request.js index 55a484e..2ffb546 100644 --- a/config/request.js +++ b/config/request.js @@ -63,7 +63,9 @@ module.exports = (vm) => { // 自定义参数 const custom = response.config?.custom - if (data.code !== 0&&data.code!=406) { + if (data.code !== 0&&data.code!=406&&data.code!='200240213') { + console.log('不正常的code') + console.log(data) // 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示 if (custom.toast !== false) { uni.$u.toast(data.msg) diff --git a/pages.json b/pages.json index b30f40f..54da835 100644 --- a/pages.json +++ b/pages.json @@ -335,8 +335,15 @@ "enablePullDownRefresh": false, "backgroundTextStyle": "dark" } + }, + { + "path": "signature/signature", + "style": { + "navigationBarTitleText": "签名", + "enablePullDownRefresh": false, + "backgroundTextStyle": "dark" + } } - ] }, { diff --git a/pages/carEntry/operaAppointment/comp/step1.vue b/pages/carEntry/operaAppointment/comp/step1.vue index 95d9c5f..161636e 100644 --- a/pages/carEntry/operaAppointment/comp/step1.vue +++ b/pages/carEntry/operaAppointment/comp/step1.vue @@ -85,6 +85,7 @@ // padding: 32rpx; // width: 100%; // background: #F6F6F6; + margin-top: 20rpx; .btn_row { display: flex; align-items: center; diff --git a/pages/carEntry/signature/signature.vue b/pages/carEntry/signature/signature.vue new file mode 100644 index 0000000..9ba0692 --- /dev/null +++ b/pages/carEntry/signature/signature.vue @@ -0,0 +1,233 @@ + + + + diff --git a/pages/indexEntry/enroll/enroll.vue b/pages/indexEntry/enroll/enroll.vue index 6040bfe..98b1d12 100644 --- a/pages/indexEntry/enroll/enroll.vue +++ b/pages/indexEntry/enroll/enroll.vue @@ -139,32 +139,8 @@ this.form.typeName = item.label this.showType = false }, - async getpersonfaceFn() { - const {data: res} = await getpersonface({MerchantId: '0NSJ2312271333064407'}) - let obj = JSON.parse(res) - // this.link = obj.Url - // this.$store.commit('updateBizToken', obj.BizToken) - this.EidToken = obj.EidToken - return obj.EidToken - // #ifdef H5 - window.open(this.link, '_blank') - - // #endif - // var regex = /\[.*?\]/; - // alert(obj.BizToken) - // #ifdef MP-WEIXIN - this.$store.commit('updateWebVeiwUrl', this.link) - - uni.navigateTo({ - url: '/pages/indexEntry/enroll/realName/webView' - }) - // #endif - - console.log(obj) - }, + async goNext() { - this.getInitFaceVerifyFn() - return // if(!this.form.value) return this.$u.toast('请选择证件类型') // this.$goPage('/pages/indexEntry/enroll/signContract/signContract?schoolId='+this.vuex_userInfo.schoolId) // return @@ -174,41 +150,40 @@ // } // return this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo') // 去填表 - if(this.vuex_userInfo.applyStep==2) { - if(this.title=='学员信息') { - // 非平台学员 - return this.$goPage('/pages/indexEntry/NonPlatformStudentInfo/NonPlatformStudentInfo') - } - return this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo') - } + // if(this.vuex_userInfo.applyStep==2) { + // return this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo') + // } // 去支付 // if(this.vuex_userInfo.applyStep==4||this.vuex_userInfo.applyStep==5) { // return this.$goPage('/pages/indexEntry/enroll/payment/payment') // } - if(this.vuex_userInfo.applyStep>1&&this.vuex_userInfo.applyStep<5) { - return this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo') - } - // 不是身份证 - if(this.form.value!=1) { - for(let key in this.formToast) { - if(!this.form[key]) { - return this.$u.toast(this.formToast[key]) + // 去实名 + if(!this.vuex_userInfo.applyStep||this.vuex_userInfo.applyStep<2) { + // 不是身份证 + if(this.form.value!=1) { + for(let key in this.formToast) { + if(!this.form[key]) { + return this.$u.toast(this.formToast[key]) + } } + this.vuex_userInfo.address = this.form.address + this.vuex_userInfo.name = this.form.name + this.vuex_userInfo.sex = this.form.sex + this.vuex_userInfo.idcard = this.form.idcard + this.vuex_userInfo.nationality = (this.form.value==7||this.form.value==2)?'外国':'中国' + this.vuex_userInfo.cardType = this.form.value + return this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar') + }else { + this.getInitFaceVerifyFn() } - this.vuex_userInfo.address = this.form.address - this.vuex_userInfo.name = this.form.name - this.vuex_userInfo.sex = this.form.sex - this.vuex_userInfo.idcard = this.form.idcard - this.vuex_userInfo.nationality = (this.form.value==7||this.form.value==2)?'外国':'中国' - this.vuex_userInfo.cardType = this.form.value - return this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar') - } - // 去实名 - if(!this.vuex_userInfo.applyStep||this.vuex_userInfo.applyStep<2) { - this.getInitFaceVerifyFn() + // 去填表 + if(this.vuex_userInfo.applyStep>1&&this.vuex_userInfo.applyStep<5) { + return this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo') } + + // this.$goPage('/pages/indexEntry/enroll/signContract/signContract') // this.$goPage('/pages/indexEntry/enroll/uploadAvatar/uploadAvatar') }, diff --git a/pages/indexEntry/enroll/registInfo/registInfo.vue b/pages/indexEntry/enroll/registInfo/registInfo.vue index 4a0179e..2795d54 100644 --- a/pages/indexEntry/enroll/registInfo/registInfo.vue +++ b/pages/indexEntry/enroll/registInfo/registInfo.vue @@ -329,7 +329,7 @@ this.form.coachId = schoolCoach.id this.form.school = schoolCoach.schoolName this.form.schoolId = schoolCoach.schoolId - this.form.trainType = schoolCoach.teachCarType.slice(0,2) + if(schoolCoach.teachCarType) this.form.trainType = schoolCoach.teachCarType.slice(0,2) } if(this.form.schoolId) { this.getSchoolDetailFn() diff --git a/pages/indexEntry/signIn/signAndOut/signAndOut.vue b/pages/indexEntry/signIn/signAndOut/signAndOut.vue index d912dad..fa1e0a4 100644 --- a/pages/indexEntry/signIn/signAndOut/signAndOut.vue +++ b/pages/indexEntry/signIn/signAndOut/signAndOut.vue @@ -55,7 +55,7 @@ - 重新认证 + 重新认证 我知道了 @@ -64,7 +64,7 @@ @@ -200,10 +243,10 @@ height: 56rpx; border-radius: 50%; font-size: 24rpx; - color: #fff; + color: #333; text-align: center; line-height: 56rpx; - // background: url('../../../../static/images/carIcon/home_icon_weidao@2x.png'); + background: url('../../../../static/images/carIcon/home_icon_weidao@2x.png'); background-size: 100% 100%; } diff --git a/pages/mineEntry/myAppointment/myAppointment.vue b/pages/mineEntry/myAppointment/myAppointment.vue index d3aba90..306d891 100644 --- a/pages/mineEntry/myAppointment/myAppointment.vue +++ b/pages/mineEntry/myAppointment/myAppointment.vue @@ -8,7 +8,7 @@ {{ item.text }} - {{total}}条记录 + {{total}}条记录 @@ -141,7 +141,6 @@ justify-content: space-between; color: #fff; font-size: 28rpx; - padding:0rpx 0 40rpx 0; color: $themC; .nav { height: 80rpx; @@ -166,7 +165,7 @@ } .recordTotal { font-size: 24rpx; - padding: 0rpx 0 28rpx 0; + padding: 20rpx 0 20rpx 0; text-align: right; } .pad { diff --git a/pages/tabbar/index/index.vue b/pages/tabbar/index/index.vue index 19db78e..0350393 100644 --- a/pages/tabbar/index/index.vue +++ b/pages/tabbar/index/index.vue @@ -205,6 +205,7 @@ }, onPullDownRefresh() { + this.$store.dispatch('getCity') this.initApi() }, onShow() { @@ -299,25 +300,29 @@ scanCodeFn() { let _this = this uni.scanCode({ + scanType: ['qrCode'], success: function(res) { console.log('条码类型:' + res.scanType); - console.log('条码内容6:' + res.result); + console.log('条码内容:' + res.result); let obj = JSON.parse(res.result) + console.log(obj) // 扫教练码去报名的 - if(obj.coachId) { - obj.nickname = decodeURIComponent(obj.nickname) - obj.schoolName = decodeURIComponent(obj.schoolName) + + if(obj.QrType) { let item = { schoolName: obj.schoolName, schoolId: obj.schoolId, - name: obj.nickname, - id: obj.coachId + name: obj.coachName, + id: obj.coachId, + teachCarType: obj.teachCarType, + key: obj.key, + QrType: obj.QrType } console.log('***********') console.log(item) _this.$store.commit('upDateSchoolClass', {}) _this.$store.commit('upDateSchoolCoach', item) - _this.$goPage('/pages/indexEntry/enroll/enroll') + _this.$u.utils.clickSignUp() } // _this.$store.commit('updateWebVeiwUrl', res.result) diff --git a/pages/tabbar/learnCar/comp/subject2.vue b/pages/tabbar/learnCar/comp/subject2.vue index 99efa45..b95370e 100644 --- a/pages/tabbar/learnCar/comp/subject2.vue +++ b/pages/tabbar/learnCar/comp/subject2.vue @@ -36,6 +36,7 @@ 科目二考试成绩未通过 {{ $u.timeFormat(info.studentExamVO.examTime, 'yyyy-mm-dd hh:MM:ss') }} + 前往"12123"APP预约考试 @@ -53,6 +54,12 @@ 科目二学习进度已通过 + 前往"12123"APP预约考试 diff --git a/pages/tabbar/learnCar/comp/topInfo.vue b/pages/tabbar/learnCar/comp/topInfo.vue index b93efc8..16b7dbf 100644 --- a/pages/tabbar/learnCar/comp/topInfo.vue +++ b/pages/tabbar/learnCar/comp/topInfo.vue @@ -47,6 +47,12 @@ --> + + + 确认学时 + + + @@ -166,4 +172,19 @@ } } } + .timerFlex { + display: flex; + justify-content: flex-end; + padding: 20rpx 0 0 0; + .link-arrow { + display: flex; + align-items: center; + font-size: 28rpx; + color: $themC; + height: 50rpx; + .txt { + margin-right: 4rpx; + } + } + } \ No newline at end of file