From 81062e5937779fd4ee4004412ca89942b67017b4 Mon Sep 17 00:00:00 2001
From: yangan <yangan0921@163.com>
Date: 星期四, 09 十一月 2023 17:08:06 +0800
Subject: [PATCH] app端物资明细字段,增加榜单类型

---
 pages/driver-page/drvier-my/drvier-my.vue |  142 +++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 123 insertions(+), 19 deletions(-)

diff --git a/pages/driver-page/drvier-my/drvier-my.vue b/pages/driver-page/drvier-my/drvier-my.vue
index dcb8171..6697c68 100644
--- a/pages/driver-page/drvier-my/drvier-my.vue
+++ b/pages/driver-page/drvier-my/drvier-my.vue
@@ -116,16 +116,22 @@
 								mode="widthFix"></image>
 							<view class="label-text">杞﹀ご杞﹀熬杞﹁韩鐓х墖</view>
 						</view>
-						<view class="img-container"
-							v-for="item in userInfo.bodyofcarJpg?userInfo.bodyofcarJpg.split(','):[]">
-							<u--image :showLoading="true"
-								:src="item.url ? item.url : ''"
-								width="80px"
-								height="80px"
-								@click="imageClickCarBody(item.url)">
-								<view slot="error"
-									style="font-size: 24rpx;">鍔犺浇澶辫触</view>
-							</u--image>
+						<view class="img-container special">
+							<view class="img-container_item"
+								v-for="item in userInfo.bodyCarImg">
+								<u--image :showLoading="true"
+									:src="BaseUrl+item"
+									width="80px"
+									height="80px"
+									@click="imageClickCarBody(item)">
+									<view slot="error"
+										style="font-size: 24rpx;">鍔犺浇澶辫触</view>
+								</u--image>
+							</view>
+						</view>
+						<view style="display: flex;align-items: center;height: 100%; width: 150rpx;"
+							v-if='userInfo.bodyCarImg?(userInfo.bodyCarImg.length===0?true:false):true'>
+							鏆傛棤鍥剧墖
 						</view>
 					</view>
 					<view class="car-img">
@@ -149,11 +155,41 @@
 			</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"
 					shape="circle"
 					plain></u-button></view>
+		</view>
+		<!-- 寮曞椤� -->
+		<view class="noob-tour"
+			style="margin-top: 80rpx;">
+			<combined-title title="鎿嶄綔鎸囧紩"></combined-title>
+			<u-cell-group>
+				<u-cell title="鏂版墜鎸囧紩"
+					name='1'
+					:clickable="true"
+					@click="noobTour">
+					<u-badge type="primary"
+						value="01"
+						slot='icon'></u-badge>
+					<u-icon slot="value"
+						name="arrow-right"
+						size="30"
+						color="#b8b8b8"></u-icon>
+				</u-cell>
+			</u-cell-group>
+		</view>
+		<!-- 鍥剧墖棰勮寮瑰嚭妗� -->
+		<view class="previewImage-container">
+			<previewImage ref="previewImage"
+				:imgs="driverTourImgList"
+				:saveBtn='false'></previewImage>
 		</view>
 
 		<!-- 鍥剧墖棰勮寮瑰嚭妗� -->
@@ -318,15 +354,32 @@
 				@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 { BaseUrl } from '@/api/publicInterface.js';
-	import { mapMutations } from 'vuex';
+	import { mapMutations, mapState } from 'vuex';
 	import { onlineurl } from '@/api/request.js'
+	import combinedTitle from '@/components/combined-title/combined-title.vue';
+	import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
 	export default {
+		components: {
+			combinedTitle,
+			previewImage
+		},
+		computed: {
+			...mapState(['driverTourImgList']),
+		},
 		data() {
 			return {
 				// 鑾峰彇鐨勫徃鏈鸿鎯�
@@ -388,8 +441,19 @@
 					weight: {
 						type: 'number',
 						required: true,
-						message: '璇峰~鍐欎綋閲�',
-						trigger: ['blur', 'change']
+						trigger: ['blur', 'change'],
+						transform(value) {
+							return Number(value);
+						},
+						validator: (rule, value, callback) => {
+							if (!value) {
+								callback(new Error('璇峰~鍐欎綋閲�'))
+							} else if (value > 200) {
+								callback(new Error('璇峰~鍐欏悎鐞嗕綋閲�'))
+							} else {
+								callback()
+							}
+						}
 					},
 					password: {
 						required: false,
@@ -476,6 +540,7 @@
 						value: '钃濊壊'
 					}
 				],
+				initPwdShow: false
 			};
 		},
 		onShow() {
@@ -496,6 +561,9 @@
 				this.$reqGet('getUserEntity').then(res => {
 					uni.hideLoading();
 					this.editUserInfo = this.userInfo = res.data;
+					this.userInfo.bodyCarImg = this.userInfo.bodyofcarJpg ? this.userInfo.bodyofcarJpg.split(',') :
+						[];
+					console.log(this.userInfo.bodyCarImg);
 					this.editUserInfo.password = ""
 					uni.setStorageSync('carImg', this.userInfo.carImg);
 					uni.setStorageSync('drivingImg', this.userInfo.drivingImg);
@@ -545,6 +613,9 @@
 			},
 			imageClickCarBody(url) {
 				this.previewImageSrc = url;
+				this.$nextTick(() => {
+					this.previewImageShow = true;
+				});
 			},
 			beforeRead() {
 				this.changeisUploadimg(true);
@@ -655,6 +726,35 @@
 						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;
 			},
@@ -666,11 +766,8 @@
 			logoutCancel() {
 				this.logoutShow = false;
 			},
-			// 璺宠浆鍙戣繍缁熻椤甸潰
-			statistics() {
-				uni.navigateTo({
-					url: '/pages/customer-page/customer-my/faYunstatistics/faYunstatistics'
-				});
+			noobTour() {
+				this.$refs.previewImage.open('https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj1.jpg')
 			}
 		}
 	};
@@ -846,6 +943,13 @@
 								height: 50rpx;
 							}
 						}
+
+						.special {
+							width: 100%;
+							flex-wrap: wrap;
+							height: 100%;
+							@include flex;
+						}
 					}
 				}
 			}
@@ -888,7 +992,7 @@
 		.editDriverPopup-container {
 			.u-popup {
 				.u-transition {
-					height: 75%;
+					height: 80%;
 
 					.u-popup__content {
 						overflow: scroll !important;

--
Gitblit v1.9.1