From d9601c5b2780a1f933f63ed1a708b5274e55ce1d Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期三, 16 十月 2024 15:40:23 +0800 Subject: [PATCH] feat:登录密码下拉框 --- pages/driver-page/drvier-my/drvier-my.vue | 72 ++++++++++++++++++++--------------- 1 files changed, 41 insertions(+), 31 deletions(-) diff --git a/pages/driver-page/drvier-my/drvier-my.vue b/pages/driver-page/drvier-my/drvier-my.vue index aa4be44..f4646cd 100644 --- a/pages/driver-page/drvier-my/drvier-my.vue +++ b/pages/driver-page/drvier-my/drvier-my.vue @@ -6,7 +6,7 @@ <view class="navgation">鎴戠殑</view> <view class="avatar"> <view class="avatar-imgage" - style="background: url('https://mx.jzeg.cn:9096/appimg/image/banner/driverava.png')no-repeat;background-size: cover;"> + style="background: url('https://mr1.res.jzeg.cn:9096/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" @@ -35,17 +35,17 @@ <view class="information-line" @click=""> <view class="line-label"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/personalicon.png" + <image src="https://mr1.res.jzeg.cn:9096/appimg/image/banner/personalicon.png" mode="widthFix"></image> <view class="label-text">韬唤璇佸彿</view> </view> <view class="information-value"> - {{ userInfo.idCard || '' }} + {{ idCard || '' }} </view> </view> <view class="information-line"> <view class="line-label"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/phonenum.png" + <image src="https://mr1.res.jzeg.cn:9096/appimg/image/banner/phonenum.png" mode="widthFix"></image> <view class="label-text">鎵嬫満鍙�</view> </view> @@ -55,7 +55,7 @@ </view> <view class="information-line"> <view class="line-label"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/carnum.png" + <image src="https://mr1.res.jzeg.cn:9096/appimg/image/banner/carnum.png" mode="widthFix"></image> <view class="label-text">杞︾墝鍙�</view> </view> @@ -65,7 +65,7 @@ </view> <view class="information-line"> <view class="line-label"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/axisnum.png" + <image src="https://mr1.res.jzeg.cn:9096/appimg/image/banner/axisnum.png" mode="widthFix"></image> <view class="label-text">杞﹁酱鏁�</view> </view> @@ -75,7 +75,7 @@ </view> <view class="information-line"> <view class="line-label"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/weighnum.png" + <image src="https://mr1.res.jzeg.cn:9096/appimg/image/banner/weighnum.png" mode="widthFix"></image> <view class="label-text">浣撻噸</view> </view> @@ -89,7 +89,7 @@ icon 涓嬭浇鏍煎紡涓�18x18--> <view class="line-label" style="margin-left: 1.5%;"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/printer.png" + <image src="https://mr1.res.jzeg.cn:9096/appimg/image/banner/printer.png" mode="widthFix" style="width: 18px;"></image> <view class="label-text">纾呭崟鏍峰紡</view> @@ -106,7 +106,7 @@ @click="addressManageHandle"> <view class="line-label" style="margin-left: 1.5%;"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/address.png" + <image src="https://mr1.res.jzeg.cn:9096/appimg/image/banner/address.png" mode="widthFix" style="width: 18px;"></image> <view class="label-text" @@ -121,7 +121,7 @@ @click="scoreDetail"> <view class="line-label" style="margin-left: 1.5%;"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/score.png" + <image src="https://mr1.res.jzeg.cn:9096/appimg/image/banner/score.png" mode="widthFix" style="width: 36rpx;position: relative;left: 8rpx;"></image> <view class="label-text">鎴戠殑绉垎</view> @@ -146,7 +146,7 @@ <view class="information-body"> <view class="car-img"> <view class="label-title"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/carimg.png" + <image src="https://mr1.res.jzeg.cn:9096/appimg/image/banner/carimg.png" mode="widthFix"></image> <view class="label-text">杞﹁締鐓х墖</view> </view> @@ -163,7 +163,7 @@ </view> <view class="car-img"> <view class="label-title"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/cardimg.png" + <image src="https://mr1.res.jzeg.cn:9096/appimg/image/banner/cardimg.png" mode="widthFix"></image> <view class="label-text">琛岄┒璇佺収鐗�</view> </view> @@ -180,7 +180,7 @@ </view> <view class="car-img"> <view class="label-title"> - <image src="https://mx.jzeg.cn:9096/appimg/image/banner/cardimg.png" + <image src="https://mr1.res.jzeg.cn:9096/appimg/image/banner/cardimg.png" mode="widthFix"></image> <view class="label-text">杞﹁締绫诲瀷鐓х墖</view> </view> @@ -247,14 +247,14 @@ border="none" inputAlign="left"></u--input> </u-form-item> --> - <u-form-item labelWidth="20%" + <!-- <u-form-item labelWidth="20%" label="韬唤璇佸彿" prop="idCard" required> <u--input v-model="editUserInfo.idCard" border="none" inputAlign="left"></u--input> - </u-form-item> + </u-form-item> --> <u-form-item labelWidth="20%" label="鎵嬫満鍙�" prop="phone" @@ -291,7 +291,7 @@ <u-form-item labelWidth="20%" label="杞﹁締绫诲瀷" borderBottom - required="" + required prop="countryNumberCar"> <u-radio-group v-model="editUserInfo.countryNumberCar" placement="row" @@ -529,10 +529,11 @@ return Number(value); }, validator: (rule, value, callback) => { - return value <= 10; + return value <= 10 && value > 0; }, message: '璇疯緭鍏ユ纭殑杞﹁酱鏁�', - trigger: ['change', 'blur'] + trigger: ['change', 'blur'], + required: true, }], carImg: { type: 'string', @@ -551,7 +552,19 @@ required: true, message: '璇烽�夋嫨杞﹁締绫诲瀷', trigger: ['blur', 'change'] - } + }, + roadTransportImg: { + type: 'string', + required: true, + message: '璇蜂笂浼犻亾璺繍杈撹瘉鐓х墖', + trigger: ['blur', 'change'] + }, + tradeQualificationImg: { + type: 'string', + required: true, + message: '璇蜂笂浼犱粠涓氳祫鏍艰瘉鐓х墖', + trigger: ['blur', 'change'] + }, }, src: '', fileList1: [], @@ -575,6 +588,9 @@ computed: { currentSelectedPrintStyle() { return this.selectedPrintStyle ? this.selectedPrintStyle : uni.getStorageSync('selectedPrintStyle') + }, + idCard() { + return this.userInfo.idCard.slice(0, 6) + '********' + this.userInfo.idCard.slice(-4) } }, onShow() { @@ -595,8 +611,8 @@ this.$reqGet('getUserEntity').then(res => { uni.hideLoading(); this.userInfo = res.data; - this.userInfo.idCard = this.userInfo.idCard.slice(0, 6) + '********' + this.userInfo.idCard - .slice(-4) + // this.userInfo.idCard = this.userInfo.idCard.slice(0, 6) + '********' + this.userInfo.idCard + // .slice(-4) uni.setStorageSync('carImg', this.userInfo.carImg); uni.setStorageSync('drivingImg', this.userInfo.drivingImg); uni.setStorageSync('roadTransportImg', this.userInfo.roadTransportImg); @@ -626,14 +642,8 @@ url: `${BaseUrl}${this.userInfo.inventoryImg}` }); } - Object.keys(this.editUserInfo).map(item => { - if (res.data[item]) { - this.editUserInfo[item] = res.data[item]; - this.editUserInfo.idCard = this.userInfo.idCard.slice(0, 6) + '********' + this - .editUserInfo.idCard - .slice(-4) - } - }); + Object.assign(this.editUserInfo, res.data) + console.log(this.editUserInfo); this.editUserInfo.password = '' }); }, @@ -743,7 +753,7 @@ this.$store.commit('changeisLogin', false) this.$store.dispatch('websocketOnClose') uni.reLaunch({ - url: '/pages/login/forgetPassword/forgetPassword' + url: `/pages/login/resetPassword/resetPassword?phone=${this.userInfo.phone}&idcard=${this.userInfo.idcard}` }) }, // 淇敼鐢ㄦ埛淇℃伅 @@ -1096,4 +1106,4 @@ } } } -</style> \ No newline at end of file +</style> -- Gitblit v1.9.1