liujiaxin 2 days ago
parent
commit
7e87ab166d

+ 24 - 22
.hbuilderx/launch.json

@@ -1,24 +1,26 @@
-{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
-  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
-    "version": "0.0",
-    "configurations": [{
-     	"app-plus" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"default" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"h5" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"mp-weixin" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"type" : "uniCloud"
-     }
+{
+    // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+    // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version" : "0.0",
+    "configurations" : [
+        {
+            "app-plus" : {
+                "launchtype" : "local"
+            },
+            "default" : {
+                "launchtype" : "local"
+            },
+            "h5" : {
+                "launchtype" : "local"
+            },
+            "mp-weixin" : {
+                "launchtype" : "local"
+            },
+            "type" : "uniCloud"
+        },
+        {
+            "playground" : "standard",
+            "type" : "uni-app:app-android"
+        }
     ]
 }

+ 170 - 261
pages_course/components/liveVideo.vue

@@ -7,19 +7,18 @@
 				<live-player v-if="liveItem.livingUrl && liveItem.liveType == 1" :id="'myLivePlayer_' + liveId"
 					:src="liveItem.livingUrl" autoplay mode="live" object-fit="cover" :muted="false"
 					orientation="vertical" :enable-play-gesture="false" min-cache="1" max-cache="3"
-					@statechange="onLiveStateChange" @error="onLiveError" class="item"
-					:flushed="false" :seek="0"></live-player>
+					@statechange="onLiveStateChange" @error="onLiveError" class="item"></live-player>
 
 				<!-- 录播 -->
 				<video v-if="liveItem.videoUrl && liveItem.liveType == 2" :id="`myVideo_${liveId}`" :autoplay="true"
 					class="item" :src="liveItem.videoUrl" :controls="false"
-					:object-fit="liveItem.showType==2||isFullscreen?'contain':'fill'"
+					:object-fit="liveItem.showType==2||isFullscreen?'contain':'fill'" :custom-cache="false"
 					:enable-progress-gesture="false" vslide-gesture-in-fullscreen="false" :show-center-play-btn="false"
-					loop @error="videoError" @timeupdate="onVideoTimeUpdate"
+					:http-cache="false" loop @error="videoError" @timeupdate="onVideoTimeUpdate"
 					@loadedmetadata="onVideoMetaLoaded" @pause="onVideoPause" @play="onVideoPlay"
-					@waiting="onVideoWaiting" :enable-play-gesture="false"
-					@dblclick="preventDoubleClick" preload="metadata"
-					:initial-time="0" :show-play-btn="false" :show-fullscreen-btn="false" :show-playback-rate-btn="false"></video>
+					@waiting="onVideoWaiting" :enable-play-gesture="false" :play-strategy="1"
+					@dblclick="preventDoubleClick" preload="auto" :enable-stash-buffer="false" :stash-initial-size="0"
+					:stash-max-size="0" :stash-time="0" type="application/x-mpegURL"></video>
 				<view v-if="liveItem.videoUrl && liveItem.liveType == 2" class="time"
 					:class="isFullscreen ? 'look-time' : 'time'">{{ diffTotalTime }}</view>
 				<view class="custom-controls" @click.stop="toggleFullscreen">
@@ -45,24 +44,24 @@
 		<view class="videolist" v-if="liveItem.status == 4">
 			<view class="video" :class="liveItem.showType == 1 ? 'video_row' : ''">
 				<!-- 直播回放 -->
-					<video v-if="liveItem.videoUrl && liveItem.liveType == 3" :id="`myVideo_${liveId}`" class="item"
-							:src="liveItem.videoUrl" :autoplay="true" :controls="true" object-fit="cover"
-							:enable-progress-gesture="liveItem.isSpeedAllowed" vslide-gesture-in-fullscreen="true"
-							:show-center-play-btn="true" loop @error="videoError"
-							@timeupdate="onVideoTimeUpdate" @loadedmetadata="onVideoMetaLoaded" @pause="onVideoPause"
-							@play="onVideoPlay" :enable-play-gesture="true" preload="metadata" @waiting="onVideoWaiting"
-							:initial-time="0"></video>
+				<video v-if="liveItem.videoUrl && liveItem.liveType == 3" :id="`myVideo_${liveId}`" class="item"
+					:src="liveItem.videoUrl" :autoplay="true" :controls="true" object-fit="cover" :custom-cache="false"
+					:enable-progress-gesture="liveItem.isSpeedAllowed" vslide-gesture-in-fullscreen="true"
+					:show-center-play-btn="true" :http-cache="false" loop @error="videoError"
+					@timeupdate="onVideoTimeUpdate" @loadedmetadata="onVideoMetaLoaded" @pause="onVideoPause"
+					@play="onVideoPlay" :enable-play-gesture="true" preload="auto" @waiting="onVideoWaiting"
+					type="application/x-mpegURL"></video>
 				<view v-if="liveItem.videoUrl && liveItem.liveType == 3" class="lable">直播回放</view>
 			</view>
 
 		</view>
 		<view class="trailer-box" v-if="liveItem.status == 1">
 			<video v-if="liveItem.previewUrl" :id="`myVideo_${liveId}`" class="trailer-video" :src="liveItem.previewUrl"
-					:autoplay="true" loop object-fit="cover"
-					vslide-gesture-in-fullscreen="false" :show-center-play-btn="false"
-					@error="videoError" @loadedmetadata="onVideoMetaLoaded" @pause="onVideoPause" @play="onVideoPlay"
-					:disable-progress="true" :enable-play-gesture="true" @waiting="onVideoWaiting" preload="metadata"
-					:controls="false" :initial-time="0" :show-play-btn="false" :show-fullscreen-btn="false"></video>
+				:autoplay="true" loop object-fit="cover" :custom-cache="false" :enable-progress-gesture="false"
+				vslide-gesture-in-fullscreen="false" :show-center-play-btn="false" :http-cache="false"
+				@error="videoError" @loadedmetadata="onVideoMetaLoaded" @pause="onVideoPause" @play="onVideoPlay"
+				:disable-progress="true" :enable-play-gesture="true" @waiting="onVideoWaiting" preload="auto"
+				type="application/x-mpegURL" :controls="false"></video>
 			<image v-if="liveItem.status == 1 && !liveItem.previewUrl" class="trailer-placeholder"
 				src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/no_live.png">
 			</image>
@@ -144,54 +143,46 @@
 			}
 		},
 		data() {
-				return {
-						videoLoaded: false, // 视频是否加载成功
-					isManualPause: false, // 是否手动暂停
-					waitingTimer: null, // 视频等待定时器
-					waitingStartTime: 0, // 视频等待开始时间
-					lastVideoUpdateTime: 0, // 视频最后更新时间
-					trafficStartTime: 0, // 流量计算开始时间
-					liveBeginWatchTime: 0, //开始观看的时间点 不包含预告
-
-					// 视频加载状态管理
-					videoLoading: false, // 视频是否正在加载
-					videoLoadError: false, // 视频加载是否出错
-					videoRetryCount: 0, // 视频加载重试次数
-					maxRetryCount: 3, // 最大重试次数
-					isHarmonyOS: false, // 是否为鸿蒙系统
-					localIsAgreement: false, // 本地存储的协议同意状态
+			return {
+					videoLoaded: false, // 视频是否加载成功
+				isManualPause: false, // 是否手动暂停
+				waitingTimer: null, // 视频等待定时器
+				waitingStartTime: 0, // 视频等待开始时间
+				lastVideoUpdateTime: 0, // 视频最后更新时间
+				trafficStartTime: 0, // 流量计算开始时间
+				liveBeginWatchTime: 0, //开始观看的时间点 不包含预告
 
-					
-					// hasSubscribed: false, // 已成功订阅(永久禁用)
-					isFullscreen: false,
-					isVideoRotated: false,
-					showNonVideoElementsFlag: true,
-					showCustomControls: true,
-					videoContext: null,
-
-					// 流量计算相关
-					uuId: '',
-					totalTraffic: 0,
-					bitrate: 800,
-					bitrateLive: 1600,
-
-					// 定时器
-					trafficTimer: null,
-					liveStartTimer: null,
-					trafficInterval: null,
-					lookTimer: null,
-
-					// 状态数据
-					liveCountdown: {},
-					diffTotalTime: '',
-					videoCurrentTime: 0,
-					videoProgressKey: '',
-					startTime: 0,
-					stayTime: 0,
-					// 内部状态跟踪
-					hasInitialized: false,
-					lastLiveItemStatus: null
-				};
+				
+				// hasSubscribed: false, // 已成功订阅(永久禁用)
+				isFullscreen: false,
+				isVideoRotated: false,
+				showNonVideoElementsFlag: true,
+				showCustomControls: true,
+				videoContext: null,
+
+				// 流量计算相关
+				uuId: '',
+				totalTraffic: 0,
+				bitrate: 800,
+				bitrateLive: 1600,
+
+				// 定时器
+				trafficTimer: null,
+				liveStartTimer: null,
+				trafficInterval: null,
+				lookTimer: null,
+
+				// 状态数据
+				liveCountdown: {},
+				diffTotalTime: '',
+				videoCurrentTime: 0,
+				videoProgressKey: '',
+				startTime: 0,
+				stayTime: 0,
+				// 内部状态跟踪
+				hasInitialized: false,
+				lastLiveItemStatus: null
+			};
 		},
 		watch: {
 			// 深度监听 liveItem 的所有变化
@@ -240,14 +231,7 @@
 			},
 		},
 		beforeUnmount() {
-			// 暂停所有视频播放
-			this.pauseVideo();
-			// 清理所有定时器
 			this.cleanup();
-			// 清理所有可能的引用
-			this.liveItem = null;
-			this.liveId = null;
-			this.userData = null;
 			// 强制退出全屏
 			this.isFullscreen = false;
 			this.showCustomControls = true;
@@ -427,35 +411,36 @@
 					return;
 				}
 				try {
+					// 检查网络状态
+					this.checkNetworkStatus();
+					
+					// 鸿蒙系统特殊处理:如果已经标记为需要使用 video 组件
+					if (this.isHarmonyOS && this.useVideoComponentInstead) {
+						console.log('鸿蒙系统使用 video 组件播放视频');
+						const videoId = `myVideo_${this.liveId}`;
+						const videoContext = uni.createVideoContext(videoId, this);
+						if (videoContext) {
+							// 鸿蒙系统特殊处理:延迟播放
+							setTimeout(() => {
+								console.log('鸿蒙系统执行 video 组件播放');
+								videoContext.play();
+							}, 500);
+						}
+						return;
+					}
+					
 					// 直播流使用live-player
 					if (this.liveItem.liveType === 1 && this.liveItem.livingUrl && this.liveItem.status == 2) {
 						const livePlayerId = `myLivePlayer_${this.liveId}`;
 						const livePlayerContext = uni.createLivePlayerContext(livePlayerId, this);
-						// console.log("直播")
 						if (livePlayerContext) {
 							if (this.isHarmonyOS) {
 								console.log('鸿蒙系统播放直播');
+								console.log('直播流URL:', this.liveItem.livingUrl);
+								console.log('直播ID:', this.liveId);
 								// 鸿蒙系统特殊处理:延迟播放并添加重试机制
 								setTimeout(() => {
-									try {
-										livePlayerContext.play();
-										console.log('鸿蒙系统直播播放命令已发送');
-										// 强制UI更新
-										this.$forceUpdate();
-										// 1秒后再次检查播放状态
-										setTimeout(() => {
-											console.log('鸿蒙系统直播播放状态检查');
-											// 再次强制UI更新
-											this.$forceUpdate();
-										}, 1000);
-									} catch (error) {
-										console.error('鸿蒙系统直播播放失败:', error);
-										// 播放失败时重试
-										setTimeout(() => {
-											livePlayerContext.play();
-											console.log('鸿蒙系统直播播放重试');
-										}, 1000);
-									}
+									this.harmonyOSLivePlay(livePlayerContext, 0);
 								}, 500);
 							} else {
 								livePlayerContext.play();
@@ -476,32 +461,60 @@
 							}
 						}
 					} else if (this.liveItem.liveType === 2 && this.liveItem.videoUrl && this.liveItem.status == 2) {
-						const videoId = `myVideo_${this.liveId}`;
-						const videoContext = uni.createVideoContext(videoId, this);
-						// console.log("录播")
-						if (videoContext) {
-							if (this.isHarmonyOS) {
-								// 鸿蒙系统特殊处理:延迟播放
-								setTimeout(() => {
+						// 检查是否为HLS格式的视频流
+						const isHLS = this.liveItem.videoUrl.toLowerCase().endsWith('.m3u8');
+						console.log('视频URL:', this.liveItem.videoUrl, '是否为HLS格式:', isHLS);
+						
+						if (isHLS && !this.isHarmonyOS) {
+							// 非鸿蒙系统:HLS格式使用live-player播放
+							const livePlayerId = `myLivePlayer_${this.liveId}`;
+							const livePlayerContext = uni.createLivePlayerContext(livePlayerId, this);
+							if (livePlayerContext) {
+								livePlayerContext.play();
+							}
+						} else {
+							// 鸿蒙系统或普通视频格式:使用video组件播放
+							const videoId = `myVideo_${this.liveId}`;
+							const videoContext = uni.createVideoContext(videoId, this);
+							if (videoContext) {
+								if (this.isHarmonyOS) {
+									// 鸿蒙系统特殊处理:延迟播放
+									setTimeout(() => {
+										console.log('鸿蒙系统执行 video 组件播放');
+										videoContext.play();
+									}, 500);
+								} else {
 									videoContext.play();
-								}, 500);
-							} else {
-								videoContext.play();
+								}
 							}
 						}
 					} // 回放视频使用video
 					else if (this.liveItem.liveType === 3 && this.liveItem.videoUrl && this.liveItem.status == 4) {
-						const videoId = `myVideo_${this.liveId}`;
-						const videoContext = uni.createVideoContext(videoId, this);
-						// console.log("回放")
-						if (videoContext) {
-							if (this.isHarmonyOS) {
-								// 鸿蒙系统特殊处理:延迟播放
-								setTimeout(() => {
+						// 检查是否为HLS格式的视频流
+						const isHLS = this.liveItem.videoUrl.toLowerCase().endsWith('.m3u8');
+						console.log('回放视频URL:', this.liveItem.videoUrl, '是否为HLS格式:', isHLS);
+						
+						if (isHLS && !this.isHarmonyOS) {
+							// 非鸿蒙系统:HLS格式使用live-player播放
+							const livePlayerId = `myLivePlayer_${this.liveId}`;
+							const livePlayerContext = uni.createLivePlayerContext(livePlayerId, this);
+							if (livePlayerContext) {
+								livePlayerContext.play();
+							}
+						} else {
+							// 鸿蒙系统或普通视频格式:使用video组件播放
+							const videoId = `myVideo_${this.liveId}`;
+							const videoContext = uni.createVideoContext(videoId, this);
+							if (videoContext) {
+								if (this.isHarmonyOS) {
+									// 鸿蒙系统特殊处理:延迟播放
+									setTimeout(() => {
+										console.log('鸿蒙系统执行 video 组件播放');
+										videoContext.play();
+									}, 500);
+								} else {
 									videoContext.play();
-								}, 500);
-							} else {
-								videoContext.play();
+								}
 							}
 						}
 					}
@@ -551,7 +564,6 @@
 			// 视频错误处理
 			videoError(e, liveItem) {
 				if (!liveItem || !this.liveId) return;
-				console.error('视频错误:', e, liveItem);
 				// 初始化重试计数
 				if (this.videoRetryCounts[liveItem.liveId] === undefined) {
 					this.videoRetryCounts[liveItem.liveId] = 0;
@@ -570,16 +582,13 @@
 
 				this.videoRetryCounts[this.liveId]++;
 
-				// 鸿蒙系统特殊处理:更长的重试延迟
-				const retryDelay = this.isHarmonyOS ? 3000 : 2000;
-				
 				// 延迟重试
 				setTimeout(() => {
 					if (this.liveId === this.liveId) {
 						console.log(`第${this.videoRetryCounts[this.liveId]}次重试播放视频`);
 						this.playVideo();
 					}
-				}, retryDelay);
+				}, 2000);
 			}, // 视频暂停
 			onVideoPause(e) {
 				if (this.liveItem.liveType === 2) {
@@ -677,10 +686,6 @@
 					clearInterval(this.liveStartTimer);
 					this.liveStartTimer = null;
 				}
-				if (this.trafficInterval) {
-					clearInterval(this.trafficInterval);
-					this.trafficInterval = null;
-				}
 			}, // 计算码率
 			calculateBitrate() {
 				// 如果接口返回了视频文件大小和时长,使用这些数据计算码率
@@ -759,7 +764,7 @@
 			// 	}
 			// },
 			onVideoWaiting(e) {
-				// console.log('视频等待加载', e);
+				console.log('视频等待加载', e);
 				if (this.liveItem.liveType == 2) {
 					// 修改这里:不再传入固定码率,而是在方法内部计算
 					this.startTrafficCalculation();
@@ -773,33 +778,9 @@
 						that.getInternetTraffic();
 					}, 10000);
 				}
-				
-				// 记录等待开始时间
-								if (!this.waitingStartTime) {
-									this.waitingStartTime = Date.now();
-								}
-				// 检测是否真的出现黑屏或卡顿(等待超过5秒且视频时间没有更新)
-								if (!this.waitingTimer) {
-									this.waitingTimer = setTimeout(() => {
-										const waitingDuration = Date.now() - this.waitingStartTime;
-										const timeSinceLastUpdate = Date.now() - this.lastVideoUpdateTime;
-				
-										// 只有在等待超过5秒,且视频时间超过3秒没有更新时,才认为是真正的卡顿/黑屏
-									if (waitingDuration >= 5000 && timeSinceLastUpdate >= 3000) {
-										uni.showToast({
-											title: '当前您的网络不稳定',
-											icon: 'loading',
-											duration: 2000
-										});
-										// 鸿蒙系统特殊处理:检测到黑屏时主动处理
-										if (this.isHarmonyOS) {
-											this.handleHarmonyOSBlackScreen();
-										}
-									}
-									}, 5000); // 延迟5秒检测
-								}
 			},
 			setVideoProgress() {
+				console.log('设置视频进度');
 				// 只有录播和回放需要设置进度
 				if (this.liveItem.liveType !== 2 && this.liveItem.liveType !== 3) {
 					return;
@@ -831,6 +812,8 @@
 				}
 			}, // 视频播放
 			onVideoPlay(e) {
+				console.log('视频播放');
+
 				//console.log("qxj onVideoPlay");
 				// 重置手动暂停标志
 				this.isManualPause = false;
@@ -862,20 +845,9 @@
 			},
 			// 视频时间更新
 			onVideoTimeUpdate(e) {
+				// console.log('视频时间更新');
 				// 获取当前播放时间
 				this.videoCurrentTime = e.detail.currentTime;
-				// 更新视频最后更新时间(用于检测是否卡顿)
-								this.lastVideoUpdateTime = Date.now();
-				
-								// 如果视频在更新,说明没有卡顿,清除等待状态
-								if (this.waitingStartTime && this.lastVideoUpdateTime - this.waitingStartTime < 1000) {
-									// 视频在1秒内恢复了,清除等待定时器
-									if (this.waitingTimer) {
-										clearTimeout(this.waitingTimer);
-										this.waitingTimer = null;
-									}
-									this.waitingStartTime = 0;
-								}
 				// 每隔10秒保存一次进度(避免频繁存储)
 				if (Math.floor(this.videoCurrentTime) % 10 === 0) {
 					this.saveVideoProgress();
@@ -922,39 +894,36 @@
 					this.startLiveCountdown();
 				} else if (this.liveItem?.status === 2) {
 					this.startTimeTimer(this.liveItem);
-					this.playVideo();
+					// 鸿蒙系统特殊处理:延迟播放以确保组件完全初始化
+					if (this.isHarmonyOS) {
+						console.log('鸿蒙系统延迟播放以确保组件初始化');
+						setTimeout(() => {
+							console.log('鸿蒙系统执行播放');
+							this.playVideo();
+						}, 1000);
+					} else {
+						this.playVideo();
+					}
 				}
 
 				this.startTimer();
 				this.hasInitialized = true;
+				
+				// 鸿蒙系统额外UI更新
+				if (this.isHarmonyOS) {
+					console.log('鸿蒙系统组件初始化完成 - 额外UI更新');
+					// 延迟100ms后强制UI更新
+					setTimeout(() => {
+						this.$forceUpdate();
+						console.log('鸿蒙系统组件初始化后强制UI更新');
+						// 再延迟100ms后再次强制UI更新
+						setTimeout(() => {
+							this.$forceUpdate();
+							console.log('鸿蒙系统组件初始化后二次强制UI更新');
+						}, 100);
+					}, 100);
+				}
 			},
-			// 检测系统类型
-				detectSystemType() {
-					try {
-						const systemInfo = uni.getSystemInfoSync();
-						console.log('系统信息:', systemInfo);
-						// 检测是否为鸿蒙系统
-						// 检查多个可能的字段
-						const isHarmony = (
-							systemInfo.platform === 'openharmony' ||
-							systemInfo.system?.toLowerCase().includes('harmony') ||
-							systemInfo.osName?.toLowerCase().includes('harmony') ||
-							systemInfo.platform?.toLowerCase().includes('harmony')
-						);
-						if (isHarmony) {
-							this.isHarmonyOS = true;
-							console.log('检测到鸿蒙系统');
-						} else {
-							console.log('非鸿蒙系统:', {
-								platform: systemInfo.platform,
-								system: systemInfo.system,
-								osName: systemInfo.osName
-							});
-						}
-					} catch (error) {
-						console.error('获取系统信息失败:', error);
-					}
-				},
 
 			// 启动直播倒计时 - 增强版本
 			startLiveCountdown() {
@@ -1101,88 +1070,28 @@
 					clearInterval(this.lookTimer);
 					this.lookTimer = null;
 				}
-				// 清理等待定时器
-				if (this.waitingTimer) {
-					clearTimeout(this.waitingTimer);
-					this.waitingTimer = null;
-				}
 				if (this.liveItem && this.liveItem.timeTimer) {
 					clearInterval(this.liveItem.timeTimer);
 					this.liveItem.timeTimer = null;
 				}
 			},
-			// 重置视频状态 - 用于处理黑屏问题
-			resetVideoState() {
-				console.log('重置视频状态');
-				// 重置视频加载状态
-				this.videoLoaded = false;
-				this.videoLoading = false;
-				this.videoLoadError = false;
-				this.videoRetryCount = 0;
-				// 清理所有定时器
-				this.cleanup();
-				// 重新播放视频
-				if (this.liveItem) {
-					setTimeout(() => {
-						this.playVideo();
-					}, 500);
-				}
-			},
-			// 鸿蒙系统黑屏处理
-				handleHarmonyOSBlackScreen() {
-					if (!this.isHarmonyOS) return;
-					console.log('鸿蒙系统黑屏处理');
-					// 重置视频状态
-					this.resetVideoState();
-					// 显示加载提示
-					uni.showToast({
-						title: '视频加载中,请稍候...',
-						icon: 'loading',
-						duration: 3000
-					});
-				},
-				// 直播状态变化处理
-				onLiveStateChange(e) {
-					console.log('直播状态变化:', e);
-					// 获取直播状态
-					const state = e.detail.state;
-					console.log('直播状态:', state);
-					// 鸿蒙系统特殊处理
-					if (this.isHarmonyOS) {
-						console.log('鸿蒙系统直播状态变化:', state);
-						// 当状态为2(播放中)时,确保视频正常显示
-						if (state === 2) {
-							console.log('鸿蒙系统直播开始播放');
-							// 强制UI更新
-							this.$forceUpdate();
-						}
-						// 当状态为3(加载中)时,显示加载提示
-						else if (state === 3) {
-							console.log('鸿蒙系统直播加载中');
+
+			// 检查网络状态
+			checkNetworkStatus() {
+				uni.getNetworkType({
+					success: (res) => {
+						console.log('网络状态:', res.networkType);
+						if (res.networkType === 'none') {
+							console.error('网络连接已断开');
 							uni.showToast({
-								title: '直播加载中,请稍候...',
-								icon: 'loading',
-								duration: 2000
+								title: '网络连接已断开,请检查网络设置',
+								icon: 'none',
+								duration: 3000
 							});
 						}
 					}
-				},
-				// 直播错误处理
-				onLiveError(e) {
-					console.error('直播错误:', e);
-					// 显示错误提示
-					uni.showToast({
-						title: '直播加载失败,请检查网络',
-						icon: 'none',
-						duration: 2000
-					});
-					// 鸿蒙系统特殊处理
-					if (this.isHarmonyOS) {
-						console.log('鸿蒙系统直播错误处理');
-						// 重置视频状态
-						this.resetVideoState();
-					}
-				},
+				});
+			}
 		}
 	};
 </script>

+ 161 - 157
pages_course/living.vue

@@ -14,7 +14,7 @@
 								<u-avatar :src="liveItem.liveImgUrl || '/static/images/avatar.png'"
 									:size="32"></u-avatar>
 								<view class="colorf ml10 mr6">
-									<view>111{{ liveItem.liveName ? truncateString(liveItem.liveName, 8) : '未命名' }}</view>
+									<view>{{ liveItem.liveName ? truncateString(liveItem.liveName, 8) : '未命名' }}</view>
 								</view>
 							</view>
 						</view>
@@ -684,7 +684,7 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 		},
 		onPullDownRefresh() {
 			this.getLiveMsg(this.liveItem);
-			this.getliveUserInit();
+			// this.getliveUserInit();
 			setTimeout(() => {
 				uni.stopPullDownRefresh()
 			}, 1000)
@@ -758,10 +758,11 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 			this.isAgreement = uni.getStorageSync('isAgreement')
 
 			this.$nextTick(() => {
-				if (this.$refs.liveVideo && this.$refs.liveVideo.setVideoProgress) {
-					this.$refs.liveVideo.setVideoProgress()
-				}
-			});
+			// 严格检查 $refs.liveVideo 是否存在
+			if (this.$refs && this.$refs.liveVideo && typeof this.$refs.liveVideo.setVideoProgress === 'function') {
+				this.$refs.liveVideo.setVideoProgress()
+			}
+		});
 			if (this.lookTimer) {
 				clearInterval(this.lookTimer)
 				this.lookTimer = null
@@ -769,7 +770,7 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 				this.startTime = 0
 			}
 // 清除等待定时器
