From a2645471e8138fd9ee37f64b235de9d1af5d3a27 Mon Sep 17 00:00:00 2001 From: Double-_-Z <2492419643@qq.com> Date: Thu, 24 Jul 2025 18:50:16 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=80=BB=E8=BE=91=E5=BE=AE?= =?UTF-8?q?=E8=B0=83=EF=BC=8C=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85=E5=88=9D?= =?UTF-8?q?=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aircraft/server/index/index.vue | 5 +- .../server/my/child_pages/reset-password.vue | 16 +++- aircraft/server/my/my.vue | 1 + aircraft/server/order/detail.vue | 86 +++++++++++++++++++ aircraft/server/order/order.vue | 17 +++- common/http.api.js | 1 + components/topnav/index.vue | 14 ++- pages.json | 6 ++ 8 files changed, 138 insertions(+), 8 deletions(-) create mode 100644 aircraft/server/order/detail.vue diff --git a/aircraft/server/index/index.vue b/aircraft/server/index/index.vue index 2a83f2e..b1cf15f 100644 --- a/aircraft/server/index/index.vue +++ b/aircraft/server/index/index.vue @@ -92,9 +92,10 @@ export default { isPilot: this.$store.state.user_type == 1, } }, - onLoad(){ + mounted(){ let index = uni.getStorageSync('current'); - this.current = index?index:0; + // B端没有设备和路线 + this.current = (!index||(!this.isPilot&&(index===2||index===3)))?0:index; this.isLogin = this.$store.state.vuex_token; this.isPilot = this.$store.state.user_type; this.changeCurrent(this.current); diff --git a/aircraft/server/my/child_pages/reset-password.vue b/aircraft/server/my/child_pages/reset-password.vue index 4e92633..ffad952 100644 --- a/aircraft/server/my/child_pages/reset-password.vue +++ b/aircraft/server/my/child_pages/reset-password.vue @@ -52,14 +52,28 @@ export default { }else{ try { this.loading = true; - let res = await this.$api.aUpdatePass({ + let res = await this.$api[this.isPilot?'aUpdatePass':'bUpdatePass']({ oldPass: encrypt(oldPass), newPass: encrypt(newPass), }); if(res.status&&res.status===400){ this.$refs.uToast.show({type: 'error',title: "密码修改失败!"}); }else{ + this.form = { + oldPass: '', + newPass: '', + comPass: '' + } this.$refs.uToast.show({type: 'success',title: "密码修改成功,请重新登录!"}); + setTimeout(async()=>{ + await this.$api.logout(); + this.$u.vuex('vuex_token', ''); + this.$u.vuex('user_message', {}); + uni.setStorageSync('current',0); + uni.reLaunch({ + url: '/aircraft/server/my/child_pages/login', + }) + },1000); } } catch (error) { this.$refs.uToast.show({type: 'error',title: "密码修改失败!"}); diff --git a/aircraft/server/my/my.vue b/aircraft/server/my/my.vue index ec5a79c..1d063ca 100644 --- a/aircraft/server/my/my.vue +++ b/aircraft/server/my/my.vue @@ -98,6 +98,7 @@ export default { await that.$api.logout(); that.$u.vuex('vuex_token', ''); that.$u.vuex('user_message', {}); + uni.setStorageSync('current',0); uni.reLaunch({ url: '/aircraft/server/my/child_pages/login', complete() { diff --git a/aircraft/server/order/detail.vue b/aircraft/server/order/detail.vue new file mode 100644 index 0000000..2b0fe80 --- /dev/null +++ b/aircraft/server/order/detail.vue @@ -0,0 +1,86 @@ + + + + + + \ No newline at end of file diff --git a/aircraft/server/order/order.vue b/aircraft/server/order/order.vue index 64cd5e8..dec2377 100644 --- a/aircraft/server/order/order.vue +++ b/aircraft/server/order/order.vue @@ -1,5 +1,5 @@ diff --git a/common/http.api.js b/common/http.api.js index 0023dfa..d6f8c6a 100644 --- a/common/http.api.js +++ b/common/http.api.js @@ -9,6 +9,7 @@ const install = (Vue, vm) => { vm.$api.aSelfDetail = async (id) => await vm.$u.get(`/api/emEmployees/${id}`);// 查询飞行员详情 vm.$api.aEditSelf = async (params = {}) => await vm.$u.put(`/api/emEmployees`,params);// 修改飞行员信息 vm.$api.aUpdatePass = async (params = {}) => await vm.$u.post(`/api/emEmployees/updatePass`,params);// 修改飞行员密码 + vm.$api.bUpdatePass = async (params = {}) => await vm.$u.post(`/cnCustomer/updatePass`,params);// 修改客户密码 // 区域管理 vm.$api.allAreas = async () => await vm.$u.get('/emArea/all');// 获取全部区域 diff --git a/components/topnav/index.vue b/components/topnav/index.vue index a7c490a..0219687 100644 --- a/components/topnav/index.vue +++ b/components/topnav/index.vue @@ -3,9 +3,9 @@ background: topLevel===0? '#ffffff00' : `rgba(255, 255, 255,${topLevel})` }"> + :color="topLevel===0? defaultBackColor : `rgba(51, 51, 51,${topLevel})`"> - {{ title }} + {{ title }} @@ -30,6 +30,16 @@ export default { showBack:{ type: Boolean, default: false + }, + // 初始返回按钮颜色 + defaultBackColor:{ + type: String, + default: '#ffffff00' + }, + // 初始标题颜色 + defaultNavTextColor:{ + type: String, + default: '#ffffff00' } }, data(){ diff --git a/pages.json b/pages.json index b8ceac2..33dc06a 100644 --- a/pages.json +++ b/pages.json @@ -55,6 +55,12 @@ "navigationBarTitleText": "登录" } }, + { + "path": "order/detail", + "style": { + "navigationBarTitleText": "订单详情" + } + }, { "path": "my/child_pages/history", "style": {