From 0c94177318838593ec4dd89f7f85ab92ea5a001d Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期四, 31 八月 2023 09:29:31 +0800
Subject: [PATCH] 首页增加新手指导

---
 pages/customer-page/customer-index/customer-index.vue |  123 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 119 insertions(+), 4 deletions(-)

diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue
index 49837bf..fc96467 100644
--- a/pages/customer-page/customer-index/customer-index.vue
+++ b/pages/customer-page/customer-index/customer-index.vue
@@ -37,12 +37,12 @@
 							</view>
 						</view>
 						<view class="third-line">
-							<view class="time-icon">
+							<!-- <view class="time-icon">
 								<view
 									:style="{backgroundImage: `url(${onlineurl}/appimg/image/banner/carNO.png)`,backgroundSize: 'cover',backgroundRepeat: 'no-repeat',width:'24rpx',height:'24rpx',lineHeight:'24rpx'}">
 								</view>
-							</view>
-							<view class="car-num">{{ item.carNos||item.carNo||''}}</view>
+							</view> -->
+							<view class="car-num">{{ item.code||''}}</view>
 						</view>
 						<view class="third-line">
 							<view class="time-icon">
@@ -138,6 +138,51 @@
 					</scroll-view>
 				</view>
 			</view>
+			<!-- 寮曞椤� -->
+			<view class="noob-tour">
+				<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">
+				<u-popup :show="previewImageShow"
+					mode="center"
+					@close="previewImageClose"
+					@open="previewImageOpen"
+					:closeable='true'>
+					<view class="image-container"
+						@touchstart="touchStart"
+						@touchmove="touchMove"
+						@touchend="touchEnd">
+						<u--image :src="onlineurl+'/appimg/image/tour/quality/'+TourImgList[imgIndex]"
+							width="400px"
+							height="700px"
+							@click='closeImg'
+							mode='widthFix'
+							:style="imageStyle">
+							<view slot="error"
+								style="font-size: 48rpx;">鍔犺浇澶辫触</view>
+						</u--image>
+						<view class=""
+							style="text-align: center;background-color: rgba(0, 0, 0, 0.5);color: white;">
+							{{imgIndex+1}}/{{TourImgList.length}}寮�
+						</view>
+					</view>
+				</u-popup>
+			</view>
 			<!-- 棰嗗彇寮瑰嚭妗� -->
 			<u-popup :show="show"
 				@close="close"
@@ -215,7 +260,14 @@
 				// 鍓╀綑鐨勯�氱煡鍗曟暟閲�
 				carNumSurplus: '',
 				canClick: false,
-				onlineurl: ''
+				onlineurl,
+				previewImageShow: false,
+				previewImageSrc: '',
+				TourImgList: ['quality01.jpg', 'quality02.jpg', 'quality03.jpg', 'quality04.jpg', 'quality05.jpg'],
+				imgIndex: 0,
+				startX: 0, // 瑙︽懜璧峰鐐圭殑X鍧愭爣
+				endX: 0, // 瑙︽懜缁撴潫鐐圭殑X鍧愭爣
+				transition: false
 			};
 		},
 		onLoad() {},
@@ -349,6 +401,48 @@
 				uni
 					.navigateTo({ url: `/pages/driver-page/driver-index/bill-of-lading-details/selectOrderPlan/selectOrderPlan?index=${index}` });
 			},
+			noobTour(v) {
+				this.$nextTick(() => {
+					this.previewImageShow = true
+					this.imgIndex = 0
+				})
+			},
+			touchStart(event) {
+				this.startX = event.touches[0].clientX;
+			},
+
+			touchMove(event) {
+				this.endX = event.touches[0].clientX;
+			},
+			touchEnd(event) {
+				const startX = this.startX;
+				const endX = this.endX;
+				if (startX - endX > 50 && this.imgIndex < this.TourImgList.length - 1) {
+					this.transition = true;
+					this.imgIndex++
+					setTimeout(() => {
+						this.transition = false;
+					}, 300);
+				} else if (endX - startX > 50 && this.imgIndex > 0) {
+					this.transition = true;
+					this.imgIndex--
+					setTimeout(() => {
+						this.transition = false;
+					}, 300);
+				} else if (this.imgIndex === this.TourImgList.length - 1) {
+					return this.$u.toast('杩欐槸鏈�鍚庝竴寮犱簡鍝�')
+				}
+			},
+			closeImg() {
+				this.previewImageShow = false;
+			},
+			/**
+			 * @preview 棰勮鍥剧墖
+			 */
+			previewImageClose() {
+				this.previewImageShow = false;
+			},
+			previewImageOpen() {},
 		}
 	};
 </script>
@@ -481,6 +575,27 @@
 		}
 	}
 
+	.noob-tour {
+		margin-bottom: vww(80);
+	}
+
+	.u-popup {
+		.u-transition {
+			.u-popup__content {
+				.editDriverPopup-container-box {}
+
+				//closeIcon
+				.u-popup__content__close--top-right {
+					.u-icon {
+						.u-icon__icon {
+							font-size: vww(20) !important;
+						}
+					}
+				}
+			}
+		}
+	}
+
 	::v-deep.customer-index {
 		width: 100%;
 		margin: 0 auto;

--
Gitblit v1.9.1