-			if (this.$refs.liveVideo && this.$refs.liveVideo.waitingTimer) {
+			if (this.$refs && this.$refs.liveVideo && this.$refs.liveVideo.waitingTimer) {
 				clearTimeout(this.$refs.liveVideo.waitingTimer);
 				this.$refs.liveVideo.waitingTimer = null;
 			}
@@ -786,7 +787,7 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 				this.totalTraffic = 0
 			}
 
-			if (this.$refs.liveVideo && this.$refs.liveVideo.startTimer) {
+			if (this.$refs && this.$refs.liveVideo && typeof this.$refs.liveVideo.startTimer === 'function') {
 				this.$refs.liveVideo.startTimer()
 			}
 
@@ -839,7 +840,10 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 			filteredViewers() {
 				
 				// 从预设的头像数组中随机选择3个
-				const avatarArray = this.fakeAvatar;
+				const avatarArray = this.fakeAvatar || [];
+				if (!Array.isArray(avatarArray) || avatarArray.length === 0) {
+					return [];
+				}
 				const shuffled = [...avatarArray].sort(() => 0.5 - Math.random());
 				const selected = shuffled.slice(0, 3);
 				// 转换为包含avatar属性的对象数组
@@ -883,20 +887,20 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 			this.updateWatchDuration();
 			this.stopCountdown();
 			// 清理流量定时器
-			if (this.$refs.liveVideo && this.$refs.liveVideo.clearAllTimers) {
+			if (this.$refs && this.$refs.liveVideo && typeof this.$refs.liveVideo.clearAllTimers === 'function') {
 				this.$refs.liveVideo.clearAllTimers()
 			}
 		},
 		onUnload() {
-			if (this.$refs.liveVideo && this.$refs.liveVideo.saveVideoProgress) {
+			if (this.$refs && this.$refs.liveVideo && typeof this.$refs.liveVideo.saveVideoProgress === 'function') {
 				this.$refs.liveVideo.saveVideoProgress()
 			}
 			// 暂停视频
-			if (this.$refs.liveVideo && this.$refs.liveVideo.pauseVideo) {
+			if (this.$refs && this.$refs.liveVideo && typeof this.$refs.liveVideo.pauseVideo === 'function') {
 				this.$refs.liveVideo.pauseVideo()
 			}
 			// 清理流量定时器
-			if (this.$refs.liveVideo && this.$refs.liveVideo.clearAllTimers) {
+			if (this.$refs && this.$refs.liveVideo && typeof this.$refs.liveVideo.clearAllTimers === 'function') {
 				this.$refs.liveVideo.clearAllTimers()
 			}
 			// 清理liveItem中的定时器
@@ -1776,7 +1780,7 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 						this.$set(this.liveItem, 'videoUrl', '')
 						setTimeout(() => {
 							this.$set(this.liveItem, 'videoUrl', this.getFreshVideoUrl())
-							if (this.$refs.liveVideo && this.$refs.liveVideo.playVideo) {
+							if (this.$refs && this.$refs.liveVideo && typeof this.$refs.liveVideo.playVideo === 'function') {
 								this.$refs.liveVideo.playVideo()
 							}
 						}, 500)
@@ -2733,14 +2737,14 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 			onLiveStateChange(e, liveItem) {
 				const stateCode = e.detail.code
 				if (e.detail.code == -2301 || e.detail.code == -2302) {
-					if (this.$refs.liveVideo && this.$refs.liveVideo.playVideo) {
-						this.$refs.liveVideo.playVideo()
-					}
-				} else if (e.detail.code == 2004) {
-					this.calculateTimeDiff(this.liveItem)
-					if (this.$refs.liveVideo && this.$refs.liveVideo.startTrafficCalculation) {
-						this.$refs.liveVideo.startTrafficCalculation()
-					}
+					if (this.$refs && this.$refs.liveVideo && typeof this.$refs.liveVideo.playVideo === 'function') {
+					this.$refs.liveVideo.playVideo()
+				}
+			} else if (e.detail.code == 2004) {
+				this.calculateTimeDiff(this.liveItem)
+				if (this.$refs && this.$refs.liveVideo && typeof this.$refs.liveVideo.startTrafficCalculation === 'function') {
+					this.$refs.liveVideo.startTrafficCalculation()
+				}
 				}
 			},
 			onLiveError(e, liveItem) {
@@ -2875,137 +2879,137 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 					return prefix + suffix
 				}
 			},
-			async getliveUser(isLoadMore = false) {
-				if (!isLoadMore) {
-					this.liveViewers = []
-					this.viewPageNum = 1
-				}
-				this.viewLoading = true;
-				try {
-					const res = await watchUserList(this.liveId, this.viewPageSize, this.viewPageNum, false);
-					console.log("qxj watchUserList res", res);
-					if (res.code === 200) {
-						const newRows = Array.isArray(res.rows) ? res.rows : []
-
-						const newViewers = newRows.map((item) => ({
-							avatar: item.avatar || '',
-							userId: item.userId || '',
-							nickName: item.nickName || '未命名'
-						}));
-
-						let virtualData = [];
-						// 计算虚拟总数
-						let virtualTotal = res.total * 2 + 50;
-						// 计算需要生成的虚拟数据数量
-						let totalVirtualNeeded = virtualTotal - res.total;
-						totalVirtualNeeded = Math.max(0, Math.min(totalVirtualNeeded, 90)); // 最多生成90条虚拟数据
-
-						if (!isLoadMore) {
-							// 首次加载时,生成第一批虚拟数据(与真实数据合计不超过10个)
-							let firstBatchVirtualCount = Math.max(0, 10 - newRows.length);
-							for (let i = 0; i < firstBatchVirtualCount; i++) {
-								let data = {
-									avatar: '',
-									userId: '8565' + i,
-									nickName: this.generateRandomChineseName()
-								}
-								virtualData.push(data);
-							}
-							this.liveViewersData = [...newViewers, ...virtualData];
-						} else {
-							// 后续加载时,计算已加载的虚拟数据数量
-							let loadedVirtualCount = this.liveViewers.filter(v => String(v.userId).startsWith('8565'))
-								.length;
-							// 计算还需要加载的虚拟数据数量
-							let remainingVirtualCount = totalVirtualNeeded - loadedVirtualCount;
-							// 本次加载的虚拟数据数量(最多10个)
-							let currentBatchVirtualCount = Math.min(remainingVirtualCount, this.viewPageSize);
-							// 生成本次加载的虚拟数据
-							for (let i = 0; i < currentBatchVirtualCount; i++) {
-								let data = {
-									avatar: '',
-									userId: '8565' + (loadedVirtualCount + i),
-									nickName: this.generateRandomChineseName()
-								}
-								virtualData.push(data);
-							}
-						}
+			// async getliveUser(isLoadMore = false) {
+			// 	if (!isLoadMore) {
+			// 		this.liveViewers = []
+			// 		this.viewPageNum = 1
+			// 	}
+			// 	this.viewLoading = true;
+			// 	try {
+			// 		const res = await watchUserList(this.liveId, this.viewPageSize, this.viewPageNum, false);
+			// 		console.log("qxj watchUserList res", res);
+			// 		if (res.code === 200) {
+			// 			const newRows = Array.isArray(res.rows) ? res.rows : []
+
+			// 			const newViewers = newRows.map((item) => ({
+			// 				avatar: item.avatar || '',
+			// 				userId: item.userId || '',
+			// 				nickName: item.nickName || '未命名'
+			// 			}));
+
+			// 			let virtualData = [];
+			// 			// 计算虚拟总数
+			// 			let virtualTotal = res.total * 2 + 50;
+			// 			// 计算需要生成的虚拟数据数量
+			// 			let totalVirtualNeeded = virtualTotal - res.total;
+			// 			totalVirtualNeeded = Math.max(0, Math.min(totalVirtualNeeded, 90)); // 最多生成90条虚拟数据
+
+			// 			if (!isLoadMore) {
+			// 				// 首次加载时,生成第一批虚拟数据(与真实数据合计不超过10个)
+			// 				let firstBatchVirtualCount = Math.max(0, 10 - newRows.length);
+			// 				for (let i = 0; i < firstBatchVirtualCount; i++) {
+			// 					let data = {
+			// 						avatar: '',
+			// 						userId: '8565' + i,
+			// 						nickName: this.generateRandomChineseName()
+			// 					}
+			// 					virtualData.push(data);
+			// 				}
+			// 				this.liveViewersData = [...newViewers, ...virtualData];
+			// 			} else {
+			// 				// 后续加载时,计算已加载的虚拟数据数量
+			// 				let loadedVirtualCount = this.liveViewers.filter(v => String(v.userId).startsWith('8565'))
+			// 					.length;
+			// 				// 计算还需要加载的虚拟数据数量
+			// 				let remainingVirtualCount = totalVirtualNeeded - loadedVirtualCount;
+			// 				// 本次加载的虚拟数据数量(最多10个)
+			// 				let currentBatchVirtualCount = Math.min(remainingVirtualCount, this.viewPageSize);
+			// 				// 生成本次加载的虚拟数据
+			// 				for (let i = 0; i < currentBatchVirtualCount; i++) {
+			// 					let data = {
+			// 						avatar: '',
+			// 						userId: '8565' + (loadedVirtualCount + i),
+			// 						nickName: this.generateRandomChineseName()
+			// 					}
+			// 					virtualData.push(data);
+			// 				}
+			// 			}
 
-						// 过滤掉旧列表中的虚拟数据,保留真实用户
-						let currentRealViewers = isLoadMore ? this.liveViewers.filter(v => !String(v.userId)
-							.startsWith('8565')) : [];
+			// 			// 过滤掉旧列表中的虚拟数据,保留真实用户
+			// 			let currentRealViewers = isLoadMore ? this.liveViewers.filter(v => !String(v.userId)
+			// 				.startsWith('8565')) : [];
 
-						// 合并真实用户
-						let allRealViewers = [...currentRealViewers, ...newViewers];
+			// 			// 合并真实用户
+			// 			let allRealViewers = [...currentRealViewers, ...newViewers];
 
-						// 合并虚拟用户
-						let currentVirtualViewers = isLoadMore ? this.liveViewers.filter(v => String(v.userId)
-							.startsWith('8565')) : [];
-						let allVirtualViewers = [...currentVirtualViewers, ...virtualData];
+			// 			// 合并虚拟用户
+			// 			let currentVirtualViewers = isLoadMore ? this.liveViewers.filter(v => String(v.userId)
+			// 				.startsWith('8565')) : [];
+			// 			let allVirtualViewers = [...currentVirtualViewers, ...virtualData];
 
-						// 合并所有用户
-						let mergedViewers = [...allRealViewers, ...allVirtualViewers];
-						// 确保观众列表不超过100个
-						if (mergedViewers.length > 100) {
-							mergedViewers = mergedViewers.slice(0, 100);
-						}
-						this.liveViewers = mergedViewers;
-
-						// 检查虚拟数据是否还有剩余
-						let totalLoaded = allRealViewers.length + allVirtualViewers.length;
-						let remainingVirtualCount = totalVirtualNeeded - allVirtualViewers.length;
-						// 计算是否还有更多数据
-						// 1. 如果真实用户还有更多
-						// 2. 或者虚拟数据还有剩余
-						// 3. 但不超过100个
-						let hasMore = ((newRows.length >= this.viewPageSize) || (remainingVirtualCount > 0)) && (
-							totalLoaded < 100);
-						// 确保即使真实用户数据加载完毕,只要虚拟数据还有剩余且未超过100个,就继续加载
-						if (remainingVirtualCount > 0 && totalLoaded < 100) {
-							hasMore = true;
-						}
-						if (totalLoaded >= virtualTotal || totalLoaded >= 100) {
-							hasMore = false;
-							this.lookAudsCount = Math.max(0, virtualTotal - 100);
-						} else {
-							this.lookAudsCount = 0;
-						}
+			// 			// 合并所有用户
+			// 			let mergedViewers = [...allRealViewers, ...allVirtualViewers];
+			// 			// 确保观众列表不超过100个
+			// 			if (mergedViewers.length > 100) {
+			// 				mergedViewers = mergedViewers.slice(0, 100);
+			// 			}
+			// 			this.liveViewers = mergedViewers;
+
+			// 			// 检查虚拟数据是否还有剩余
+			// 			let totalLoaded = allRealViewers.length + allVirtualViewers.length;
+			// 			let remainingVirtualCount = totalVirtualNeeded - allVirtualViewers.length;
+			// 			// 计算是否还有更多数据
+			// 			// 1. 如果真实用户还有更多
+			// 			// 2. 或者虚拟数据还有剩余
+			// 			// 3. 但不超过100个
+			// 			let hasMore = ((newRows.length >= this.viewPageSize) || (remainingVirtualCount > 0)) && (
+			// 				totalLoaded < 100);
+			// 			// 确保即使真实用户数据加载完毕,只要虚拟数据还有剩余且未超过100个,就继续加载
+			// 			if (remainingVirtualCount > 0 && totalLoaded < 100) {
+			// 				hasMore = true;
+			// 			}
+			// 			if (totalLoaded >= virtualTotal || totalLoaded >= 100) {
+			// 				hasMore = false;
+			// 				this.lookAudsCount = Math.max(0, virtualTotal - 100);
+			// 			} else {
+			// 				this.lookAudsCount = 0;
+			// 			}
 
-						if (this.$refs.viewer) {
-							this.$refs.viewer.endSuccess(newRows.length + virtualData.length, hasMore);
-						}
-					} else {
-						if (this.$refs.viewer) this.$refs.viewer.endErr();
-					}
-				} catch (error) {
-					console.error('获取观众列表失败:', error)
-					if (this.$refs.viewer) this.$refs.viewer.endErr();
-				} finally {
-					this.viewLoading = false
-				}
-			},
-			async getliveUserInit(isLoadMore = false) {
-				try {
-					const res = await watchUserList(this.liveId, this.viewPageSize, 1, false);
-					console.log("qxj watchUserList res", res);
-					if (res.code === 200) {
-						const userRows = Array.isArray(res.rows) ? res.rows : []
-						let array = userRows.map((item) => ({
-							avatar: item.avatar || '',
-							userId: item.userId || '',
-							nickName: item.nickName || '未命名'
-						}));
-						// let virtualTotal = res.total * 2 + 50;
-						// // 使用虚拟的观众总数
-						// this.liveUserTotal = virtualTotal || 0;
-						this.liveUserTotal = res.total;
-						this.liveTopViewersData = [...array];
+			// 			if (this.$refs.viewer) {
+			// 				this.$refs.viewer.endSuccess(newRows.length + virtualData.length, hasMore);
+			// 			}
+			// 		} else {
+			// 			if (this.$refs.viewer) this.$refs.viewer.endErr();
+			// 		}
+			// 	} catch (error) {
+			// 		console.error('获取观众列表失败:', error)
+			// 		if (this.$refs.viewer) this.$refs.viewer.endErr();
+			// 	} finally {
+			// 		this.viewLoading = false
+			// 	}
+			// },
+			// async getliveUserInit(isLoadMore = false) {
+			// 	try {
+			// 		const res = await watchUserList(this.liveId, this.viewPageSize, 1, false);
+			// 		console.log("qxj watchUserList res", res);
+			// 		if (res.code === 200) {
+			// 			const userRows = Array.isArray(res.rows) ? res.rows : []
+			// 			let array = userRows.map((item) => ({
+			// 				avatar: item.avatar || '',
+			// 				userId: item.userId || '',
+			// 				nickName: item.nickName || '未命名'
+			// 			}));
+			// 			// let virtualTotal = res.total * 2 + 50;
+			// 			// // 使用虚拟的观众总数
+			// 			// this.liveUserTotal = virtualTotal || 0;
+			// 			this.liveUserTotal = res.total;
+			// 			this.liveTopViewersData = [...array];
 
-					}
-				} catch (error) {
-					console.error('获取观众列表失败:', error)
-				} finally {}
-			},
+			// 		}
+			// 	} catch (error) {
+			// 		console.error('获取观众列表失败:', error)
+			// 	} finally {}
+			// },
 
 			showPurchaseMessage() {
 				if (this.purchasePromptTimer) {
@@ -3110,9 +3114,9 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 					// 初始化累计观看时间
 					this.initWatchTime();
 					this.startLiveViewDataTimer()
-					if (this.$refs.liveVideo && this.$refs.liveVideo.playVideo) {
-						this.$refs.liveVideo.playVideo()
-					}
+					if (this.$refs && this.$refs.liveVideo && typeof this.$refs.liveVideo.playVideo === 'function') {
+					this.$refs.liveVideo.playVideo()
+				}
 				} catch (err) {
 					console.error('获取直播信息失败:', err)
 					uni.showToast({
@@ -3127,9 +3131,9 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 			},
 			goBack() {
 				if (this.liveItem) {
-					if (this.$refs.liveVideo && this.$refs.liveVideo.pauseVideo) {
-						this.$refs.liveVideo.pauseVideo()
-					}
+					if (this.$refs && this.$refs.liveVideo && typeof this.$refs.liveVideo.pauseVideo === 'function') {
+					this.$refs.liveVideo.pauseVideo()
+				}
 				}
 				this.closeWebSocket(true)
 				const pages = getCurrentPages()
@@ -3337,9 +3341,9 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 				this.connectionStartTime = Date.now()
 				this.resetReconnectState()
 
-				setTimeout(() => {
-					this.getliveUserInit(false)
-				}, 200)
+				// setTimeout(() => {
+				// 	this.getliveUserInit(false)
+				// }, 200)
 
 				const now = new Date()
 				this.timestamp = now.getTime()
@@ -3645,7 +3649,7 @@ import LiveVideo from '@/pages_course/components/liveVideo.vue'
 							'singleVisible') {} else if (socketMessage.cmd == 'entry') {
 							try {
 								//if (!this.liveUserCalled) {
-								await this.getliveUserInit(false)
+								// await this.getliveUserInit(false)
 								this.liveUserCalled = true;
 								//}
 								const userIdToEntry = socketMessage.userId

+ 66 - 22
pages_shopping/live/confirmCreateOrder.vue

@@ -257,31 +257,75 @@
 					rej => {}
 				);
 			},
+			// // 查询创建订单信息
+			// computedOrder() {
+			// 	let data = {
+			// 		cityId: this.cityId || '',
+			// 		totalNum: this.totalNum,
+			// 		productId: this.productId,
+			// 		orderKey: this.orderKey,
+			// 		couponUserId: this.couponUserId || '',
+			// 		attrValueId: this.productValueSelect
+			// 	}
+
+			// 	computed(data).then(res => {
+			// 			if (res.code == 200) {
+			// 				console.log("查询创建订单信息>>>>", res.data)
+			// 				this.orderData = res.data
+			// 			} else {
+							
+			// 				uni.showToast({
+			// 					title: res.msg,
+			// 					icon: 'none'
+			// 				});
+			// 			}
+			// 		},
+			// 		rej => {}
+			// 	);
+			// },
 			// 查询创建订单信息
 			computedOrder() {
-				let data = {
-					cityId: this.cityId || '',
-					totalNum: this.totalNum,
-					productId: this.productId,
-					orderKey: this.orderKey,
-					couponUserId: this.couponUserId || '',
-					attrValueId: this.productValueSelect
-				}
-
-				computed(data).then(res => {
-						if (res.code == 200) {
-							console.log("查询创建订单信息>>>>", res.data)
-							this.orderData = res.data
-						} else {
-							uni.showToast({
-								title: res.msg,
-								icon: 'none'
-							});
-						}
-					},
-					rej => {}
-				);
+			    let data = {
+			        cityId: this.cityId || '',
+			        totalNum: this.totalNum,
+			        productId: this.productId,
+			        orderKey: this.orderKey,
+			        couponUserId: this.couponUserId || '',
+			        attrValueId: this.productValueSelect
+			    }
+			
+			    computed(data).then(res => {
+			            if (res.code == 200) {
+			                console.log("查询创建订单信息>>>>", res.data)
+			                this.orderData = res.data
+			            } else {
+			                // 定义提示文本,默认值为原始msg
+			                let toastTitle = res.msg;
+			                
+			                // 仅当包含INTERNAL_SERVER_ERROR时才解析双引号内容
+			                if (typeof toastTitle === 'string' && toastTitle.includes('INTERNAL_SERVER_ERROR')) {
+			                    // 正则匹配第一个双引号内的内容(适配示例格式)
+			                    const match = toastTitle.match(/"([^"]+)"/);
+			                    // 有匹配结果则替换,无则保留原始msg(而非用兜底提示)
+			                    toastTitle = match ? match[1] : toastTitle;
+			                }
+			                
+			                uni.showToast({
+			                    title: toastTitle,
+			                    icon: 'none'
+			                });
+			            }
+			        },
+			        rej => {
+			            // 请求失败时的兜底提示
+			            uni.showToast({
+			                title: '请求失败,请稍后再试',
+			                icon: 'none'
+			            });
+			        }
+			    );
 			},
+
 			// 查询中奖创建订单信息
 			computedRewardOrder() {
 				let data = {

+ 11 - 5
pages_shopping/live/storeOrderRefundList.vue

@@ -94,13 +94,19 @@
 				userId:uni.getStorageSync("userInfo").userId,
 				statusOptions:[],
 				liveId:null,
+				// tabs: [
+				// 	{name:"全部",status:""},
+				// 	{name:"待平台审核",status:"0"},
+				// 	{name:"待用户发货",status:"1"},
+				// 	{name:"待仓库审核",status:"2"},
+				// 	{name:"财务审核 ",status:"3"},
+				// 	{name:"退款成功 ",status:"4"},
+				// ],
 				tabs: [
 					{name:"全部",status:""},
-					{name:"待平台审核",status:"0"},
-					{name:"待用户发货",status:"1"},
-					{name:"待仓库审核",status:"2"},
-					{name:"财务审核 ",status:"3"},
-					{name:"退款成功 ",status:"4"},
+					{name:"售后中",status:"1"},
+					{name:"已完成",status:"2"},
+					
 				],
 				status: '',
 				mescroll:null,

+ 1 - 8
pages_shopping/shopping/confirmPackageOrder.vue

@@ -266,14 +266,7 @@
 					});
 					return;
 				}
-				if (this.isSubmitting) return; // 防止重复点击
-				 this.isSubmitting = true; // 禁用按钮
-				 if(this.isSubmitting){
-				 	uni.showToast({
-				 		icon:'none',
-				 		title: '不能重复点击',
-				 	});
-				 }
+				
 				uni.requestSubscribeMessage({
 					tmplIds: this.temps,
 					success(res) {