liujiaxin 1 周之前
父节点
当前提交
56e20e108a

+ 38 - 21
pages_course/living.vue

@@ -84,6 +84,11 @@
 						</view>
 					</view>
 				</view>
+				<view class="videolist">
+					<view class="video" :class="liveItem.showType == 1 ? 'video_row' : ''">
+						<view class="end">直播已结束</view>
+					</view>
+				</view>
 				<view class="videolist" v-if="liveItem.status==4">
 					<view class="video" :class="liveItem.showType == 1 ? 'video_row' : ''">
 						<!-- 直播回放 -->
@@ -191,7 +196,7 @@
 					<view class="left">
 						<image class="w30 h30 mr8" src="/static/images/signal.png" />讲解中
 					</view>
-					<image @click="isShowGoods=false" class="w40 h40 " src="/static/images/del2.png" />
+					<image @click="isShowGoods=false" class="w40 h40 " src="/static/images/del_black.png" />
 				</view>
 
 				<image class="photo" :src="goodsCard.imgUrl" />
@@ -314,7 +319,8 @@
 						<image class="w48 h48" src="/static/images/order.png" />
 						<view style="text-align: center;">兑换好礼</view>
 					</view>
-					<view class=" item" @click="navgetTo('/pages_shopping/live/storeOrderRefundList?liveId='+liveId),isMore=false">
+					<view class=" item"
+						@click="navgetTo('/pages_shopping/live/storeOrderRefundList?liveId='+liveId),isMore=false">
 						<image class="w48 h48" src="/static/images/after_sales.png" />
 						<view style="text-align: center;">售后订单</view>
 					</view>
@@ -451,7 +457,7 @@
 		},
 		data() {
 			return {
-				isMore:false,
+				isMore: false,
 				value: '',
 				totalTraffic: 0, // 总流量(字节)
 				bitrate: 1600, // 默认码率 0.16Mbps
@@ -499,7 +505,6 @@
 
 				keyboardHeight: 0,
 				videoCurrentTime: 0, // 当前视频播放时间
-				isVideoPlaying: false, // 视频是否正在播放
 				videoProgressKey: '', // 存储进度的key
 				inAndOut: {},
 
@@ -793,11 +798,7 @@
 				e.stopPropagation();
 				return false;
 			},
-			finishTime() {
-				if (this.liveItem.finishTime) {
 
-				}
-			},
 			// 清理所有定时器
 			clearAllTimers() {
 				if (this.liveViewDataTimer) {
@@ -1262,15 +1263,12 @@
 						videoContext.play();
 					}, 100);
 				}
-				// this.isVideoPlaying = false;
 				// 暂停时保存进度
 				this.saveVideoProgress();
 			},
 
 			// 视频播放
-			onVideoPlay(e) {
-				// this.isVideoPlaying = true;
-			},
+			onVideoPlay(e) {},
 			// 设置视频当前时间
 			// setVideoCurrentTime(time) {
 			// 	if (!time) return;
