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 | 149 +++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 131 insertions(+), 18 deletions(-) diff --git a/pages/customer-page/customer-index/customer-index.vue b/pages/customer-page/customer-index/customer-index.vue index e7df02e..fc96467 100644 --- a/pages/customer-page/customer-index/customer-index.vue +++ b/pages/customer-page/customer-index/customer-index.vue @@ -2,7 +2,7 @@ <view class=""> <view class="customer-index"> <view class="customer-index-body"> - <!-- 寰呴鍙栧拰杞彂鎻愮叅鍗� --> + <!-- 寰呴鍙栧拰杞彂閫氱煡鍗� --> <view class="wait-collection" :style="{ backgroundImage: `url(${onlineurl}/appimg/image/banner/customerbanner.png)`, backgroundSize: 'contain', backgroundRepeat: 'no-repeat' }"> </view> @@ -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"> @@ -72,9 +72,9 @@ </view> </view> - <!-- 鍘嗗彶鎻愮叅鍗� --> + <!-- 鍘嗗彶閫氱煡鍗� --> <view class="history-numbers"> - <combined-title title="鍘嗗彶鎻愮叅鍗�"></combined-title> + <combined-title title="鍘嗗彶閫氱煡鍗�"></combined-title> <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @@ -111,7 +111,7 @@ v-else-if="roleType == 2">{{ item.carNumSurplus }}</view> </view> <view class="third-line"> - <view class="third-line_text">鎻愮叅鍗曚釜鏁�:</view> + <view class="third-line_text">閫氱煡鍗曚釜鏁�:</view> <view class="third-line_num">{{ item.tmCount }}</view> </view> </view> @@ -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" @@ -163,7 +208,6 @@ <script> import { onlineurl } from '@/api/request.js' - import card from '@/components/card/card.vue'; import combinedTitle from '@/components/combined-title/combined-title.vue'; import { customerId } from '@/utils/status'; export default { @@ -174,7 +218,6 @@ } }, components: { - card, combinedTitle }, watch: { @@ -194,7 +237,7 @@ data() { return { orderPlanData: [], - show: false, // 棰嗗彇鎻愮叅鍗曞脊鍑烘 + show: false, // 棰嗗彇閫氱煡鍗曞脊鍑烘 receiveNum: null, getOrderNum: { num: '', @@ -214,10 +257,17 @@ showMoreData: false, cars2: "", carNum: "", - // 鍓╀綑鐨勬彁鐓ゅ崟鏁伴噺 + // 鍓╀綑鐨勯�氱煡鍗曟暟閲� 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() {}, @@ -240,7 +290,7 @@ } }); }, - // 鑾峰彇鍘嗗彶鎻愮叅鍗� + // 鑾峰彇鍘嗗彶閫氱煡鍗� getJhOrderPlanDataPage() { uni.showLoading({ title: '鍔犺浇涓�' @@ -265,7 +315,7 @@ this.pageCurrent++; this.getJhOrderPlanDataPage(); }, - //fix 鐐瑰嚮鎻愮叅鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁 + //fix 鐐瑰嚮閫氱煡鍗曡繑鍥炰細澧炲姞閲嶅鏁版嵁 ArrSet(Arr, id) { var obj = {}; const arrays = Arr.reduce((setArr, item) => { @@ -313,7 +363,7 @@ */ receiveClick(item) { this.show = true; - this.getOrderNum.id = item.id; // 鑾峰彇棰嗗彇鎻愮叅鍗曠殑id + this.getOrderNum.id = item.id; // 鑾峰彇棰嗗彇閫氱煡鍗曠殑id this.cars2 = item.cars2 this.carNum = item.carNum }, @@ -326,15 +376,15 @@ console.log('杈撳叆妗�', e); this.canClick = e > (this.carNum - this.cars2) if (this.canClick) { - this.$u.toast('宸茶秴杩囧綋鍓嶆棩璁″垝鎻愮叅鍗曟暟閲�,璇烽噸鏂拌緭鍏�') + this.$u.toast('宸茶秴杩囧綋鍓嶆棩璁″垝閫氱煡鍗曟暟閲�,璇烽噸鏂拌緭鍏�') } }, - // 鎻愮叅鍗曡鎯� + // 閫氱煡鍗曡鎯� cardBodyClick(v) { uni .navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&code=${v.code}&cars2=${v.cars2?v.cars2:""}` }); }, - // 鐐瑰嚮鍘嗗彶鎻愮叅鍗曡幏鍙栬鎯� + // 鐐瑰嚮鍘嗗彶閫氱煡鍗曡幏鍙栬鎯� faYundetail(v) { uni.navigateTo({ url: `/pages/customer-page/customer-index/fayunPlanDetails/fayunPlanDetails?orderPlanId=${v.id}&cars2=${v.cars2}&coalName=${v.coalName}&deptName=${v.deptName}` @@ -351,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> @@ -483,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