From 0c94177318838593ec4dd89f7f85ab92ea5a001d Mon Sep 17 00:00:00 2001
From: qingyiay <2386314947@qq.com>
Date: 星期四, 31 八月 2023 09:29:31 +0800
Subject: [PATCH] 首页增加新手指导
---
pages/driver-page/driver-index/driver-index.vue | 150 ++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 139 insertions(+), 11 deletions(-)
diff --git a/pages/driver-page/driver-index/driver-index.vue b/pages/driver-page/driver-index/driver-index.vue
index 13f4f87..8d9eed3 100644
--- a/pages/driver-page/driver-index/driver-index.vue
+++ b/pages/driver-page/driver-index/driver-index.vue
@@ -2,9 +2,9 @@
<view class="">
<view class="driver-index">
<view class="driver-index-body">
- <!-- 寰呴鍙栨彁鐓ゅ崟 -->
+ <!-- 寰呴鍙栭�氱煡鍗� -->
<view class="wait-collection"
- style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/diverbanner.png') no-repeat;background-size:contain">
+ :style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/diverbanner.png)`, backgroundSize: 'contain', backgroundRepeat: 'no-repeat' }">
</view>
<view class="collection-form">
<view class="collection-form-item"
@@ -71,9 +71,9 @@
@cancel="qiangDanCancel"></u-modal>
</view>
- <!-- 寰呴绾︽彁鐓ゅ崟 -->
+ <!-- 寰呴绾﹂�氱煡鍗� -->
<view class="wait-appointment">
- <combined-title title="寰呴绾︽彁鐓ゅ崟"></combined-title>
+ <combined-title title="寰呴绾﹂�氱煡鍗�"></combined-title>
<u-empty mode="data"
icon="http://cdn.uviewui.com/uview/empty/data.png"
textSize="30"
@@ -149,9 +149,9 @@
</view>
</view>
- <!-- 宸查绾︽彁鐓ゅ崟 -->
+ <!-- 宸查绾﹂�氱煡鍗� -->
<view class="Reserved">
- <combined-title title="宸查绾︽彁鐓ゅ崟"></combined-title>
+ <combined-title title="宸查绾﹂�氱煡鍗�"></combined-title>
<u-empty mode="data"
icon="http://cdn.uviewui.com/uview/empty/data.png"
textSize="30"
@@ -226,6 +226,53 @@
</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>
+ </view>
</view>
</view>
</view>
@@ -234,7 +281,7 @@
<script>
import { customerId } from '@/utils/status';
import combinedTitle from '@/components/combined-title/combined-title.vue';
-
+ import { onlineurl } from '@/api/request.js'
export default {
components: {
combinedTitle
@@ -254,6 +301,16 @@
immediate: true
}
},
+ computed: {
+ roleType() {
+ return uni.getStorageSync('roleType');
+ },
+ imageStyle() {
+ return {
+ transition: this.transition ? 'transform 0.3s ease' : 'none'
+ }
+ }
+ },
data() {
return {
driverBillOfLoadingData: {
@@ -269,7 +326,15 @@
fleetId: '',
xsUserId: '',
customerId: '',
- coalStatus: ['鏈О閲�', '绉伴噸涓�', '楠岃川涓�', '绉伴噸瀹屾垚']
+ 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
};
},
onShow() {
@@ -346,7 +411,7 @@
url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${value.id}&yyId=${value.yyId}`
});
},
- // 鎻愮叅鍗曡鎯�
+ // 閫氱煡鍗曡鎯�
cardBodyClick(name) {
uni.navigateTo({
url: `/pages/driver-page/driver-index/bill-of-lading-details/bill-of-lading-details?orderPlanId=${name}`
@@ -357,7 +422,49 @@
uni.navigateTo({
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
+ })
+ },
+ 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>
@@ -455,7 +562,7 @@
.driver-index-body {
// margin-bottom: vww(56);
- // 寰呴鍙栨彁鐓ゅ崟
+ // 寰呴鍙栭�氱煡鍗�
.wait-collection {
width: 100%;
height: 600rpx;
@@ -846,6 +953,27 @@
margin-top: vww(10);
}
}
+
+ .noob-tour {
+ margin-bottom: vww(50);
+ }
+
+ .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;
+ }
+ }
+ }
+ }
+ }
+ }
}
}
</style>
\ No newline at end of file
--
Gitblit v1.9.1