@@ -1299,7 +1297,6 @@
 
 			// 点击红包
 			onRed() {
-
 				if (!this.liveId) return;
 				if (!this.redInfo?.redId) return;
 				if (this.redTimer) {
@@ -1636,7 +1633,6 @@
 				if (this.videoRetryCounts[liveItem.liveId] === undefined) {
 					this.videoRetryCounts[liveItem.liveId] = 0;
 				}
-
 				// 限制重试次数
 				if (this.videoRetryCounts[liveItem.liveId] >= 3) {
 					console.error(`直播间 ${this.liveId} 视频加载失败,停止重试`);
@@ -1817,7 +1813,6 @@
 				const param = {
 					id: liveId
 				};
-
 				try {
 					const res = await getlive(param);
 					if (res.code !== 200) {
@@ -1827,7 +1822,6 @@
 						});
 						return;
 					}
-
 					this.liveItem = Object.assign({}, this.liveItem, res.data);
 					this.talklist = Array.isArray((res.data || {}).talklist) ? res.data.talklist : [];
 					this.startTimeTimer(this.liveItem);
@@ -1874,7 +1868,6 @@
 					await this.getLiveMsg(this.liveItem);
 					await this.getliveViewData(this.liveItem);
 
-
 					this.$set(this.liveItem, 'autoplay', res.data.liveType !== 0);
 					this.$set(this.liveItem, 'showType', res.data.showType);
 					this.storeId = res.storeId;
@@ -2006,7 +1999,7 @@
 			closeShop() {
 				this.shopping = false;
 			},
-			closeMore(){
+			closeMore() {
 				this.isMore = false;
 			},
 			// 关闭WebSocket连接(isManual:是否手动关闭)
@@ -2151,7 +2144,7 @@
 				// 将time转换为毫秒级时间戳
 				let timeStamp;
 				// 如果time是数字且合理(毫秒级时间戳通常为13位左右的正数),视为有效时间戳
-				if (typeof time === 'number' && time > 0 && time < 9999999999999) { // 上限约为3000年
+				if (typeof time === 'number' && time > 0 && time < 9999999999999) {
 					timeStamp = time;
 				}
 				//如果是字符串,尝试解析为日期后转为时间戳
@@ -2553,6 +2546,10 @@
 	}
 
 	.talk-list {
+		will-change: transform; // 提示浏览器优化
+		contain: layout style paint; // 限制渲染范围
+
+
 		max-width: 100%;
 		border-radius: 30rpx;
 		background-color: rgba(33, 33, 33, 0.5);
@@ -2609,6 +2606,11 @@
 			}
 		}
 
+		// 减少重绘
+		.side-group,
+		.content-top {
+			will-change: transform;
+		}
 
 		.side-group {
 			position: absolute;
@@ -2740,9 +2742,14 @@
 		width: 100%;
 
 		.video {
+			transform: translateZ(0);
+			backface-visibility: hidden;
+			perspective: 1000;
+
+
 			height: 100vh;
 			width: 100%;
-			background-color: rgba(57, 57, 57, 0.4);
+			// background-color: rgba(57, 57, 57, 0.4);
 
 			.item {
 				width: 100%;
@@ -2756,6 +2763,15 @@
 				margin-left: 10rpx;
 			}
 
+			.end{
+				position: absolute;
+				top: 50%;
+				right: 50%;
+				transform: translate(-50%,-50%);
+				font-size: 36rpx;
+				color: #fff;
+			}
+
 			.lable {
 				position: absolute;
 				top: 50rpx;
@@ -3278,7 +3294,8 @@
 		padding: 70rpx 30rpx;
 		display: flex;
 		justify-content: space-between;
-		.item{
+
+		.item {
 			text-align: center;
 		}
 	}

+ 1 - 1
pages_course/livingList.vue

@@ -134,7 +134,7 @@
 
 				.info {
 					position: absolute;
-					
+					box-sizing: border-box;
 					width: 100%;
 					bottom: 0;
 					padding: 20rpx;

+ 1 - 39
pages_shopping/live/goods.vue

@@ -2,7 +2,6 @@
 	<view class="">
 		<view class="content" v-cloak>
 			<view class="shop-banner">
-
 				<view class="shop-banner" @click="showImg()">
 					<swiper class="swiper" :indicator-dots="false" :circular="true" :autoplay="true" :interval="3000"
 						:duration="1000" indicator-color="rgba(255, 255, 255, 0.6)" indicator-active-color="#ffffff"
@@ -16,13 +15,6 @@
 					<!-- 数量 -->
 					<view class="num-box">{{ activeBanner }}/{{ banner.length }}</view>
 				</view>
-
-				<!-- <view class="swiper">
-					<view class="swiper-item">
-						<image :src="goosDetail.image" mode="aspectFill"></image>
-						
-					</view>
-				</view> -->
 			</view>
 			<!-- 详细信息 -->
 			<view class="det-info">
@@ -701,37 +693,7 @@
 				}
 			}
 
-			// .share-box{
-			// 	width: 120rpx;
-			// 	height: 46rpx;
-			// 	border: 1px solid #0bb3f2;
-			// 	border-radius: 23rpx;
-			// 	display: flex;
-			// 	align-items: center;
-			// 	justify-content: center;
-			// 	position: relative;
-			// 	.text{
-			// 		font-size: 26rpx;
-			// 		font-family: PingFang SC;
-			// 		font-weight: 500;
-			// 		color: #0bb3f2;
-			// 	}
-			// 	image{
-			// 		margin-left: 2rpx;
-			// 		width: 25rpx;
-			// 		height: 24rpx;
-			// 	}
-			// 	.share{
-			// 		display: inline-block;
-			// 		position: absolute;
-			// 		top: 0;
-			// 		left: 0;
-			// 		width: 100%;
-			// 		height: 100%;
-			// 		opacity: 0;
-			// 	}
-			// }
-
+			
 			.spec {
 				font-size: 24rpx;
 				font-family: PingFang SC;

+ 2 - 2
pages_shopping/live/refundOrder.vue

@@ -265,7 +265,7 @@
 										display: inline-block;
 										padding: 0 6upx;
 										height: 30upx;
-										background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 100%);
+										background: linear-gradient(90deg, #30decd 0%, #2BC7B9 100%);
 										border-radius: 4upx;
 										margin-right: 10upx;
 										font-size: 22upx;
@@ -543,7 +543,7 @@
 			font-family: PingFang SC;
 			font-weight: bold;
 			color: #FFFFFF;
-			background: #0bb3f2;
+			background: #2BC7B9;
 			border-radius: 44upx;
 		}
 	}

+ 1 - 1
pages_shopping/live/refundOrderProduct.vue

@@ -135,7 +135,7 @@
 									display: inline-block;
 									padding: 0 6rpx;
 									height: 30rpx;
-									background: linear-gradient(90deg, #66b2ef 0%, #0bb3f2 100%);
+									background: linear-gradient(90deg, #2ed9c8 0%, #2BC7B9 100%);
 									border-radius: 4rpx;
 									margin-right: 10rpx;
 									font-size: 22rpx;

+ 0 - 1
pages_shopping/live/storeOrderDetail.vue

@@ -279,7 +279,6 @@
 				orderCode: '',
 				// 状态栏的高度
 				statusBarHeight: uni.getStorageSync('menuInfo').statusBarHeight,
-
 			};
 		},
 		onLoad(option) {

+ 77 - 46
pages_shopping/live/success.vue

@@ -31,52 +31,83 @@
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				order: null,
-				orderCode: "",
-				ids: []
-			}
-		},
-		onLoad(option) {
-			console.log("options是", option)
-			// this.order=JSON.parse(decodeURIComponent(option.order))
-			this.order = JSON.parse(decodeURIComponent(option.order))
-			console.log("this.order是", this.order)
-			// orderCodes和ids字段表示店铺订单
-			this.orderCode = this.order.orderCode || '';
-			this.orderId = this.order.orderId ? this.order.orderId : '';
-			// this.ids = this.order && this.order.ids ? this.order.ids : this.order.orderid?  [this.order.orderid] : [];
-		},
-		methods: {
-			copyOrderSn(text) {
-				// 复制方法
-				uni.setClipboardData({
-					data: text,
-					success: () => {
-						uni.showToast({
-							title: '内容已成功复制到剪切板',
-							icon: 'none'
-						})
-					}
-				});
-			},
-			goOrderDetails(id) {
-				console.log("id是", id)
-				if (id) {
-					uni.redirectTo({
-						url: "./storeOrderDetail?id=" + id
-					})
-
-				} else {
-					uni.navigateTo({
-						url: './order'
-					})
-				}
-			}
-		}
-	}
+export default {
+  data() {
+    return {
+      order: null,
+      orderCode: "",
+      ids: []
+    }
+  },
+  onLoad(option) {
+    console.log("options是", option)
+    this.order = JSON.parse(decodeURIComponent(option.order))
+    console.log("this.order是", this.order)
+    
+    // orderCodes和ids字段表示店铺订单
+    this.orderCode = this.order.orderCode || '';
+    this.orderId = this.order.orderId ? this.order.orderId : '';
+    
+    // 转换时间格式
+    this.formatCreateTime();
+  },
+  methods: {
+    // 格式化创建时间
+    formatCreateTime() {
+      if (this.order && this.order.createTime) {
+        // 如果已经是时间戳格式
+        if (/^\d+$/.test(this.order.createTime)) {
+          const timestamp = parseInt(this.order.createTime);
+          this.order.createTime = this.formatDate(timestamp);
+        } 
+        // 如果是其他日期字符串格式
+        else {
+          const timestamp = new Date(this.order.createTime).getTime();
+          this.order.createTime = this.formatDate(timestamp);
+        }
+      }
+    },
+    
+    // 格式化日期
+    formatDate(timestamp) {
+      const date = new Date(timestamp);
+      const year = date.getFullYear();
+      const month = (date.getMonth() + 1).toString().padStart(2, '0');
+      const day = date.getDate().toString().padStart(2, '0');
+      const hours = date.getHours().toString().padStart(2, '0');
+      const minutes = date.getMinutes().toString().padStart(2, '0');
+      const seconds = date.getSeconds().toString().padStart(2, '0');
+      
+      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+    },
+    
+    copyOrderSn(text) {
+      // 复制方法
+      uni.setClipboardData({
+        data: text,
+        success: () => {
+          uni.showToast({
+            title: '内容已成功复制到剪切板',
+            icon: 'none'
+          })
+        }
+      });
+    },
+    
+    goOrderDetails(id) {
+      console.log("id是", id)
+      if (id) {
+        uni.redirectTo({
+          url: "./storeOrderDetail?id=" + id
+        })
+      } else {
+        uni.navigateTo({
+          url: './order'
+        })
+      }
+    }
+  }
+}
 </script>
 
 <style lang="scss">

二进制
static/images/del_black.png