From 8924f0d87ce158f1ba14d59b29a087217ce54fbd Mon Sep 17 00:00:00 2001 From: unknown <331404948@qq.com> Date: Wed, 10 Apr 2024 16:45:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B7=B2=E8=BF=87=E7=A7=91?= =?UTF-8?q?=E7=9B=AE=E5=87=A0=E7=9A=84=E9=87=91=E9=A2=9D=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/js/mixins.js | 3 ++ common/js/utils.js | 2 +- config/api.js | 5 ++- config/request.js | 3 +- config/site.config.js | 5 +-- config/utils.js | 6 ++- manifest.json | 6 +-- pages.json | 2 +- pages/indexEntry/enroll/payment/payment.vue | 20 ++++++--- pages/indexEntry/enroll/registInfo/registInfo.vue | 52 ++++++++++++++++++----- pages/indexEntry/signIn/signAndOut/signAndOut.vue | 1 + pages/mineEntry/myAppointment/comp/opera.vue | 4 +- pages/mineEntry/myAppointment/detail/opera.vue | 4 +- pages/mineEntry/myOrder/voucher/voucher.vue | 4 +- pages/tabbar/learnCar/comp/topInfo.vue | 2 +- pages/tabbar/learnCar/index.vue | 28 +++++++++++- pages/userCenter/login/login.vue | 8 +++- store/modules/user.js | 10 +++-- 18 files changed, 122 insertions(+), 43 deletions(-) diff --git a/common/js/mixins.js b/common/js/mixins.js index 592ccec..ce38231 100644 --- a/common/js/mixins.js +++ b/common/js/mixins.js @@ -16,6 +16,9 @@ export default { return { } }, + onload() { + uni.hideLoading() + }, onPullDownRefresh() { setTimeout(()=>{ uni.stopPullDownRefresh() diff --git a/common/js/utils.js b/common/js/utils.js index 3cc36ce..8f98996 100644 --- a/common/js/utils.js +++ b/common/js/utils.js @@ -124,7 +124,7 @@ const install = (Vue, vm) => { store.commit('goLogin') return } - // return vm.$goPage('/pages/indexEntry/enroll/registInfo/registInfo') + return vm.$goPage('/pages/indexEntry/enroll/registInfo/registInfo') // store.commit('updateNonPlatformStudent', false) if( vm.vuex_userInfo.applyStep<2) { vm.$goPage('/pages/indexEntry/enroll/enroll') diff --git a/config/api.js b/config/api.js index 6be5a6b..3bc92b3 100644 --- a/config/api.js +++ b/config/api.js @@ -79,7 +79,7 @@ export const areaTree = () => http.get('system/area/tree', ) // 驾照类型 export const licenseType = () => http.get('system/dict/licenseType', ) // 区域 -export const nachangList = () => http.get('system/area/nachangList', ) +export const nachangList = () => http.get('system/area/luoyangList', ) // 线上提交学员报名信息 export const applyOnline = (data) => http.post('app/student-record/applyOnline', data) // 人脸核身---获取BizToken @@ -216,6 +216,9 @@ export const signDetail = (data) => http.post('business/student/sign/signDetail' export const periodConfirm = (data) => http.post('app/student-process/periodConfirm', data) // 获得学员动态 export const getStudentDynamics = (data) => http.post('app/student-dynamic/getStudentDynamics', data) + // 根据已过科目计算价格 + export const paymentPrice = (data) => http.post('app/student-record/paymentPrice', data) + diff --git a/config/request.js b/config/request.js index e1bdf58..eaa1c71 100644 --- a/config/request.js +++ b/config/request.js @@ -29,7 +29,6 @@ module.exports = (vm) => { // console.log('--------------') // console.log(config) let token = vm.$store.state.user.vuex_loginInfo.accessToken - console.log(token) if(token) { config.header.Authorization = 'Bearer ' + token } @@ -60,7 +59,7 @@ module.exports = (vm) => { if(data.code==401) { console.log('报401的接口') console.log(response.config.url) - vm.$store.commit('goLogin', true) + return vm.$store.commit('goLogin') } // 自定义参数 diff --git a/config/site.config.js b/config/site.config.js index 62ca0c3..3d89ffa 100644 --- a/config/site.config.js +++ b/config/site.config.js @@ -2,9 +2,8 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM; // localIp = false module.exports = { H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理 - // WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://192.168.1.38:8318/',//非代理地址 - WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://work.lyjppt.com:8099/',//非代理地址 - + WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://192.168.1.43:8318/',//非代理地址 + // WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://work.lyjppt.com:8099/',//非代理地址 website: 'http://192.168.1.37', httpPrefix: 'app-api/', imgUrl: 'https://jiangxijiakao-1.oss-cn-hangzhou.aliyuncs.com/defaultImages/app/bigImg/' diff --git a/config/utils.js b/config/utils.js index a57f2b7..0290f8c 100644 --- a/config/utils.js +++ b/config/utils.js @@ -185,13 +185,14 @@ export function uploadImgApi(filePath, imgName, imgLink='image') { key: obj.key, QrType: obj.QrType } - console.log('***********') - console.log(item) + _this.$store.commit('upDateSchoolClass', {}) if(obj.QrType==1) { // 判断是扫教练码来的还是驾校码来的 if(item.id) { _this.$store.commit('updateSchool', {}) + console.log('扫码结果***********') + console.log(item) _this.$store.commit('upDateSchoolCoach', item) }else { obj.schoolName = decodeURIComponent(obj.schoolName) @@ -201,6 +202,7 @@ export function uploadImgApi(filePath, imgName, imgLink='image') { _this.$u.utils.clickSignUp() }else { // 签到的 + _this.$store.commit('upDateSchoolCoach', item) _this.$goPage('/pages/indexEntry/signIn/signAndOut/signAndOut') } }else { diff --git a/manifest.json b/manifest.json index 40148ee..2c6576c 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "洛阳学车", "appid" : "__UNI__3347C6E", "description" : "", - "versionName" : "1.1.4", - "versionCode" : 114, + "versionName" : "1.1.5", + "versionCode" : 115, "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { @@ -69,7 +69,7 @@ "sdkConfigs" : { "share" : { "weixin" : { - "appid" : "", + "appid" : "wxdfeef42d2a053912", "UniversalLinks" : "" } }, diff --git a/pages.json b/pages.json index fdfbd04..1e00bbb 100644 --- a/pages.json +++ b/pages.json @@ -422,7 +422,7 @@ { "path": "myOrder/voucher/voucher", "style": { - "navigationBarTitleText": "培训缴费电子凭证", + "navigationBarTitleText": "培训缴费电子凭证666", // "navigationStyle": "custom", "enablePullDownRefresh": true, "backgroundTextStyle": "dark" diff --git a/pages/indexEntry/enroll/payment/payment.vue b/pages/indexEntry/enroll/payment/payment.vue index ee25b33..e0d6bcc 100644 --- a/pages/indexEntry/enroll/payment/payment.vue +++ b/pages/indexEntry/enroll/payment/payment.vue @@ -5,17 +5,17 @@ 翔力驾校 - 1000.13 + {{ info.a }} 订单金额 - ¥ 2000 + ¥ {{info.a}} 订单编号 - 646545645646458 + {{info.a}} @@ -44,7 +44,7 @@ - 确认支付 + 确认支付 @@ -56,6 +56,9 @@ data() { return { trainingApplyId: '', + info: { + a: '待对接' + } } }, onLoad(options) { @@ -85,7 +88,8 @@ wxPay() { // #ifdef APP-PLUS this.sweixin ? this.sweixin.launchMiniProgram({ - path: '/pages/payment/payment?tokenCode=' + this.payInfo.tokenCode, //跳转小程序页面路径 pages/index/index + // path: '/pages/payment/payment?tokenCode=' + this.payInfo.tokenCode, //跳转小程序页面路径 pages/index/index + path: '/' , //跳转小程序页面路径 pages/index/index type: 0, //可取值: 0-正式版; 1-测试版; 2-体验版。 默认值为0。 id: 'gh_012fd4bda1c2' //小程序的原始id }) : plus.nativeUI.alert('当前环境不支持微信操作!'); @@ -94,6 +98,12 @@ async getStudentByPayment() { const {data: res} = await getStudentByPayment({trainingApplyId: this.trainingApplyId}) this.$store.dispatch('getUserInfo') + }, + paySubmit() { + console.log('这是什么') + console.log(this.sweixin) + this.wxPay() + // this.$goPage('/pages/indexEntry/enroll/paymentSuccess/paymentSuccess') } } } diff --git a/pages/indexEntry/enroll/registInfo/registInfo.vue b/pages/indexEntry/enroll/registInfo/registInfo.vue index 02d99ba..9788ce8 100644 --- a/pages/indexEntry/enroll/registInfo/registInfo.vue +++ b/pages/indexEntry/enroll/registInfo/registInfo.vue @@ -165,7 +165,7 @@ 已过科目 - + @@ -190,12 +190,12 @@ - + 学费 - ¥{{ $u.utils.priceTo(form.totalAmount) }} + ¥{{ $u.utils.priceTo(form.totalAmount) }} @@ -226,7 +226,7 @@ - + @@ -235,7 +235,7 @@ import comfigPopup from './comp/comfigPopup' import searchSchool from './comp/searchSchool' import oldDrive from './comp/oldDrive' - import { areaTree, applyOnline, schoolClass, getSchoolDetail } from '@/config/api.js' + import { areaTree, applyOnline, schoolClass, getSchoolDetail, paymentPrice } from '@/config/api.js' import { scanCodeFn } from '@/config/utils.js' export default { components: { comfigPopup, searchSchool, oldDrive }, @@ -289,7 +289,7 @@ }, showSchool: false, radiolist1: [ {name: '初领', id: 0}, {name: '增驾', id: 1}],//0:初领,1:增驾, - radiolist2: [ {name: '是', id: 1}, {name: '否', id: 2}], + radiolist2: [{name: '否', id: 2}, {name: '是', id: 1}, ], radiolist3: [ {name: '全款', id: 1}, {name: '预付款', id: 2}], cityArr: [], cityArr2: [], @@ -368,7 +368,7 @@ }, // 查班型 async schoolClassFn() { - const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId}) + const {data: res} = await schoolClass({pageNo: 1,pageSize: 100, schoolId: this.form.schoolId, carType: this.form.trainType}) this.columnsClassModel = [res.list] console.log(this.columnsClassModel) }, @@ -488,16 +488,25 @@ this.showClassModel = false this.form.classModel = item.name this.form.schoolClassId = item.id - this.form.totalAmount = item.totalAmount + if(this.form.finishSubject&&this.form.transfer==1) { + this.paymentPriceFn() + }else { + this.form.totalAmount = item.totalAmount + } }, // 选择车型 confirmCar(val) { let item = val.value[0] console.log(item) this.showCar = false + if(this.form.trainType == item) return this.form.trainType = item this.form.coach = '' this.form.coachId = '' + this.form.classModel = '' + this.form.schoolClassId = '' + this.form.totalAmount = '' + this.schoolClassFn() }, showCarClick() { if(!this.form.school) return this.$u.toast('请先选择驾校') @@ -521,13 +530,30 @@ this.showOldDriveModel = false console.log(val) }, + // 弹出选择已过科目 + subjectClick() { + if(!this.form.schoolClassId) return this.$u.toast('请先选择报名班型,方便计算价格') + this.showSubjectPass=true + }, // 选择已过科目 confirmSubjectPass(val) { + this.showSubjectPass = false let item = val.value[0] + if(this.form.finishSubject == item.id) return this.form.finishSubject = item.id this.form.finishSubjectName = item.label - - this.showSubjectPass = false + this.paymentPriceFn() + }, + // 已过科目价格计算 + async paymentPriceFn() { + let obj = { + schoolClassId: this.form.schoolClassId, + finishSubject: this.form.finishSubject + } + const res = await paymentPrice(obj) + if(res.code==0) { + this.form.totalAmount = res.data + } }, // 选择已过科目 confirmTreat(val) { @@ -577,6 +603,7 @@ }, changeVal(val) { console.log(val) + console.log(this.form.transfer) }, // 点击确认 confirmClick() { @@ -590,7 +617,10 @@ console.log(val) this.showPopup = false if(!val) return false - const {data: res} = await applyOnline(this.form) + let obj = Object.assign({},this.form) + obj.name = obj.name.replace(/\s+/g, '') + obj.idcard = obj.idcard.replace(/\s+/g, '') + const {data: res} = await applyOnline(obj) // 报名成功 console.log(res) await this.$store.dispatch('getUserInfo') diff --git a/pages/indexEntry/signIn/signAndOut/signAndOut.vue b/pages/indexEntry/signIn/signAndOut/signAndOut.vue index 83ba6b4..63d6055 100644 --- a/pages/indexEntry/signIn/signAndOut/signAndOut.vue +++ b/pages/indexEntry/signIn/signAndOut/signAndOut.vue @@ -107,6 +107,7 @@ if(this.params.type==3) { fn = signOutAuth } + console.log('扫码传的参数') console.log(this.params) const res = await fn(this.params) console.log('第一步校验信息') diff --git a/pages/mineEntry/myAppointment/comp/opera.vue b/pages/mineEntry/myAppointment/comp/opera.vue index fe36cbc..6665af1 100644 --- a/pages/mineEntry/myAppointment/comp/opera.vue +++ b/pages/mineEntry/myAppointment/comp/opera.vue @@ -7,8 +7,8 @@ {{item.siteName}} - 已取消 - {{statusTxt[item.loginStatus]}} + diff --git a/pages/mineEntry/myAppointment/detail/opera.vue b/pages/mineEntry/myAppointment/detail/opera.vue index 30fab82..b9dc1e8 100644 --- a/pages/mineEntry/myAppointment/detail/opera.vue +++ b/pages/mineEntry/myAppointment/detail/opera.vue @@ -6,8 +6,8 @@ {{info.subject==2?'科目二实操':info.subject==3?'科目三实操':'不限科目'}} {{info.siteName}} - 已取消 - {{statusTxt[info.loginStatus]}} + diff --git a/pages/mineEntry/myOrder/voucher/voucher.vue b/pages/mineEntry/myOrder/voucher/voucher.vue index e0d5813..2de00d1 100644 --- a/pages/mineEntry/myOrder/voucher/voucher.vue +++ b/pages/mineEntry/myOrder/voucher/voucher.vue @@ -1,6 +1,6 @@