From aef949a659d073443e81f22686b44bd440a69a0e Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期一, 25 十二月 2023 14:15:46 +0800 Subject: [PATCH] 修改称重连点问题 增加司机注册字段 --- pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue | 79 +++++++++++---------------------------- 1 files changed, 22 insertions(+), 57 deletions(-) diff --git a/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue b/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue index e3cbe92..e46460a 100644 --- a/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue +++ b/pages/freight-forwarder-page/freightForwarder-my/freightForwarder-my.vue @@ -78,9 +78,9 @@ <view class="utils"><u-button text="淇敼瀵嗙爜" type="primary" @click="modifyPwd"></u-button></view> - <view class="utils"><u-button text="閲嶇疆瀵嗙爜" + <!-- <view class="utils"><u-button text="閲嶇疆瀵嗙爜" type="primary" - @click="initPwd"></u-button></view> + @click="initPwd"></u-button></view> --> <view class="utils"><u-button text="閫�鍑虹櫥褰�" type="primary" @click="logout"></u-button></view> @@ -107,16 +107,16 @@ @cancel="logoutCancel"></u-modal> </view> <!-- 閲嶇疆瀵嗙爜寮瑰嚭妗� --> - <view class="initPwdModal"> + <!-- <view class="initPwdModal"> <u-modal :show="initPwdShow" title="閲嶇疆瀵嗙爜" showCancelButton content="鍒濆瀵嗙爜灏嗗彉鏇翠负123456,鏄惁纭閲嶇疆" @confirm="initPwdConfirm" @cancel="initPwdCancel"></u-modal> - </view> + </view> --> <!-- 淇敼瀵嗙爜寮瑰嚭妗� --> - <view class="modifyPwdModal"> + <!-- <view class="modifyPwdModal"> <u-modal :show="modifyPwdShow" title="淇敼瀵嗙爜" showCancelButton @@ -129,7 +129,7 @@ type="password"></u-input> </view> </u-modal> - </view> + </view> --> </view> </template> @@ -161,7 +161,7 @@ modifyPwdShow: false, passwordModified: '', // 鐢ㄦ埛淇℃伅瀵硅薄 - userEntity: {}, + userInfo: {}, }; }, onLoad() { @@ -170,21 +170,23 @@ methods: { init() { this.getFleet(); - this.getUserEntity() - }, - // 鑾峰彇鐢ㄦ埛淇℃伅 - getUserEntity() { - this.$reqGet('getUserEntity').then(res => { - this.userEntity = res.data; - }); + this.getUserEntity(); }, // 鑾峰彇杞﹂槦 getFleet() { - // this.$reqGet('getFleet', { wxUserId: this.addGroupForm.wxUserId }).then(res => { this.$reqGet('getFleet').then(res => { console.log('璐т唬1杞﹂槦', res); this.fleetData = res.data; }); + }, + getUserEntity() { + uni.showLoading({ + title: '鍔犺浇涓�...' + }); + this.$reqGet('getUserEntity').then(res => { + uni.hideLoading() + this.userInfo = res.data; + }) }, // 娣诲姞杞﹂槦 addFleet() { @@ -247,49 +249,12 @@ url: `/pages/customer-page/fleet-management/fleet-management?id=${id}` }); }, - updateInfo() { - this.$reqPost('updateUser', this.userEntity, 'json').then(res => { - uni.hideLoading() - if (res.code == 0) { - uni.showToast({ - title: '閲嶇疆鎴愬姛', - duration: 2000, - icon: 'success' - }) - } else { - this.$u.toast(res.msg ? res.msg : '淇敼澶辫触'); - } - }).catch(err => { - this.$u.toast('淇敼澶辫触'); - }); - }, - initPwd() { - this.initPwdShow = true - }, - initPwdConfirm() { - this.initPwdShow = false - uni.showLoading({ - title: '鍔犺浇涓�' - }) - this.userEntity.password = '123456' - this.updateInfo() - }, - initPwdCancel() { - this.initPwdShow = false - }, modifyPwd() { - this.modifyPwdShow = true - }, - modifyPwdConfirm() { - if (this.passwordModified.length === 0) { - return this.$u.toast('瀵嗙爜涓嶈兘涓虹┖') - } - this.modifyPwdShow = false - this.userEntity.password = this.passwordModified - this.updateInfo() - }, - modifyPwdCancel() { - this.modifyPwdShow = false + this.$store.commit('changeisLogin', false) + this.$store.dispatch('websocketOnClose') + uni.reLaunch({ + url: `/pages/login/resetPassword/resetPassword?phone=${this.userInfo.phone}&idCard=${this.userInfo.idCard}` + }) }, logout() { this.logoutShow = true; -- Gitblit v1.9.1