diff --git a/components/searchRow/searchRow.vue b/components/searchRow/searchRow.vue index 5cdd943..1a3b6a1 100644 --- a/components/searchRow/searchRow.vue +++ b/components/searchRow/searchRow.vue @@ -4,11 +4,9 @@ - - {{ placeholder }} - - - + + + diff --git a/config/api.js b/config/api.js index 824cf77..4aff43f 100644 --- a/config/api.js +++ b/config/api.js @@ -2,8 +2,8 @@ var http = uni.$u.http -// 隐私政策 -// export const getAgreement = (params, config = {}) => http.post('/util/manage/getAgreement.do', params, config) +// 微信小程序的一键登录 +export const weixinLogin = (data) => http.post('member/auth/weixin-mini-app-login', data) // 验证码登录 export const loginSMS = (data) => http.post('member/auth/sms-login', data, { custom: { noToken: true }}) // 登录发验证码 @@ -171,6 +171,7 @@ export const getDriveProcessDetails = (params={}) => http.get('app/student-recor + diff --git a/pages/indexEntry/enroll/enroll.vue b/pages/indexEntry/enroll/enroll.vue index 4fdaa41..462037d 100644 --- a/pages/indexEntry/enroll/enroll.vue +++ b/pages/indexEntry/enroll/enroll.vue @@ -45,9 +45,10 @@ 性别 - - - + + + + @@ -169,10 +170,24 @@ // bizToken: 'C9C2BC8E-8336-4071-84B3-8170E283E6CA', // userId: this.userId // } - const {data: res} = await GetDetectInfoEnhanced({EidToken, userId: this.userId, InfoType: 1}) - let obj2 = JSON.parse(res) + const res = await GetDetectInfoEnhanced({EidToken, userId: this.userId, InfoType: 1}) + if(res.code!=0) return + let obj = JSON.parse(res.data).Text + if(obj.Comparemsg!=='成功') return + let userInfo = { + address: obj.OcrAddress, + name: obj.OcrName, + idcard: obj.OcrIdCard, + sex: obj.OcrGender=='女'?2:1, + applyStep: 2 + } + let info = Object.assign(this.$store.state.user.vuex_userInfo, userInfo) + this.$store.commit('update_vuex_userInfo', info) console.log('请求结果来了') - console.log(obj2) + console.log(userInfo) + console.log(this.$store.state.user.vuex_userInfo) + uni.hideLoading() + this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo') // uni.setStorageSync(obj2) }, async goNext() { @@ -198,7 +213,7 @@ return this.$goPage('/pages/indexEntry/enroll/payment/payment') } // 不是身份证 - if(this.form.value!==1) { + if(this.form.value!=1) { for(let key in this.formToast) { if(!this.form[key]) { return this.$u.toast(this.formToast[key]) @@ -234,6 +249,9 @@ const { token, verifyDone } = res; console.log('收到核身完成的res:', res); console.log('核身的token是:', token); + uni.showLoading({ + title: '正在加载,请稍后……' + }) _this.GetDetectInfoEnhancedFn(token) console.log('是否完成核身:', verifyDone); }, diff --git a/pages/indexEntry/enroll/registInfo/registInfo.vue b/pages/indexEntry/enroll/registInfo/registInfo.vue index 90ccb77..51bd7ad 100644 --- a/pages/indexEntry/enroll/registInfo/registInfo.vue +++ b/pages/indexEntry/enroll/registInfo/registInfo.vue @@ -32,7 +32,7 @@ - + @@ -274,7 +274,7 @@ import comfigPopup from './comp/comfigPopup' import searchSchool from './comp/searchSchool' import oldDrive from './comp/oldDrive' - import { areaTree, applyOnline, schoolClass, } from '@/config/api.js' + import { areaTree, applyOnline, schoolClass, getSchoolDetail } from '@/config/api.js' export default { components: { comfigPopup, searchSchool, oldDrive }, data() { @@ -336,6 +336,7 @@ } this.initUserInfo() + // 监听上一个页面的选择教练 uni.$on('upDateCoachItem',(item)=>{ console.log(item) this.form.coach = item.name @@ -343,27 +344,28 @@ }) this.areaTreeFn() + // 如果是选择了驾校班型来报名的 let schoolClass = this.$store.state.school.schoolClass - console.log(schoolClass) if(schoolClass.id) { + console.log(schoolClass) this.form.classModel = schoolClass.name this.form.school = schoolClass.schoolName this.form.schoolId = schoolClass.schoolId - this.form.car = schoolClass.carType + this.form.trainType = schoolClass.carType + this.form.schoolClassId = schoolClass.id } - + // 如果是选择了驾校教练来报名的/扫二维码 let schoolCoach = this.$store.state.school.schoolCoach - console.log('schoolCoach') - console.log(schoolCoach) if(schoolCoach.id) { + console.log('schoolCoach') + console.log(schoolCoach) this.form.coach = schoolCoach.name this.form.coachId = schoolCoach.id this.form.school = schoolCoach.schoolName this.form.schoolId = schoolCoach.schoolId - // this.form.car = schoolClass.carType } if(this.form.schoolId) { - this.schoolClassFn() + this.getSchoolDetailFn() } }, onPullDownRefresh() { @@ -372,9 +374,10 @@ methods: { async initUserInfo() { // 如果不是实名 - if(!this.realNameNo) { - await this.$store.dispatch('getUserInfo') - } + // if(!this.realNameNo) { + // await this.$store.dispatch('getUserInfo') + // } + console.log(this.vuex_userInfo) this.form.userId = this.userId this.form.accountId = this.vuex_userInfo.accountId this.form.address = this.vuex_userInfo.address @@ -384,6 +387,7 @@ this.form.nationality = this.vuex_userInfo.nationality || '中国' this.form.cardType = this.vuex_userInfo.cardType || '1' }, + // 查班型 async schoolClassFn() { const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId}) this.columnsClassModel = [res.list] @@ -466,17 +470,6 @@ }) }) }) - // for(let i=0; i - + 我的驾校 - {{ vuex_userInfo.schoolName }} + {{ vuex_userInfo.schoolName||'' }} 我的教练 - {{ vuex_userInfo.coachName }} + {{ vuex_userInfo.coachName||'' }} 所学车型 - {{ vuex_userInfo.trainType }} + {{ vuex_userInfo.trainType||'' }} 报名时间 diff --git a/pages/userCenter/login/login.vue b/pages/userCenter/login/login.vue index c250b68..76b3f82 100644 --- a/pages/userCenter/login/login.vue +++ b/pages/userCenter/login/login.vue @@ -4,9 +4,7 @@ - - 手机号快捷登录 - + 手机号快捷登录 手机号登录/注册 @@ -28,6 +26,7 @@