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 |   42 +++++++++++++++++++++++++++++++++---------
 1 files changed, 33 insertions(+), 9 deletions(-)

diff --git a/pages/tabbar/index/home.vue b/pages/tabbar/index/home.vue
index dca4875..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"
@@ -189,7 +192,7 @@
 			<view style="display: flex;">
 				<image class="comment-avatar" :src="comment.userAvatar || '/static/default-avatar.png'"></image>
 				<view class="comment-content">
-				  <text class="nickname">{{comment.userNickname}}</text>
+				  <text class="nickname">{{comment.userNickname}} <text v-if="userId===comment.userId">(鎴�)</text> </text>
 				  <text class="content">{{comment.commentContent}}</text>
 				  <view style="position: relative;">
 					<text class="time">{{formatTime(comment.createTime)}}</text>
@@ -205,8 +208,8 @@
 				  <view class="reply-content">
 					<view style="display: flex;">
 						<image class="comment-reply-avatar" :src="reply.replyUserAvatar || '/static/default-avatar.png'"></image>
-						<text class="nickname">{{reply.userNickname}}</text>
-						<text v-if="reply.replyUserId && reply.masterCommentId !== reply.replyId" class="reply-to"><text style="margin-right: 10rpx;font-size: 28rpx;" class="iconfont">&#xe666;</text>{{reply.replyUserNickname}}</text>
+						<text class="nickname">{{reply.userNickname}}<text v-if="userId===comment.userId">(鎴�)</text></text>
+						<text v-if="reply.replyUserId && reply.masterCommentId !== reply.replyId" class="reply-to"><text style="margin-right: 10rpx;font-size: 28rpx;" class="iconfont">&#xe666;</text>{{reply.replyUserNickname}}<text v-if="userId===comment.userId">(鎴�)</text></text>
 					</view>
 					<text class="content">{{reply.commentContent}}</text>
 					<view class="reply-footer">
@@ -276,6 +279,8 @@
   },
   data() {
     return {
+		isTouch:false,
+		userId :'',
 		currentImgIndex: 0, // 鎾斁鍒扮鍑犲紶鍥�--绱㈠紩
 		currentGoodsIndex: 0, // 鎾斁鍒扮鍑犱釜鍟嗗搧--绱㈠紩
 		currentTime: 0,
@@ -288,7 +293,7 @@
 		barWidth: 0, // 杩涘害鏉″搴�
 		isDragging: false, // 鏄惁姝e湪鎷栧姩
 		processHidenTimer: null, // 杩涘害鏉¢殣钘忓畾鏃跺櫒
-		showProcess: false, // 鏄惁鏄剧ず杩涘害鏉�
+		showProcess: true, // 鏄惁鏄剧ず杩涘害鏉�
 		videoNoMore: false, // 鏄惁杩樻湁鏇村瑙嗛
 		commentNoMore: false, // 鏄惁杩樻湁鏇村璇勮
 		commentQuery: {
@@ -359,6 +364,9 @@
     }
   },
   onShow() {
+	  if(!this.userId){
+		  this.getUserId()
+	  }
 	  // const token = storage.getAccessToken();
 	  // if (! token) {
 		 //  this.wxSilentLogin(() => {
@@ -368,6 +376,9 @@
 	  // 	  this.loadVideos();
 	  // }
 	  if (this.videoList.length < 1) {
+		  this.loading = false;
+		  this.videoNoMore = false;
+		  console.log('瑙﹀彂鏁版嵁鍔犺浇')
 		  this.loadVideos();
 	  }
 	  // 濡傛灉瑙嗛鎸変笅鏆傚仠鍚庡垏鎹㈤〉闈㈠啀鍥炲埌椤甸潰鏃讹紝鍙畻鏆傚仠鏃堕棿锛堝洜涓烘殏鍋滄椂闂村拰绂诲紑椤甸潰鏃堕棿鏄噸澶嶇殑锛屽彧绠椾竴涓級
@@ -380,6 +391,7 @@
   	this.startHidenTime = Date.now()
   },
   onLoad(option) {
+
 	  console.log('-----------鍒嗕韩鍑虹殑鏁版嵁---------->',option)
 	  //澶勭悊鎵爜鍑烘潵鐨勮棰�
 	  this.marginBottom = uni.getSystemInfoSync().safeAreaInsets.bottom
@@ -439,6 +451,10 @@
   	}
   },
   methods: {  
+	  getUserId(){
+		  const {id} = uni.getStorageSync('user_info_obj_dev')
+		  this.userId = id;
+	  },
 	  // 瑙f瀽URL鍙傛暟
     parseUrlParams(url) {
       const params = {};
@@ -758,6 +774,7 @@
 		  getVideoComments(this.commentQuery).then(res => {
 			  this.commentsTotal = res.data.total;
 			  this.comments = res.data.data;
+			  console.log('------------------------>',this.comments)
 			  this.commentQuery.pageNumber += 2;
 			  this.commentQuery.pageSize /= 2;
 		  }).catch(() => {
@@ -1077,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);
@@ -1100,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);
 	},
 
@@ -1542,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