From 82a7eba143cc761b303b99889193f7aad2dc9d08 Mon Sep 17 00:00:00 2001 From: qingyiay <2386314947@qq.com> Date: 星期一, 28 八月 2023 08:56:08 +0800 Subject: [PATCH] 修改bug,称重页面增加历史和异常原因填写 --- pages/driver-page/drvier-my/drvier-my.vue | 134 ++++++++++++++++++++++++++++++++++++-------- 1 files changed, 110 insertions(+), 24 deletions(-) diff --git a/pages/driver-page/drvier-my/drvier-my.vue b/pages/driver-page/drvier-my/drvier-my.vue index fbe15ca..3ef0684 100644 --- a/pages/driver-page/drvier-my/drvier-my.vue +++ b/pages/driver-page/drvier-my/drvier-my.vue @@ -1,17 +1,31 @@ <template> <view class="driver-my"> - <view class="driver-banner"> - <view class="navgation">鎴戠殑</view> - <view class="avatar"> - <view class="avatar-imgage" - style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/driverava.png')no-repeat;background-size: cover;"> + <view class="" + style="height: 446rpx;width: 100%;"> + <view class="driver-banner"> + <view class="navgation">鎴戠殑</view> + <view class="avatar"> + <view class="avatar-imgage" + style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/driverava.png')no-repeat;background-size: cover;"> + </view> + <view class="avatar-name">{{ userInfo.name || '' }}</view> + <view class="edit-button"><u-button type="primary" + @click="editBtnClick" + shape="circle" + :disabled="userInfo.isRegister!==2" + plain>缂栬緫涓汉璧勬枡</u-button></view> </view> - <view class="avatar-name">{{ userInfo.name || '' }}</view> - <view class="edit-button"><u-button type="primary" - @click="editBtnClick" - shape="circle" - plain>缂栬緫涓汉璧勬枡</u-button></view> </view> + </view> + <view class="process-state"> + <view class="state-text"> + 瀹℃牳鐘舵�� + </view> + <u--text :type="userInfo.isRegister===0?'primary':userInfo.isRegister===1?'error':'success'" + :text="userInfo.isRegister===0?'寰呭鏍�':userInfo.isRegister===1?'鏈�氳繃':'宸插鏍�'" + size="32"></u--text> + </view> + <view class="information-block"> <view class="personal-information"> <view class="personal-information-block"> <view class="block-main"> @@ -111,6 +125,11 @@ </view> </view> <view class="loginout"> + <view class="loginout-main"><u-button text="閲嶇疆瀵嗙爜" + type="primary" + @click="initPwd" + shape="circle" + plain></u-button></view> <view class="loginout-main"><u-button text="閫�鍑虹櫥褰�" type="primary" @click="logout" @@ -148,6 +167,14 @@ prop="name" required> <u--input v-model="editUserInfo.name" + border="none" + inputAlign="left"></u--input> + </u-form-item> + <u-form-item labelWidth="20%" + label="瀵嗙爜" + prop="password" + required> + <u--input v-model="editUserInfo.password" border="none" inputAlign="left"></u--input> </u-form-item> @@ -238,11 +265,19 @@ @confirm="logoutConfirm" @cancel="logoutCancel"></u-modal> </view> + <view class="initPwdModal"> + <u-modal :show="initPwdShow" + title="閲嶇疆瀵嗙爜" + showCancelButton + content="鍒濆瀵嗙爜灏嗗彉鏇翠负123456,鏄惁纭閲嶇疆" + @confirm="initPwdConfirm" + @cancel="initPwdCancel"></u-modal> + </view> </view> </template> <script> - import { customerId, userInfo, redirectLogin } from '@/utils/status'; + import { redirectLogin } from '@/utils/status'; import { BaseUrl } from '@/api/publicInterface.js'; import { mapMutations } from 'vuex'; export default { @@ -262,7 +297,9 @@ drivingImg: '', axleNum: '', weight: '', - userId: '' + userId: '', + password: "", + isRegister: '' }, rules: { name: { @@ -359,7 +396,9 @@ logoutShow: false, logoutTitle: '鎻愮ず', logoutContent: '鏄惁纭閫�鍑�', - BaseUrl + BaseUrl, + initPwdShow: false + }; }, onShow() { @@ -397,6 +436,7 @@ this.editUserInfo[item] = res.data[item]; } }); + this.editUserInfo.password = '' }); }, // 淇敼鎸夐挳鐐瑰嚮 @@ -496,7 +536,8 @@ this.editUserInfo = { ...this.editUserInfo, carImg: uni.getStorageSync('carImg'), - drivingImg: uni.getStorageSync('drivingImg') + drivingImg: uni.getStorageSync('drivingImg'), + isRegister: 0 }; this.$refs.editRef .validate() @@ -519,6 +560,35 @@ .catch(err => { this.$u.toast('淇敼澶辫触'); }); + }, + initPwd() { + this.initPwdShow = true + }, + initPwdConfirm() { + this.initPwdShow = false + uni.showLoading({ + title: '鍔犺浇涓�...' + }); + this.editUserInfo.password = '123456'; + this.editUserInfo.carImg = uni.getStorageSync('carImg'); + this.editUserInfo.drivingImg = uni.getStorageSync('drivingImg') + this.$reqPost('updateUser', this.editUserInfo, '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('淇敼澶辫触'); + }); + }, + initPwdCancel() { + this.initPwdShow = false }, logout() { this.logoutShow = true; @@ -549,15 +619,11 @@ align-items: center; } - .statistics { - margin-top: vww(10); - margin-bottom: vww(10); - } ::v-deep.driver-my { width: 100%; margin: 0 auto; - padding-bottom: vww(60); + padding-bottom: vww(100); .driver-banner { width: 100%; @@ -610,13 +676,32 @@ top: vww(4); } } + } + + .process-state { + width: 300rpx; + height: 50rpx; + margin: 0 auto; + position: fixed; + top: 284rpx; + left: 37rpx; + display: flex; + align-items: center; + + .state-text { + margin-right: vww(6); + } + } + + .information-block { + width: 100%; .personal-information { width: 100%; display: flex; justify-content: center; position: relative; - top: vww(20); + top: vww(-30); &-block { width: 690rpx; @@ -676,7 +761,6 @@ .car-information { width: 100%; position: relative; - top: vww(410); @include flex justify-content: center; .information-main { @@ -720,11 +804,13 @@ .loginout { width: 100%; - height: 74rpx; + height: 200rpx; @include flex; - justify-content: center; + justify-content: space-around; + flex-direction: column; + align-items: center; position: relative; - bottom: vww(-430); + top: vww(20); .loginout-main { width: 84%; -- Gitblit v1.9.1