From 97dfba8ef9826d292f47991b47ed2eff7a637658 Mon Sep 17 00:00:00 2001 From: unknown <331404948@qq.com> Date: Tue, 10 Oct 2023 19:05:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87=E5=B0=81?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/pickDateTimer/pickDateTimer.vue | 64 ++- config/api.js | 7 +- config/utils.js | 92 +++- pages.json | 12 +- pages/carEntry/evaluate/comp/evaluateItem.vue | 81 +--- .../simulateAppointment/comp/step1 - 副本.vue | 251 +++++++++++ pages/carEntry/simulateAppointment/comp/step1.vue | 86 +--- pages/indexEntry/consult/consult.vue | 41 +- .../consult/pubComplaint/pubComplaint.vue | 44 +- pages/indexEntry/consult/pubConsult/pubConsult.vue | 45 +- pages/indexEntry/enroll/registInfo/registInfo.vue | 65 ++- pages/tabbar/index/index.vue | 2 +- pages/userCenter/login/face.vue | 492 +++++++++++++++++++++ pages/userCenter/login/loginByPhone.vue | 2 + 14 files changed, 1032 insertions(+), 252 deletions(-) create mode 100644 pages/carEntry/simulateAppointment/comp/step1 - 副本.vue create mode 100644 pages/userCenter/login/face.vue diff --git a/components/pickDateTimer/pickDateTimer.vue b/components/pickDateTimer/pickDateTimer.vue index fad5f18..36f9afe 100644 --- a/components/pickDateTimer/pickDateTimer.vue +++ b/components/pickDateTimer/pickDateTimer.vue @@ -3,7 +3,7 @@ - 2032.08 + {{ currentMonth }} @@ -57,17 +57,30 @@ + diff --git a/pages/carEntry/simulateAppointment/comp/step1 - 副本.vue b/pages/carEntry/simulateAppointment/comp/step1 - 副本.vue new file mode 100644 index 0000000..aa79498 --- /dev/null +++ b/pages/carEntry/simulateAppointment/comp/step1 - 副本.vue @@ -0,0 +1,251 @@ + + + + + \ No newline at end of file diff --git a/pages/carEntry/simulateAppointment/comp/step1.vue b/pages/carEntry/simulateAppointment/comp/step1.vue index aa79498..8f7061a 100644 --- a/pages/carEntry/simulateAppointment/comp/step1.vue +++ b/pages/carEntry/simulateAppointment/comp/step1.vue @@ -1,102 +1,24 @@ diff --git a/pages/indexEntry/consult/pubComplaint/pubComplaint.vue b/pages/indexEntry/consult/pubComplaint/pubComplaint.vue index fd323e1..0d8b7fc 100644 --- a/pages/indexEntry/consult/pubComplaint/pubComplaint.vue +++ b/pages/indexEntry/consult/pubComplaint/pubComplaint.vue @@ -100,9 +100,9 @@ diff --git a/pages/indexEntry/enroll/registInfo/registInfo.vue b/pages/indexEntry/enroll/registInfo/registInfo.vue index ca43b40..a311850 100644 --- a/pages/indexEntry/enroll/registInfo/registInfo.vue +++ b/pages/indexEntry/enroll/registInfo/registInfo.vue @@ -147,7 +147,7 @@ - + 来源城市 @@ -272,6 +272,8 @@ + + @@ -280,10 +282,12 @@ import comfigPopup from './comp/comfigPopup' import searchSchool from './comp/searchSchool' import oldDrive from './comp/oldDrive' + import { areaTree } from '@/config/api.js' export default { components: { comfigPopup, searchSchool, oldDrive }, data() { return { + showCity: false, showPopup: false, showClassModel: false, showCar: false, @@ -327,7 +331,9 @@ showSchool: false, radiolist1: [ {name: '初领', id: 1}, {name: '增驾', id: 2}], radiolist2: [ {name: '是', id: 1}, {name: '否', id: 2}], - radiolist3: [ {name: '全款', id: 1}, {name: '预付款', id: 2}] + radiolist3: [ {name: '全款', id: 1}, {name: '预付款', id: 2}], + cityArr: [], + cityArr2: [[]] } }, onLoad() { @@ -335,7 +341,7 @@ console.log(item) this.form.coach = item.name }) - + this.areaTreeFn() let schoolClass = this.$store.state.school.schoolClass console.log(schoolClass) if(schoolClass.id) { @@ -355,6 +361,59 @@ } }, methods: { + cityShowFn() { + this.showCity = true + // picker = this.$refs.uPicker + }, + changeHandler(e) { + const { + columnIndex, + value, + values, // values为当前变化列的数组内容 + index, + // 微信小程序无法将picker实例传出来,只能通过ref操作 + picker = this.$refs.uPicker + } = e + // 当第一列值发生变化时,变化第二列(后一列)对应的选项 + if (columnIndex === 0) { + // picker为选择器this实例,变化第二列对应的选项 + picker.setColumnValues(1, this.cityArr2[index]) + } + }, + // 回调参数为包含columnIndex、value、values + confirmCity(e) { + console.log('confirm', e) + this.showCity = false + }, + // 获取地区 + async areaTreeFn() { + const {data: res} = await areaTree() + this.cityArr = res.map(item=>{ + let obj = { + id: item.id, + name: item.name + } + this.cityArr2[0].push(this.traverse(item.children)) + return obj + }) + console.log(this.cityArr) + console.log(this.cityArr2) + // this.showCity = res + }, + traverse(arr, result=[]) { + for (var i = 0; i < arr.length; i++) { + let item = arr[i] + let obj = { + id: item.id, + name: item.name + } + result.push(obj) + if(item.children.length) { + this.traverse(item.children, result) + } + } + return result; + }, // 选择驾校 chooseSchool(item) { this.form.school = item.name diff --git a/pages/tabbar/index/index.vue b/pages/tabbar/index/index.vue index 7852515..ced63fc 100644 --- a/pages/tabbar/index/index.vue +++ b/pages/tabbar/index/index.vue @@ -1,5 +1,6 @@ + + diff --git a/pages/userCenter/login/loginByPhone.vue b/pages/userCenter/login/loginByPhone.vue index 918652f..67eec94 100644 --- a/pages/userCenter/login/loginByPhone.vue +++ b/pages/userCenter/login/loginByPhone.vue @@ -30,6 +30,7 @@ + @@ -105,6 +106,7 @@ 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' })