From 5bebf53d62c3519cf7be3e2217c5249e540173ec Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期四, 07 九月 2023 17:09:08 +0800
Subject: [PATCH] 操作指引修改

---
 pages/driver-page/driver-index/driver-index.vue |  170 +++++++++++++++++++++++---------------------------------
 1 files changed, 71 insertions(+), 99 deletions(-)

diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue
index 8d9eed3..2e15b18 100644
--- a/pages/driver-page/driver-index/driver-index.vue
+++ b/pages/driver-page/driver-index/driver-index.vue
@@ -6,6 +6,25 @@
 				<view class="wait-collection"
 					:style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/diverbanner.png)`, backgroundSize: 'contain', backgroundRepeat: 'no-repeat' }">
 				</view>
+				<!-- 寮曞椤� -->
+				<view class="noob-tour"
+					v-if="roleType===3&&isFirstLogin">
+					<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="collection-form">
 					<view class="collection-form-item"
 						v-for="(item, index) in driverBillOfLoadingData.list1"
@@ -226,52 +245,11 @@
 					</view>
 					<view class="white-block"></view>
 				</view>
-
-				<!-- 寮曞椤� -->
-				<view class="noob-tour">
-					<combined-title title="鎿嶄綔鎸囧紩"></combined-title>
-					<u-cell-group>
-						<u-cell v-if="roleType===3"
-							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/driver/'+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>
+					<previewImage ref="previewImage"
+						:imgs="TourImgList"
+						:saveBtn='false'></previewImage>
 				</view>
 			</view>
 		</view>
@@ -282,9 +260,12 @@
 	import { customerId } from '@/utils/status';
 	import combinedTitle from '@/components/combined-title/combined-title.vue';
 	import { onlineurl } from '@/api/request.js'
+	import { BaseUrl } from '@/api/publicInterface.js'
+	import previewImage from '@/components/kxj-previewImage/kxj-previewImage.vue';
 	export default {
 		components: {
-			combinedTitle
+			combinedTitle,
+			previewImage
 		},
 		props: {
 			indexdriverBillOfLoadingData: {
@@ -299,17 +280,12 @@
 				},
 				deep: true,
 				immediate: true
-			}
+			},
 		},
 		computed: {
 			roleType() {
 				return uni.getStorageSync('roleType');
 			},
-			imageStyle() {
-				return {
-					transition: this.transition ? 'transform 0.3s ease' : 'none'
-				}
-			}
 		},
 		data() {
 			return {
@@ -328,13 +304,16 @@
 				customerId: '',
 				coalStatus: ['鏈О閲�', '绉伴噸涓�', '楠岃川涓�', '绉伴噸瀹屾垚', '楠岃川瀹屾垚'],
 				onlineurl,
-				previewImageShow: false,
-				previewImageSrc: '',
-				TourImgList: ['sj1.jpg', 'sj2.jpg', 'sj3.jpg', 'sj4.jpg', 'sj5.jpg', 'sj6.jpg', 'sj7.jpg'],
-				imgIndex: 0,
-				startX: 0, // 瑙︽懜璧峰鐐圭殑X鍧愭爣
-				endX: 0, // 瑙︽懜缁撴潫鐐圭殑X鍧愭爣
-				transition: false
+				TourImgList: ['https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj1.jpg',
+					'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj2.jpg',
+					'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj3.jpg',
+					'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj4.jpg',
+					'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj5.jpg',
+					'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj6.jpg',
+					'https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj7.jpg'
+				],
+				phone: "",
+				isFirstLogin: true //鏄惁鏄涓�娆$櫥褰�
 			};
 		},
 		onShow() {
@@ -351,6 +330,7 @@
 			},
 			init() {
 				this.qiangDanList();
+				this.getLogOn()
 			},
 			// 鍙告満棣栭〉鍒楄〃
 			qiangDanList() {
@@ -423,48 +403,28 @@
 					url: `/pages/driver-page/appointment/appointment?takeCoalId=${value.id}&filedId=${value.filedId}&deptId=${value.deptId}&sendDate=${value.sendDate}`
 				});
 			},
-			noobTour(v) {
-				this.$nextTick(() => {
-					this.previewImageShow = true
-					this.imgIndex = 0
+			noobTour() {
+				this.$refs.previewImage.open('https://mx.jzeg.cn:9095/appimg/image/tour/driver/sj1.jpg')
+			},
+			getLogOn() {
+				this.$reqGet('getUserEntity').then(res => {
+					this.phone = res.data.phone
+				}).then(() => {
+					uni.request({
+						url: `${BaseUrl}/admin/log/getLogOnType?phone=${this.phone}`,
+						success: res => {
+							// res.data.data 涓�1 浠h〃绗竴娆$櫥褰�  涓�0鍙栨秷瀛︿範鎸囧紩 涓�2 浠h〃瀛樺湪
+							if (res.data.data === 1) {
+								this.noobTour()
+							} else if (res.data.data === 2) {
+								this.isFirstLogin = true
+							} else {
+								this.isFirstLogin = false
+							}
+						}
+					});
 				})
 			},
-			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>
@@ -546,6 +506,16 @@
 			text-align: center;
 			line-height: vww(40);
 		}
+	}
+
+	.fade-enter-active,
+	.fade-leave-active {
+		transition: opacity 0.5s;
+	}
+
+	.fade-enter,
+	.fade-leave-to {
+		opacity: 0;
 	}
 
 	.exceedHide {
@@ -955,7 +925,9 @@
 			}
 
 			.noob-tour {
-				margin-bottom: vww(50);
+				margin-bottom: vww(10);
+				position: relative;
+				top: -240rpx;
 			}
 
 			.u-popup {

--
Gitblit v1.9.1