From 5fdb1bbeaf94343144f173745e5a470ab440ccf9 Mon Sep 17 00:00:00 2001 From: zxl <763096477@qq.com> Date: 星期二, 05 八月 2025 17:54:36 +0800 Subject: [PATCH] 供应商,登录同步电话,首页进度条 --- pages/tabbar/index/home.vue | 23 +++++++++++++++++------ 1 files changed, 17 insertions(+), 6 deletions(-) diff --git a/pages/tabbar/index/home.vue b/pages/tabbar/index/home.vue index b8f0128..1214d3a 100644 --- a/pages/tabbar/index/home.vue +++ b/pages/tabbar/index/home.vue @@ -39,6 +39,8 @@ :object-fit="item.videoFit" :enable-progress-gesture="false" :show-center-play-btn="false" + :show-progress="true" + :show-fullscreen-btn="true" class="video-item" @play="onPlay(item.id, index)" @pause="onPause(index)" @@ -56,9 +58,10 @@ :style="{bottom: marginBottom + 'px'}" class="container"> <!-- 杩涘害鏉� - 鏁翠釜鍖哄煙鍙嫋鍔� --> - <view class="process-warp" :style="{ opacity: showProcess ? 1 : 0 }"> + <!-- <view class="process-warp" :style="{ opacity: showProcess ? 1 : 0 }"> --> + <view class="process-warp"> <!-- 鏄剧ず褰撳墠杩涘害 --> - <view class="progress-text">{{ hasPlayTime }}/{{formartDuration}}</view> + <view v-show="isTouch" class="progress-text">{{ hasPlayTime }}/{{formartDuration}}</view> <view class="progress-bar" id="progressBar" @@ -276,6 +279,7 @@ }, data() { return { + isTouch:false, userId :'', currentImgIndex: 0, // 鎾斁鍒扮鍑犲紶鍥�--绱㈠紩 currentGoodsIndex: 0, // 鎾斁鍒扮鍑犱釜鍟嗗搧--绱㈠紩 @@ -289,7 +293,7 @@ barWidth: 0, // 杩涘害鏉″搴� isDragging: false, // 鏄惁姝e湪鎷栧姩 processHidenTimer: null, // 杩涘害鏉¢殣钘忓畾鏃跺櫒 - showProcess: false, // 鏄惁鏄剧ず杩涘害鏉� + showProcess: true, // 鏄惁鏄剧ず杩涘害鏉� videoNoMore: false, // 鏄惁杩樻湁鏇村瑙嗛 commentNoMore: false, // 鏄惁杩樻湁鏇村璇勮 commentQuery: { @@ -1090,6 +1094,7 @@ handleTouchStart(e) { this.isDragging = true; this.showProcess = true; + this.isTouch = true; this.startProgress = this.progress; // 璁板綍寮�濮嬫椂鐨勮繘搴� this.startX = e.touches[0].pageX; console.log("璁板綍寮�濮嬫椂鐨勮繘搴�", this.startProgress); @@ -1113,7 +1118,8 @@ videoContext.seek(this.duration * this.progress / 100) videoContext.play() this.processHidenTimer = setTimeout(() => { - this.showProcess = false; + // this.showProcess = true; + this.isTouch = false; }, 1000); }, @@ -1555,16 +1561,21 @@ .progress-bar { position: relative; width: 100%; - height: 16px; - background-color: #eee; + height: 5px; + background-color: rgba(255, 255, 255, 0.2); /* 鍗婇�忔槑鑳屾櫙 */ overflow: hidden; + border-radius: 1.5px; + cursor: pointer; + transition: height 0.2s; } .progress-fill { + position: absolute; left: 0; top: 0; height: 100%; + border-radius: 2px; background-color: lightgray; transition: width 0.1s; } -- Gitblit v1.8.0