liujiaxin hai 3 semanas
pai
achega
ce845c7d06
Modificáronse 2 ficheiros con 13 adicións e 21 borrados
  1. 11 19
      pages_course/living.vue
  2. 2 2
      pages_shopping/live/goods.vue

+ 11 - 19
pages_course/living.vue

@@ -79,7 +79,7 @@
 								<text class="avatar-initial">{{ getNicknameInitial(item.nickName) }}</text>
 							</view> -->
 						</view>
-						<view class="viewer-count ">{{virtualHuman || 0 }}</view>
+						<view class="viewer-count ">{{formattedWatchCount || 0 }}</view>
 					</view>
 				</view>
 
@@ -687,6 +687,7 @@
 		},
 		data() {
 			return {
+				isNow:false,
 				fakeAvatar: Array.from({
 						length: 11
 					}, (_, i) =>
@@ -927,7 +928,6 @@
 					}
 				} else {
 					console.log("手机型号是>>>>", this.systemInfo.model)
-					console.log("手机高度是>>>>", this.systemInfo.model)
 					// Android处理保持原有逻辑
 					if (res.height > 0) {
 						this.isKeyboardShow = true;
@@ -1036,6 +1036,9 @@
 				this.totalTraffic = 0;
 			}
 			this.startTimer();
+			if(!this.isNow){
+				this.userlogo = true
+			}
 		},
 
 		//分享给好友
@@ -1064,9 +1067,9 @@
 				return this.$store.state.appid
 			},
 			// 观看人数
-			// formattedWatchCount() {
-			// 	return this.formatNumber(this.liveUserTotal || 0);
-			// },
+			formattedWatchCount() {
+				return this.formatNumber(this.virtualHuman || 0);
+			},
 			//点赞人数
 			formattedLikeCount() {
 				return this.formatNumber(this.liveViewData.like || 0);
@@ -1676,7 +1679,7 @@
 
 			// 强制滚动到底部(备用方案)
 			forceScrollToBottom() {
-				console.log('执行强制滚动到底部');
+				// console.log('执行强制滚动到底部');
 
 				// 方案1:直接设置一个很大的scrollTop值
 				this.scrollTop = 999999;
@@ -1753,7 +1756,7 @@
 
 			// 强制滚动到底部(用于发送消息,绕过防抖限制)
 			forceScrollToBottomOnSend() {
-				console.log('执行强制滚动到底部(发送消息专用)');
+				// console.log('执行强制滚动到底部(发送消息专用)');
 
 				// 清理之前的定时器
 				if (this.scrollTimer) {
@@ -2257,6 +2260,7 @@
 					(res) => {
 						if (res.code == 200) {
 							this.userInfo = res.user;
+							this.isNow = dayjs(this.userInfo.updateTime).isSame(dayjs(), 'day')
 						} else {
 							uni.showToast({
 								icon: 'none',
@@ -2982,10 +2986,8 @@
 							this.isShowLottery = this.lotteryInfo && this.lotteryInfo.lotteryStatus == 1;
 
 							if (this.notice.msg) {
-								console.log("有》》》》")
 								this.noticeTimer = setInterval(() => {
 									const noticeCountdown = this.handleTime(this.notice.endTime, 0);
-									console.log("出现1>>>", noticeCountdown)
 									if (!noticeCountdown) {
 										this.isShowNotice = false;
 										clearInterval(this.noticeTimer);
@@ -3110,7 +3112,6 @@
 			},
 
 			pauseVideo() {
-				console.log("暂停了")
 				if (!this.liveItem) return;
 
 				try {
@@ -3660,10 +3661,6 @@
 				// 清除之前的重连定时器
 				this.resetReconnectState();
 
-				// setTimeout(() => {
-				// 	this.getliveUser(false);
-				// }, 1000);
-
 				const now = new Date();
 				this.timestamp = now.getTime(); // 生成签名
 				const signature = CryptoJS.HmacSHA256(
@@ -3986,21 +3983,17 @@
 							}
 						} else if (socketMessage.cmd == 'globalVisible' || socketMessage.cmd == 'singleVisible') {
 							//  status = 1的时候,用户消息自可见,其他消息丢失}
-							console.log("可见性>>>>>", socketMessage)
 							if (socketMessage.status == 1) {
-								console.log("不可见性")
 								this.myselfFlag = true;
 							} else {
 								this.myselfFlag = false;
 							}
 
 						} else if (socketMessage.cmd == 'sendPopMsg') {
-							console.log("弹窗消息>>>>", socketMessage)
 							this.popMsg = socketMessage.msg
 							this.isShowPopMsg = true
 						} else if (socketMessage.cmd == 'sendTopMsg') {
 							clearInterval(this.noticeTimer);
-							console.log("公告消息>>>>", socketMessage)
 							const noticeData = socketMessage.data ? JSON.parse(socketMessage.data) : {};
 							this.notice = noticeData || {};
 							this.isShowNotice = true
@@ -4017,7 +4010,6 @@
 						} else if (socketMessage.cmd == 'entry') {
 							try {
 								if (!this.liveUserCalled) {
-									// await this.getliveUser(false);
 									this.liveUserCalled = true;
 								}
 								const userIdToEntry = socketMessage.userId;

+ 2 - 2
pages_shopping/live/goods.vue

@@ -100,7 +100,7 @@
 
 				<view class="price-num">
 					<view class="label">数量</view>
-					<u-number-box bgColor="#f3f3f3" v-model="goodsNum" @change="goodsNumChange"></u-number-box>
+					<u-number-box bgColor="#f3f3f3" v-model="totalNum" @change="goodsNumChange"></u-number-box>
 				</view>
 				<view class="sub-btn" @click="submit">确定</view>
 			</view>
@@ -133,7 +133,7 @@
 				productId: null,
 				goosDetail: null, //商品详情
 				buyText: "立即购买",
-				goodsNum: 0, //商品选择数量
+				// goodsNum: 0, //商品选择数量
 				// 当前轮播的图片
 				activeBanner: 1,
 				// 规格弹窗