Przeglądaj źródła

直播预告、部分接口修改

liujiaxin 1 miesiąc temu
rodzic
commit
e770209502

+ 5 - 4
api/living.js

@@ -33,8 +33,9 @@ const api = {
 	liveList: '/app/live/liveList', //直播列表
 	// liveShareList: (companyId, pageSize, pageNum) =>
 	// 	`/app/live/liveList/${companyId}?pageSize=${pageSize}&pageNum=${pageNum}`, //销售端分享直播列表
-		liveShareList: ( pageSize, pageNum) =>
-			`/app/live/liveListAll?pageSize=${pageSize}&pageNum=${pageNum}`, //销售端分享直播列表
+		// liveShareList: ( pageSize, pageNum) =>
+		// 	`/app/live/liveListAll?pageSize=${pageSize}&pageNum=${pageNum}`, //销售端分享直播列表
+			liveShareList: '/app/live/listToLiveNoEnd', //销售端分享直播列表
 	subNotifyLive: '/app/live/subNotifyLive' ,//订阅消息
 	coupon: '/app/live/coupon/claim' ,//领取优惠券
 	curCoupon: '/app/live/coupon/curCoupon' ,//优惠券列表
@@ -161,8 +162,8 @@ export function liveList(data) {
 }
 
 //销售端分享直播列表
-export function liveShareList(pageSize, pageNum, data = {}) {
-	return request(api.liveShareList( pageSize, pageNum), data, 'GET', 'application/json;charset=UTF-8');
+export function liveShareList( data ) {
+	return request(api.liveShareList, data, 'GET', 'application/json;charset=UTF-8');
 }
 
 //订阅消息

+ 1 - 1
common/request.js

@@ -30,7 +30,7 @@ export default class Request {
 
 		if (router.indexOf("/live") !== -1||router.indexOf("/liveAPP") !== -1) {
 			path = 'https://userapp.klbycp.com';
-			console.log("在live里面>>>>.",`${path}${router}`)
+			// console.log("在live里面>>>>.",`${path}${router}`)
 			router = router.replace('/liveAPP', '')
 			type=4
 			token = uni.getStorageSync('AppToken');

+ 5 - 5
pages_company/shareLive.vue

@@ -265,11 +265,11 @@
 				//联网加载数据
 				var that = this;
 				if (!this.companyId) return;
-				// var data = {
-				// 	pageNum: page.num,
-				// 	pageSize: page.size,
-				// };
-				liveShareList( page.size, page.num).then(res => {
+				var data = {
+					pageNum: page.num,
+					pageSize: page.size,
+				};
+				liveShareList( data).then(res => {
 					if (res.code == 200) {
 						//设置列表数据
 						if (page.num == 1) {

+ 255 - 134
pages_course/living.vue

@@ -83,17 +83,17 @@
 				</view>
 
 				<!-- 购买提示 -->
-				<view class="purchase-prompt"
+				<!-- 	<view class="purchase-prompt"
 					v-if="showPurchasePrompt && orderUser && orderUser.count && liveItem.status == 2">
 					<image class="prompt-icon mr8"
 						src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/shopping.png" />
 					<text>{{ orderUser.count || 0 }}人正在去购买</text>
-				</view>
+				</view> -->
 
 				<!-- 视频区域 -->
 				<view class="videolist" v-if="liveItem.status == 2">
 					<view class="video-container" :class="liveItem.showType == 1 ? 'horizontal-layout' : ''">
-						<video v-if="liveItem.videoUrl && liveItem.liveType == 2" :id="`myVideo_${liveId}`"
+						<video v-if="liveItem.videoUrl && liveItem.liveType == 2&&!generating" :id="`myVideo_${liveId}`"
 							:autoplay="true" class="video-player" :src="liveItem.videoUrl" object-fit="contain"
 							:custom-cache="false" :enable-progress-gesture="false" vslide-gesture-in-fullscreen="false"
 							:show-center-play-btn="false" :http-cache="false" loop @error="videoError"
@@ -102,7 +102,10 @@
 							: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" :controls="isPlayback"></video>
+						<view v-else class="txt">回放生成中...</view>
+						<view v-if="isPlayback" class="replay-label">回放</view>
 					</view>
+
 				</view>
 
 				<!-- 直播结束状态 -->
@@ -163,7 +166,7 @@
 
 					<!-- 底部输入和操作区域 -->
 					<view class="input-actions-container" :class="{ 'input-actions-focused': isFocus }">
-						<view class="input-container" :class="{
+						<view class="input-container" :class="{ 
 									'input-container-focused': isFocus,
 									'input-container-normal': !isFocus
 								}">
@@ -190,8 +193,8 @@
 										src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/more-icon.png"
 										class="action-icon" /> -->
 
-									<image :src="liveItem.showType == 1
-										    ? '/static/images/more2.png'
+									<image :src="liveItem.showType == 1 
+										    ? '/static/images/more2.png' 
 										    :'https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/more-icon.png'"
 										class="action-icon" />
 								</view>
@@ -247,6 +250,57 @@
 					</view>
 				</view>
 			</view>
+
+			<!-- :show="userlogo" -->
+			<u-popup :show="userlogo" mode="bottom" round='12'>
+				<view class="userlogo column">
+					<!-- <view class="mtb30 justify-start align-center ml20">
+						<u-avatar :src="imgPath+'/app/image/logo.png'" size="50"></u-avatar>
+						<view class="bold mlr20">{{imgname}}</view>
+						<view>申请</view>
+					</view> -->
+					<view class="bold fs36 ml20">授权你的昵称信息</view>
+					<view class="mtb20 justify-between align-center  plr20">
+						<!-- <view class="justify-start align-center">
+							<view class="boxweixin" :class="userData.nickname==''?'boxnosel':'boxsel'">
+								<view v-if="userData.nickname">√</view>
+							</view>
+							<view class="ml20">
+								<view class="base-color-3 bold">第一步</view>
+								<view class="fs32 base-color-9">请点击授权微信昵称</view>
+							</view>
+						</view> -->
+						<view class="button-container">
+							<input type="nickname" class="hidden-input" @blur="onNickNameInput" placeholder="请点击授权微信昵称"
+								@input="onNickNameInput" />
+							<!-- <button class="custom-button"
+								:class="nameuser==''?'subname':'subavt'">{{nameuser?"已授权":'允许授权'}}</button> -->
+						</view>
+					</view>
+					<!-- <view class="mtb20 justify-between align-center  plr20 mt40">
+						<view class="justify-start align-center">
+							<view class="boxweixin" :class="userData.nickname==''?'boxnosel':'boxsel'">
+								<view v-if="userData.avatar">√</view>
+							</view>
+							<view class="ml20">
+								<view class="base-color-3 bold">第二步</view>
+								<view class="fs32 base-color-9">请点击授权微信头像</view>
+							</view>
+						</view>
+						<view class="button-container">
+							<button open-type="chooseAvatar" @chooseavatar="onChooseAvatar" class="hidden-input"
+								v-if="nameuser">
+								允许授权
+							</button>
+							<button class="custom-button sub" @click="shouquan" v-if="nameuser==''">允许授权</button>
+							<button class="custom-button " :class="avataruser==''?'subname':'subavt'"
+								v-else>{{avataruser?"已授权":'允许授权'}}</button>
+						</view>
+					</view> -->
+					<view class="submitname" @click="confimrname">确定</view>
+				</view>
+			</u-popup>
+
 			<!-- 抽奖弹窗 -->
 			<u-popup :show="isShowLotteryPop && countdown" round="40rpx">
 				<view class="lottery-popup">
@@ -295,7 +349,7 @@
 			</u-popup>
 			<!-- 积分弹窗 -->
 			<u-popup :show="!!integral.status" round="20rpx" mode="center" bgColor="#ffffff" zIndex="10076">
-				<view class="integral-popup">
+				<view class="integral-popup color9">
 					<view class="integral-header">
 						<view class="integral-title">观看视频领积分</view>
 						<image class="integral-background-image"
@@ -642,9 +696,12 @@
 		},
 		data() {
 			return {
+				userlogo: false,
 				listTabs: [{
 					name: '讨论',
 				}],
+				generating: false,
+				hasPlayback: false,
 				isPlayback: false, //是否是回放
 				isIOS: false,
 				myselfFlag: false, // yhq
@@ -792,7 +849,7 @@
 				timestamp: '',
 				showadd: false,
 				liveId: null,
-				userinfo: '', //用户信息
+				userinfo: {}, //用户信息
 				userData: {},
 				diffTotalTime: '',
 				address: ''
@@ -1049,7 +1106,10 @@
 
 				// 返回商品ID,如果没有找到则返回null
 				return userPrize ? userPrize.recordId : null;
-			}
+			},
+			nameuser() {
+				return this.userData.nickname
+			},
 
 		},
 		onHide() {
@@ -1154,6 +1214,50 @@
 			}
 		},
 		methods: {
+			shouquan() {
+				if (this.userData.nickname == '') {
+					uni.showToast({
+						icon: 'none',
+						title: "请先授权微信昵称",
+					});
+				}
+			},
+			confimrname() {
+				if (this.userData.nickname == '') {
+					uni.showToast({
+						icon: 'none',
+						title: "请授权微信昵称",
+					});
+					return
+				}
+
+				uni.setStorageSync('userData', this.userData)
+				// this.editUserA()
+				this.userlogo = false
+			},
+			// 授权头像
+			// onChooseAvatar(e) {
+			// 	this.userData.avatar = e.detail.avatarUrl
+			// 	uni.uploadFile({
+			// 		url: uni.getStorageSync('requestPath') + '/app/common/uploadOSS', //仅为示例,非真实的接口地址
+			// 		filePath: e.detail.avatarUrl,
+			// 		name: 'file',
+			// 		formData: {
+			// 			'user': 'test' // 上传附带参数
+			// 		},
+			// 		success: (uploadFileRes) => {
+			// 			console.log(uploadFileRes)
+			// 			// 根据接口具体返回格式   赋值具体对应url
+			// 			var data = JSON.parse(uploadFileRes.data)
+			// 			this.headImg = uni.getStorageSync('requestPath') + data.fileName
+			// 			this.userData.avatar = data.url
+			// 		}
+			// 	});
+			// },
+			onNickNameInput(e) {
+				console.log(e)
+				this.userData.nickname = e.detail.value
+			},
 			async haveLogin() {
 				this.userinfo = uni.getStorageSync('userInfo');
 				this.userData = uni.getStorageSync('userData');
@@ -1213,8 +1317,9 @@
 										this.$store.commit('setCoureLogin', 1);
 										this.isLogin = true
 										this.haveLogin()
+										this.userlogo = true
 										// console.log("TOKEN_KEYAuto",TOKEN_KEYAuto)
-										// this.getIsAddKf()
+										// this.getIsAddKf() 
 									} else {
 										uni.showToast({
 											title: res.msg,
@@ -1553,44 +1658,44 @@
 			},
 
 			// 可靠的滚动方法(包含多种备用方案)
-			simpleScrollToBottom() {
-				const now = Date.now();
+			// simpleScrollToBottom() {
+			// 	const now = Date.now();
 
-				// 防抖检查:如果距离上次滚动时间太短,则忽略
-				if (now - this.lastScrollTime < this.scrollDebounceDelay) {
-					console.log('滚动防抖:忽略频繁调用');
-					return;
-				}
+			// 	// 防抖检查:如果距离上次滚动时间太短,则忽略
+			// 	if (now - this.lastScrollTime < this.scrollDebounceDelay) {
+			// 		console.log('滚动防抖:忽略频繁调用');
+			// 		return;
+			// 	}
 
-				this.lastScrollTime = now;
-				console.log('执行可靠滚动到底部');
+			// 	this.lastScrollTime = now;
+			// 	console.log('执行可靠滚动到底部');
 
-				// 清理之前的定时器
-				if (this.scrollTimer) {
-					clearTimeout(this.scrollTimer);
-					this.scrollTimer = null;
-				}
+			// 	// 清理之前的定时器
+			// 	if (this.scrollTimer) {
+			// 		clearTimeout(this.scrollTimer);
+			// 		this.scrollTimer = null;
+			// 	}
 
-				// 方案1:直接设置scrollTop
-				this.scrollTop = 999999999;
-				console.log('方案1: 设置scrollTop为999999999');
+			// 	// 方案1:直接设置scrollTop
+			// 	this.scrollTop = 999999999;
+			// 	console.log('方案1: 设置scrollTop为999999999');
 
-				// 方案2:使用scroll-into-view(备用方案)
-				if (this.talklist.length > 0) {
-					const lastMessage = this.talklist[this.talklist.length - 1];
-					if (lastMessage && lastMessage.uniqueId) {
-						this.scrollIntoView = `msg-${lastMessage.uniqueId}`;
-						console.log(`方案2: 设置scrollIntoView为msg-${lastMessage.uniqueId}`);
-					}
-				}
+			// 	// 方案2:使用scroll-into-view(备用方案)
+			// 	if (this.talklist.length > 0) {
+			// 		const lastMessage = this.talklist[this.talklist.length - 1];
+			// 		if (lastMessage && lastMessage.uniqueId) {
+			// 			this.scrollIntoView = `msg-${lastMessage.uniqueId}`;
+			// 			console.log(`方案2: 设置scrollIntoView为msg-${lastMessage.uniqueId}`);
+			// 		}
+			// 	}
 
-				// 方案3:延迟再次设置scrollTop(最终备用方案)
-				this.scrollTimer = setTimeout(() => {
-					this.scrollTop = 999999999;
-					console.log('方案3: 延迟设置scrollTop为999999999');
-					this.scrollTimer = null;
-				}, 50);
-			},
+			// 	// 方案3:延迟再次设置scrollTop(最终备用方案)
+			// 	this.scrollTimer = setTimeout(() => {
+			// 		this.scrollTop = 999999999;
+			// 		console.log('方案3: 延迟设置scrollTop为999999999');
+			// 		this.scrollTimer = null;
+			// 	}, 50);
+			// },
 
 			// 强制滚动到底部(用于发送消息,绕过防抖限制)
 			forceScrollToBottomOnSend() {
@@ -1601,13 +1706,10 @@
 					clearTimeout(this.scrollTimer);
 					this.scrollTimer = null;
 				}
-
 				// 强制更新滚动时间,确保不被防抖阻止
 				this.lastScrollTime = Date.now();
-
 				// 清除scroll-into-view,避免冲突
 				this.scrollIntoView = '';
-
 				// 方案1:立即使用scroll-into-view滚动到最后一条消息
 				if (this.talklist.length > 0) {
 					const lastMessage = this.talklist[this.talklist.length - 1];
@@ -1616,15 +1718,12 @@
 						//console.log(`强制滚动方案1: 设置scrollIntoView为list_${lastMessage.uniqueId}`);
 					}
 				}
-
 				// 方案2:同时设置scrollTop为一个非常大的值
 				const targetScrollTop = Date.now(); // 使用时间戳确保每次都不同
 				this.scrollTop = targetScrollTop;
 				//console.log('强制滚动方案2: 设置scrollTop为', targetScrollTop);
-
 				// 方案3:立即尝试原生滚动
 				this.nativeScrollToBottom();
-
 				// 方案4:使用nextTick确保DOM更新后再次滚动
 				this.$nextTick(() => {
 					// 清除scroll-into-view后重新设置scrollTop
@@ -1636,7 +1735,6 @@
 						this.nativeScrollToBottom();
 					}, 50);
 				});
-
 				// 方案5:延迟检查和强制滚动(最终保障)
 				this.scrollTimer = setTimeout(() => {
 					this.checkAndForceScroll(targetScrollTop);
@@ -1660,14 +1758,11 @@
 				// 设置一个新的scrollTop值
 				this.scrollTop = Date.now() + Math.random() * 1000;
 				//console.log('最终检查: 设置新的scrollTop值');
-
 				// 多次尝试原生滚动
 				this.nativeScrollToBottom();
-
 				setTimeout(() => {
 					this.nativeScrollToBottom();
 				}, 100);
-
 			},
 
 			// 使用原生API强制滚动(最终备用方案)
@@ -1801,7 +1896,7 @@
 				// 	}
 				// });
 				uni.showToast({
-					title: '系统升级中,兑换请联系伴学助手!',
+					title: '系统升级中,兑换请联系客服!',
 					icon: 'none'
 				});
 			},
@@ -2080,7 +2175,6 @@
 				uni.requestSubscribeMessage({
 					tmplIds: [templateId],
 					success: (res) => {
-						// console.log("模板订阅状态", res[templateId]);
 						if (res[templateId] === 'accept') {
 							uni.showToast({
 								title: '订阅成功,开播将提醒您',
@@ -2141,7 +2235,6 @@
 					console.warn('网络不可用或Socket连接异常,跳过心跳发送');
 					return;
 				}
-
 				this.lastHeartBeatTime = Date.now();
 
 				try {
@@ -2215,7 +2308,6 @@
 					default:
 						networkMultiplier = 1.5;
 				}
-
 				return Math.min(baseDelay * retryMultiplier * networkMultiplier, 10000); // 最大10秒
 			},
 
@@ -2274,15 +2366,12 @@
 					console.log('手动关闭连接,不进行重连');
 					return;
 				}
-
 				// 防止重复重连
 				if (this.reconnectTimer) {
 					console.log('重连已在进行中,跳过重复重连');
 					return;
 				}
-
 				this.stopHeartBeat();
-
 				// 检查网络状态
 				if (!this.isNetworkAvailable) {
 					console.warn('网络不可用,延迟重连');
@@ -2292,18 +2381,14 @@
 					}, 5000);
 					return;
 				}
-
 				if (this.reconnectCount < this.maxReconnectAttempts) {
 					this.reconnectCount++;
-
 					// 指数退避算法:基础延迟 * 2^(重连次数-1) + 随机抖动
 					const baseDelay = 1000;
 					const exponentialDelay = baseDelay * Math.pow(2, this.reconnectCount - 1);
 					const jitter = Math.random() * 1000; // 随机抖动,避免同时重连
 					const totalDelay = Math.min(exponentialDelay + jitter, 30000); // 最大30秒
-
 					console.log(`第${this.reconnectCount}次重连,延迟${Math.round(totalDelay)}ms,网络类型:${this.networkType}`);
-
 					this.reconnectTimer = setTimeout(() => {
 						this.reconnectTimer = null; // 清理定时器引用
 						// 重连前再次检查网络状态和连接状态
@@ -2345,7 +2430,6 @@
 						return;
 					}
 				}
-
 				// 触发重连
 				this.handleReconnect();
 			},
@@ -2353,13 +2437,11 @@
 			resetReconnectState() {
 				this.reconnectCount = 0;
 				this.heartBeatRetryCount = 0;
-
 				// 清理重连定时器
 				if (this.reconnectTimer) {
 					clearTimeout(this.reconnectTimer);
 					this.reconnectTimer = null;
 				}
-
 				// 重置自适应心跳间隔
 				this.adaptiveHeartBeatInterval = this.heartBeatInterval;
 			},
@@ -2446,30 +2528,12 @@
 				// 立即更新状态,确保UI零延迟响应
 				this.isFocus = true;
 				this.isKeyboardShow = true;
-
-				// 获取容器信息用于调试
-				// this.$nextTick(() => {
-				// 	try {
-				// 		// 获取输入框容器元素信息
-				// 		const query = uni.createSelectorQuery().in(this);
-				// 		query.select('.input-container-optimized').boundingClientRect((data) => {
-				// 			if (data) {
-				// 				console.log('输入框容器当前宽度:', data.width);
-				// 				console.log('输入框容器当前高度:', data.height);
-				// 				console.log('容器位置信息:', data);
-				// 			} else {
-				// 				console.log('未找到输入框容器元素');
-				// 			}
-				// 		}).exec();
-				// 	} catch (error) {
-				// 		console.log('获取容器信息失败:', error);
-				// 	}
-				// });
 			},
 			inputBlur() {
 				this.isFocus = false;
 			},
 			getTimeDifferenceInSeconds(createTimeStr) {
+				if(!createTimeStr) return;
 				const createTime = new Date(createTimeStr.replace(/-/g, '/'));
 				const now = new Date();
 				const timeDiffMs = now - createTime;
@@ -2493,15 +2557,12 @@
 					const diff = this.getTimeDifferenceInSeconds(this.liveItem.startTime);
 					if (diff > this.liveItem.duration) {
 						const storedProgress = uni.getStorageSync(this.videoProgressKey) || 0;
-						// console.log("开始断点续播了storedProgress", storedProgress)
 						currentTime = storedProgress >= this.liveItem.duration ? 0 : storedProgress || 0;
-						// console.log("开始断点续播了currentTime", currentTime);
 						this.isPlayback = true;
+						this.hasPlayback = true;
 					} else {
 						currentTime = diff % this.liveItem.duration;
 					}
-
-					// currentTime = diff % this.liveItem.duration;
 				} else if (this.liveItem.liveType === 3) {
 					// 回放:从存储中获取进度
 					const storedProgress = uni.getStorageSync(this.videoProgressKey);
@@ -2532,7 +2593,6 @@
 
 			// 视频时间更新
 			onVideoTimeUpdate(e) {
-
 				// 获取当前播放时间
 				this.videoCurrentTime = e.detail.currentTime;
 				// 每隔10秒保存一次进度(避免频繁存储)
@@ -2541,8 +2601,18 @@
 				}
 				const diff = this.getTimeDifferenceInSeconds(this.liveItem.startTime)
 				if (diff >= this.liveItem.duration) {
-					this.closeWebSocket(true);
-					this.isEnd = true
+					if (!this.hasPlayback) {
+						this.generating = true;
+						this.pauseVideo();
+						setTimeout(() => {
+							this.playVideo();
+							this.generating = false;
+							this.hasPlayback = true;
+						
+						}, 180000);
+						this.closeWebSocket(true);
+						this.isEnd = true;
+					}
 				}
 			},
 
@@ -2922,6 +2992,7 @@
 			},
 
 			pauseVideo() {
+				console.log("暂停了")
 				if (!this.liveItem) return;
 
 				try {
@@ -3072,7 +3143,6 @@
 						let virtualData = [];
 						let virtualTotal = res.total * 10;
 						this.liveUserTotal = virtualTotal;
-						console.log("人数是>>", this.liveUserTotal)
 						for (let i = 0; i < virtualTotal; i++) {
 							let data = {
 								avatar: '',
@@ -3874,7 +3944,6 @@
 								if (index !== -1) {
 									this.liveViewersData.splice(index, 1);
 									this.liveUserTotal--; // 根据userId删除对应的用户数据
-									console.log("3人数是", this.liveUserTotal)
 								}
 							}
 							this.inAndOut = socketMessage;
@@ -3908,9 +3977,9 @@
 						} else if (socketMessage.cmd == 'deleteMsg') {
 							const index = this.talklist.findIndex(item => item.msgId == socketMessage.msg);
 							if (index !== -1) {
-							  this.talklist.splice(index, 1);
+								this.talklist.splice(index, 1);
 							}
-						}else if (socketMessage.cmd == 'LotteryDetail') {
+						} else if (socketMessage.cmd == 'LotteryDetail') {
 							try {
 								this.prizeInfo = Array.isArray(JSON.parse(socketMessage.data || '[]')) ? JSON.parse(
 									socketMessage.data || '[]') : [];
@@ -3989,32 +4058,34 @@
 				};
 				// 发送socket消息
 				try {
-
-					this.socket.send({
-						data: JSON.stringify(data),
-						success: () => {
-							this.value = '';
-							// 发送成功后强制滚动到底部,无论当前滚动位置如何
-							this.forceScrollToBottomOnSend();
-						},
-						fail: (err) => {
-							console.error('消息发送失败:', err);
-							if (retries > 0) {
-								uni.showToast({
-									title: `发送失败,正在重试(${retries}次)`,
-									icon: 'none'
-								});
-								setTimeout(() => this.sendMsg(retries - 1), 500);
-							} else {
-								uni.showToast({
-									title: '发送失败,请稍后再试',
-									icon: 'none'
-								});
-								this.value = text; // 恢复输入框内容
+					if (this.myselfFlag) {
+						this.addToTalkList(data);
+					} else {
+						this.socket.send({
+							data: JSON.stringify(data),
+							success: () => {
+								this.value = '';
+								// 发送成功后强制滚动到底部,无论当前滚动位置如何
+								this.forceScrollToBottomOnSend();
+							},
+							fail: (err) => {
+								console.error('消息发送失败:', err);
+								if (retries > 0) {
+									uni.showToast({
+										title: `发送失败,正在重试(${retries}次)`,
+										icon: 'none'
+									});
+									setTimeout(() => this.sendMsg(retries - 1), 500);
+								} else {
+									uni.showToast({
+										title: '发送失败,请稍后再试',
+										icon: 'none'
+									});
+									this.value = text; // 恢复输入框内容
+								}
 							}
-						}
-					});
-
+						});
+					}
 
 				} catch (err) {
 					console.error('发送消息异常:', err);
@@ -4085,9 +4156,11 @@
 		--chat-bg: transparent;
 		--video-height: 100vh;
 		--chat-height: 30vh;
+		--pop-bg: #333333;
 	}
 
 	.swiper-wrapper.horizontal {
+		--pop-bg: #ECF5F4;
 		/* 默认变量(浅色主题) */
 		--bottom-color: #fff;
 		--name-color: #666666;
@@ -4100,11 +4173,6 @@
 		--chat-height: clac(100% - 650rpx);
 	}
 
-	.video-container {
-		height: var(--video-height);
-	}
-
-
 
 
 	// 主容器
@@ -4128,18 +4196,20 @@
 			// 预告直播盒子
 			.trailer-box {
 				width: calc(100% - 80rpx);
-				background: #333333;
+				background: var(--pop-bg);
 				border-radius: 24rpx;
-				position: relative;
+				position: absolute;
 				top: 15%;
 				left: 50%;
 				transform: translateX(-50%);
 				display: flex;
 				flex-direction: column;
 				align-items: center;
-				color: #ffffff;
+				color: var(--text-color);
 				padding: 20rpx;
 				z-index: 9999;
+				box-shadow: 0 8rpx 40rpx rgba(0, 0, 0, 0.12);
+				 transition: box-shadow 0.3s ease;
 
 				.trailer-video {
 					width: 100%;
@@ -4362,6 +4432,13 @@
 							// z-index: 99;
 						}
 
+						.txt {
+							text-align: center;
+							font-weight: 500;
+							font-size: 40rpx;
+							line-height: var(--video-height);
+						}
+
 						.video-player {
 							width: 100%;
 							height: 100%;
@@ -4378,10 +4455,10 @@
 
 						.replay-label {
 							position: absolute;
-							top: 50rpx;
-							right: 16rpx;
+							top: 15%;
+							right: 24rpx;
 							background-color: rgba(57, 57, 57, 0.6);
-							padding: 4rpx 10rpx;
+							padding: 6rpx 16rpx;
 							color: #fff;
 							border-radius: 15rpx;
 						}
@@ -4728,6 +4805,49 @@
 				}
 			}
 
+			.userlogo {
+				padding: 40rpx 20rpx;
+				color: #181818;
+
+				.boxweixin {
+					width: 44rpx;
+					height: 44rpx;
+					border-radius: 50%;
+					text-align: center;
+					line-height: 34rpx;
+					color: #0a0;
+				}
+
+				.button-container {
+					position: relative;
+					// width: 240rpx;
+
+					.subname {
+						background-color: #00aa00;
+						color: #fff;
+					}
+
+					.subavt {
+						background-color: #fff;
+						border: 2rpx #0a0 solid;
+						color: #00aa00;
+					}
+				}
+
+				.submitname {
+					background-color: #00aa00;
+					color: #fff;
+					width: 90%;
+					margin: 0 auto;
+					text-align: center;
+					padding: 30rpx;
+					margin-top: 40rpx;
+				}
+
+
+			}
+
+
 			// 抽奖弹窗1
 			.lottery-popup {
 				position: relative;
@@ -4990,6 +5110,7 @@
 					top: -180rpx;
 					width: 64rpx;
 					height: 64rpx;
+					z-index: 9;
 				}
 
 				.lottery-top-image {
@@ -5423,7 +5544,7 @@
 					}
 
 					.action-label {
-						color:#1e1e1e;
+						color: #1e1e1e;
 						text-align: center;
 						margin-top: 10rpx;
 					}
@@ -5679,4 +5800,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 1 - 1
pages_shopping/live/confirmCreateOrder.vue

@@ -163,7 +163,7 @@
 				confirmParam: [],
 				type: '',
 				isFirstLoad: true,
-				recordId:null
+				recordId:''
 			}
 		},