liujiaxin 3 هفته پیش
والد
کامیت
04d103451b

+ 98 - 20
pages/shopping/paymentOrder.vue

@@ -179,20 +179,19 @@
 				payLimitTime: null,
 				order: null,
 				user: null,
-				payParams:null
+				payParams: null,
+				userinfo: {},
+				 isPaying: false, // 防止重复支付
+				    payDebounceTimer: null // 防抖定时器
 			}
 		},
 		onLoad(option) {
-			this.orderId = JSON.parse(option.orderId);
-			// this.orderBindUser(this.orderId)
-			this.getStoreOrderById();
-			this.getStoreConfig();
-			this.getUserInfo();
-			// uni.showShareMenu({
-			// 	withShareTicket:true,
-			// 	//小程序的原生菜单中显示分享按钮,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
-			// 	menus:["shareAppMessage"] //不设置默认发送给朋友
-			// })
+			 this.getSafeUserInfo();
+			  this.orderId = JSON.parse(option.orderId);
+			  // this.orderBindUser(this.orderId)
+			  this.getStoreOrderById();
+			  this.getStoreConfig();
+			  this.getUserInfo();
 		},
 		onUnload() {
 			this.clearPayTypeFun()
@@ -206,7 +205,39 @@
 		// 	}
 
 		// },
-		methods: {
+		methods: {getSafeUserInfo() {
+  try {
+    const userInfoStr = uni.getStorageSync('userInfo');
+    if (!userInfoStr) {
+      this.userinfo = {};
+      return;
+    }
+    
+    // 如果是字符串,解析为对象
+    if (typeof userInfoStr === 'string') {
+      this.userinfo = JSON.parse(userInfoStr);
+    } else {
+      // 如果是对象,直接使用
+      this.userinfo = userInfoStr;
+    }
+    
+    console.log('获取到的用户信息:', this.userinfo);
+  } catch (error) {
+    console.error('获取用户信息失败:', error);
+    this.userinfo = {};
+  }
+},clearTokenAndRedirect() {
+  // 清除 token
+  uni.removeStorageSync('AppToken');
+  uni.removeStorageSync('userInfo');
+  
+  // 跳转到登录页
+  setTimeout(() => {
+    uni.reLaunch({
+      url: '/pages/auth/login'
+    });
+  }, 500);
+},
 			async clearPayTypeFun() {
 				this.payParams && this.payParams.orderId && await clearPayType(this.payParams)
 			},
@@ -366,14 +397,61 @@
 				})
 			},
 			// 防抖后的支付方法
-			payOrder: function() {
-				// 创建防抖函数实例
-				const debouncedPay = this.debounce(function() {
-					this.executePay();
-				}, 1000); // 1秒防抖时间,可以根据需要调整
-
-				// 执行防抖函数
-				debouncedPay();
+			// 修复后的支付方法
+			payOrder() {
+			  // 1. 安全地获取用户信息
+			  this.getSafeUserInfo();
+			  
+			  // 2. 检查 maOpenId,但不要直接修改字符串
+			  console.log('支付前检查用户信息:', this.userinfo);
+			  
+			  // 3. 检查用户信息是否有效
+			  if (!this.userinfo || Object.keys(this.userinfo).length === 0) {
+			    uni.showToast({
+			      title: '用户信息异常,请重新登录',
+			      icon: 'none'
+			    });
+			    
+			    // 清除 token 并跳转到登录页
+			    this.clearTokenAndRedirect();
+			    return;
+			  }
+			  // 4. 检查 maOpenId,如果不存在则提示重新登录
+			  if (!this.userinfo.maOpenId) {
+			    uni.showModal({
+			      title: '提示',
+			      content: '用户信息不完整,需要重新登录',
+			      success: (res) => {
+			        if (res.confirm) {
+			          this.clearTokenAndRedirect();
+			        }
+			      }
+			    });
+			    return;
+			  }
+			
+			  
+			  // 5. 检查登录状态
+			  this.utils.isLogin().then(res => {
+			    if (res) {
+			      // 创建防抖函数实例
+			      const debouncedPay = this.debounce(function() {
+			        this.executePay();
+			      }, 1000); // 1秒防抖时间
+			
+			      // 执行防抖函数
+			      debouncedPay();
+			    } else {
+			      // 未登录,跳转到登录页
+			      this.clearTokenAndRedirect();
+			    }
+			  }).catch(err => {
+			    console.error('检查登录状态失败:', err);
+			    uni.showToast({
+			      title: '登录状态异常',
+			      icon: 'none'
+			    });
+			  });
 			}, // 实际的支付执行逻辑
 			executePay() {
 				var data = {

+ 2 - 2
pages_course/components/like.vue

@@ -207,8 +207,8 @@
 		position: relative;
 		
 		.image {
-			width: 48rpx;
-			height: 48rpx;
+			width: 88rpx;
+			height: 88rpx;
 		}
 
 		/* 动画图标样式 */

+ 585 - 119
pages_course/living.vue

@@ -55,7 +55,7 @@
 
 			<view class="content" :class="{ 'horizontal-content': isFocus==1, 'trailer-content': liveItem.status==1  }">
 				<!-- 顶部信息栏 -->
-				<view class="top-info-bar" :class="liveItem.showType == 1 ? 'horizontal-top' : ''">
+				<view class="top-info-bar" v-if="!isFullscreen" :class="liveItem.showType == 1 ? 'horizontal-top' : ''">
 					<view class="user-info-section">
 						<image v-if="!scene&&liveItem.showType==2" @click="goBack" class="back-icon mr4"
 							src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/return3.png" />
@@ -95,31 +95,45 @@
 
 				<!-- 视频区域 -->
 				<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&&!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"
-							@timeupdate="onVideoTimeUpdate" @loadedmetadata="onVideoMetaLoaded" @pause="onVideoPause"
-							@play="onVideoPlay" @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" :controls="isPlayback"></video> -->
-						<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="true" :show-center-play-btn="false" :http-cache="false" loop
-							@error="videoError" @timeupdate="onVideoTimeUpdate" @loadedmetadata="onVideoMetaLoaded"
-							@pause="onVideoPause" @play="onVideoPlay" @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" :controls="false" show-fullscreen-btn
-							show-play-btn show-mute-btn enable-play-gesture="true"></video>
-						<view v-else class="txt">回放生成中...</view>
-						<view v-if="isPlayback" class="replay-label">回放</view>
-					</view>
+				  <view class="video-container" :class="liveItem.showType == 1 ? 'horizontal-layout' : ''">
+				    <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="true" :show-center-play-btn="false" :http-cache="false" loop
+				           @error="videoError" @timeupdate="onVideoTimeUpdate" @loadedmetadata="onVideoMetaLoaded"
+				           @pause="onVideoPause" @play="onVideoPlay" @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" :controls="false" :show-fullscreen-btn="false"
+				           show-play-btn show-mute-btn enable-play-gesture="true"
+				           @fullscreenchange="onFullscreenChange" x5-video-player-fullscreen="true"
+				           x5-video-player-type="h5" x5-video-orientation="landscape" :webkit-playsinline="true"
+				           playsinline="true" :x5-playsinline="true">
+				    </video>
+				    
+				    <!-- 全屏返回按钮 - 只在全屏状态下显示 -->
+				   <!-- <view v-if="isFullscreen" class="fullscreen-exit-btn" @click="exitFullscreen">
+				      <image src="/static/images/half_screen.png" class="exit-fullscreen-icon" />
+				      <text class="exit-text">退出全屏</text>
+				    </view> -->
+				    
+				    <!-- 全屏按钮 - 只在非全屏状态下显示 -->
+				   <!-- <view v-if="showCustomControls && liveItem.showType==1 && !isFullscreen" 
+				          class="custom-controls" @click="toggleFullscreen">
+				      <image src="/static/images/full_screen.png" class="control-icon" />
+				    </view> -->
+				    
+				    <!-- 投诉按钮 -->
+				    <view v-if="liveItem.showType==2" class="complaint-box"
+				          @click="navgetTo('/pages_shopping/live/complaintList') ">
+				      <image class="image w32 h32 mr10" src="/static/images/complaint.png" mode="widthFix" />
+				      <view class="fs26">投诉</view>
+				    </view>
+				    
+				    <!-- 回放标签 -->
+				    <view v-if="isPlayback" class="replay-label">回放</view>
+				  </view>
 				</view>
-
 				<!-- 直播结束状态 -->
 				<!-- v-if="liveItem.status == 3" -->
 				<view class="videolist" v-if="liveItem.status == 3">
@@ -142,6 +156,25 @@
 						<view v-if="liveItem.videoUrl && liveItem.liveType == 3" class="replay-label">直播回放</view>
 					</view>
 				</view>
+				<view class="slide-group">
+					<view class="action-button-group" v-if="!isFocus">
+						<view :class="[liveItem.showType === 1 ? 'horizontal' : 'vertical','icon-button','ml20']">
+							<button open-type="share" class="action-icon button-reset">
+								<image class="action-icon"
+									src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/weixin.png"
+									mode="widthFix" />
+							</button>
+						</view>
+					</view>
+					<view class="action-button-group" v-if="!isFocus">
+						<view
+							:class="[liveItem.showType === 1 ? 'horizontal' : 'vertical','icon-button','ml20','like-container']"
+							@click="onLike">
+							<LikeButton :initialCount="100" :heartsPerClick="5" @like="onLike" />
+							<view class="like-count">{{formattedLikeCount||0 }}</view>
+						</view>
+					</view>
+				</view>
 
 				<!-- 底部聊天区域 -->
 				<view class="chat-area-container" :class="{
@@ -153,6 +186,12 @@
 						<u-tabs :list="listTabs" @click="clickTabs" lineColor="#02B176"
 							:activeStyle="{color: '#02B176',fontWeight: 'bold',transform: 'scale(1.05)'}">
 						</u-tabs>
+						<!-- 投诉 -->
+						<view v-if="liveItem.showType==1" class="complaint-box"
+							@click="navgetTo('/pages_shopping/live/complaintList') ">
+							<image class="image w32 h32 mr10" src="/static/images/complaint2.png" mode="widthFix" />
+							<view class="fs26">投诉</view>
+						</view>
 					</view>
 
 					<view class="chat-content-wrapper" :class="{ 'chat-content-focused': isFocus }">
@@ -162,7 +201,8 @@
 						</view>
 						<scroll-view id="msgScroll" v-if="Array.isArray(talklist)" enable-flex scroll-y="true"
 							:enhanced="true" :bounces="false" :show-scrollbar="false" :fast-deceleration="false"
-							:enable-back-to-top="false" class="message-scroll-view"  :class="liveItem.status == 1 ? 'message-scroll2' : ''" :scroll-top="scrollTop"
+							:enable-back-to-top="false" class="message-scroll-view"
+							:class="liveItem.status == 1 ? 'message-scroll2' : ''" :scroll-top="scrollTop"
 							:scroll-into-view="scrollIntoView" @scroll="onScroll" ref="scrollView">
 							<view class="message-list" v-for="(item, talkIndex) in (talklist || [])"
 								:key="item.uniqueId " :id="`list_${item.uniqueId }`" v-show="item.cmd != 'red' ">
@@ -203,7 +243,7 @@
 						<view class="action-buttons" v-if="!isFocus">
 							<view class="action-button-group" v-if="!isFocus">
 								<view
-									:class="[liveItem.showType === 1 ? 'horizontal' : 'vertical','icon-button','ml20']"
+									:class="[liveItem.showType === 1 ? 'horizontal' : 'vertical','icon-button','mr20']"
 									@click="isMore=true,shopping=false">
 									<!-- <image
 										src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/more-icon.png"
@@ -215,29 +255,13 @@
 										class="action-icon" />
 								</view>
 							</view>
-							<view class="action-button-group" v-if="!isFocus">
-								<view
-									:class="[liveItem.showType === 1 ? 'horizontal' : 'vertical','icon-button','ml20']">
-									<button open-type="share" class="action-icon button-reset">
-										<image class="action-icon"
-											src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/weixin.png"
-											mode="widthFix" />
-									</button>
-								</view>
-							</view>
-							<view class="icon-button " @tap="openCart()">
+
+							<view class="icon-button mr20" @tap="openCart()">
 								<image
 									src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/shopping.png"
 									class="cart-icon" />
 							</view>
-							<view class="action-button-group" v-if="!isFocus">
-								<view
-									:class="[liveItem.showType === 1 ? 'horizontal' : 'vertical','icon-button','ml20','like-container']"
-									@click="onLike">
-									<LikeButton :initialCount="100" :heartsPerClick="5" @like="onLike" />
-									<view class="like-count">{{formattedLikeCount||0 }}</view>
-								</view>
-							</view>
+
 						</view>
 					</view>
 				</view>
@@ -270,18 +294,12 @@
 			<!-- :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-between align-center  plr20">
 						<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> -->
+							<input type="nickname" class="hidden-input"
+								placeholder-style="color:#ffffff; font-size:44rpx;" @blur="onNickNameInput"
+								placeholder="请点击授权微信昵称" @input="onNickNameInput" />
 						</view>
 					</view>
 					<view class="submitname" @click="confimrname">确定</view>
@@ -689,6 +707,11 @@
 		},
 		data() {
 			return {
+				isFullscreen: false,
+				isMuted: false,
+				showCustomControls: true,
+				videoContext: null,
+
 				isNow: false,
 				fakeAvatar: Array.from({
 						length: 11
@@ -963,6 +986,20 @@
 			this.getliving(this.liveId);
 		},
 		mounted() {
+			// 获取 video 上下文
+		// 监听视频全屏事件
+		  setTimeout(() => {
+		    this.videoContext = uni.createVideoContext(`myVideo_${this.liveId}`, this);
+		    
+		    // 添加全屏状态变化监听(更可靠的方式)
+		    if (this.videoContext) {
+		      // 使用 uni.onUserCaptureScreen 作为备选方案
+		      uni.onUserCaptureScreen(() => {
+		        console.log('用户截屏,可能是全屏状态');
+		      });
+		    }
+		  }, 1000);
+
 			const systemInfo = uni.getSystemInfoSync();
 			this.isIOS = systemInfo.platform === 'ios';
 		},
@@ -1038,10 +1075,31 @@
 				this.totalTraffic = 0;
 			}
 			this.startTimer();
-			if (!this.isNow) {
-				this.userlogo = true
-			}
+
+			this.$nextTick(() => {
+				if (!this.userInfo || !this.userInfo.updateTime) {
+					console.log('用户信息不完整,显示授权弹窗');
+					this.userlogo = true;
+					return;
+				}
+
+				// 重新计算 isNow
+				const isNowCalculated = dayjs(this.userInfo.updateTime).isSame(dayjs(), 'day');
+				console.log('重新计算 isNow:', isNowCalculated);
+
+				if (!isNowCalculated) {
+					console.log('不是今天更新过,显示授权弹窗');
+					this.userlogo = true;
+				}
+				setTimeout(() => {
+					this.videoContext = uni.createVideoContext(`myVideo_${this.liveId}`, this);
+					console.log('videoContext 初始化完成:', this.videoContext);
+				}, 1000);
+			});
+			// 初始化横屏支持
+			this.initFullscreenSupport();
 		},
+		
 
 		//分享给好友
 		onShareAppMessage() {
@@ -1056,7 +1114,9 @@
 					console.error('分享失败', err);
 				}
 			};
-		}, // 分享到朋友圈
+		},
+		
+		// 分享到朋友圈
 		onShareTimeline() {
 			return {
 				title: '邀请你来观看直播:' + this.liveItem.liveName,
@@ -1215,6 +1275,11 @@
 			// 清理大数据和状态
 			this.clearBigData();
 			this.resetAllStates();
+			// 清理屏幕方向锁定
+			this.unlockOrientation();
+
+			// 移除屏幕方向监听
+			this.removeOrientationChangeListener();
 		},
 
 		mounted() {
@@ -1261,7 +1326,191 @@
 				immediate: true
 			}
 		},
-		methods: {
+		methods: {// 退出全屏
+exitFullscreen() {
+  console.log('退出全屏按钮被点击');
+  
+  if (!this.videoContext) {
+    console.log('创建 videoContext');
+    this.videoContext = uni.createVideoContext(`myVideo_${this.liveId}`, this);
+  }
+  
+  if (!this.videoContext) {
+    console.error('videoContext 创建失败');
+    return;
+  }
+  
+  if (this.isFullscreen) {
+    console.log('执行退出全屏操作');
+    this.videoContext.exitFullScreen();
+  } else {
+    console.log('当前不是全屏状态,无需退出');
+  }
+},
+			// 添加屏幕方向变化监听
+			addOrientationChangeListener() {
+				if (window.addEventListener) {
+					window.addEventListener('orientationchange', this.handleOrientationChange);
+				}
+			},
+			
+			// 移除屏幕方向变化监听
+			removeOrientationChangeListener() {
+				if (window.removeEventListener) {
+					window.removeEventListener('orientationchange', this.handleOrientationChange);
+				}
+			}, // 处理屏幕方向变化
+			handleOrientationChange() {
+				const orientation = window.orientation;
+				console.log('屏幕方向变化:', orientation);
+			
+				// 0: 竖屏
+				// 90: 横屏(向左转)
+				// -90: 横屏(向右转)
+				// 180: 倒置(很少用)
+			
+				if (this.isFullscreen && Math.abs(orientation) !== 90) {
+					// 全屏状态下,如果不是横屏,尝试退出全屏
+					console.log('全屏状态下屏幕方向不正确,尝试退出全屏');
+					if (this.videoContext) {
+						this.videoContext.exitFullScreen();
+					}
+				}
+			},
+			
+			// 强制横屏全屏(备用方案)
+			forceLandscapeFullscreen() {
+				// 尝试多种全屏方式
+				try {
+					// 方案1: 使用video的requestFullScreen
+					if (this.videoContext) {
+						this.videoContext.requestFullScreen({
+							direction: 90
+						});
+						return true;
+					}
+				} catch (e) {
+					console.log('方案1失败:', e);
+				}
+			
+				try {
+					// 方案2: 尝试DOM全屏API
+					const videoElement = document.getElementById(`myVideo_${this.liveId}`);
+					if (videoElement && videoElement.requestFullscreen) {
+						videoElement.requestFullscreen();
+						return true;
+					}
+				} catch (e) {
+					console.log('方案2失败:', e);
+				}
+			
+				try {
+					// 方案3: 使用Web API全屏
+					if (document.documentElement.requestFullscreen) {
+						document.documentElement.requestFullscreen();
+						return true;
+					}
+				} catch (e) {
+					console.log('方案3失败:', e);
+				}
+			
+				console.log('所有全屏方案都失败了');
+				uni.showToast({
+					title: '无法全屏播放,请尝试手动横屏',
+					icon: 'none'
+				});
+				return false;
+			},
+			// 初始化全屏支持
+			initFullscreenSupport() {
+				// 检测是否支持全屏API
+				if (document.fullscreenEnabled) {
+					console.log('浏览器支持全屏API');
+				} else {
+					console.log('浏览器不支持全屏API,使用备用方案');
+				}
+			},
+			// 切换全屏
+			// 切换全屏
+			toggleFullscreen() {
+			  console.log('全屏按钮被点击');
+			  
+			  // 确保 videoContext 存在
+			  if (!this.videoContext) {
+			    console.log('创建 videoContext');
+			    this.videoContext = uni.createVideoContext(`myVideo_${this.liveId}`, this);
+			  }
+			  
+			  if (!this.videoContext) {
+			    console.error('videoContext 创建失败');
+			    return;
+			  }
+			  
+			  if (this.isFullscreen) {
+			    this.exitFullscreen();
+			  } else {
+			    console.log('请求全屏(横屏模式)');
+			    this.videoContext.requestFullScreen({
+			      direction: 90 // 90表示横屏,0是竖屏
+			    });
+			  }
+			},
+			// 全屏状态变化监听
+			// 加强 onFullscreenChange 方法
+			onFullscreenChange(e) {
+			  console.log('全屏状态变化事件:', e);
+			  
+			  // 确保正确获取状态
+			  const isFullScreen = e.detail && e.detail.fullScreen;
+			  console.log('全屏状态:', isFullScreen);
+			  
+			  this.isFullscreen = isFullScreen;
+			  
+			  // 全屏时隐藏自定义控制条
+			  this.showCustomControls = !this.isFullscreen;
+			  
+			  // 强制更新UI
+			  this.$forceUpdate();
+			  
+			  // 调试输出
+			  console.log('isFullscreen:', this.isFullscreen);
+			  console.log('showCustomControls:', this.showCustomControls);
+			},
+			 // 锁定屏幕方向为横屏
+			lockOrientation() {
+				// 设置屏幕方向为横屏
+				try {
+					// 尝试锁定横屏
+					plus.screen.lockOrientation('landscape-primary');
+				} catch (e) {
+					console.log('锁定屏幕方向失败:', e);
+					// 备用方案
+					try {
+						// 使用 Web API(如果支持)
+						if (screen.orientation && screen.orientation.lock) {
+							screen.orientation.lock('landscape');
+						}
+					} catch (err) {
+						console.log('备用方案也失败了:', err);
+					}
+				}
+			}, // 解锁屏幕方向
+			unlockOrientation() {
+				try {
+					plus.screen.unlockOrientation();
+				} catch (e) {
+					console.log('解锁屏幕方向失败:', e);
+					// 备用方案
+					try {
+						if (screen.orientation && screen.orientation.unlock) {
+							screen.orientation.unlock();
+						}
+					} catch (err) {
+						console.log('备用解锁方案也失败了:', err);
+					}
+				}
+			},
+
 			shouquan() {
 				if (this.user.nickname == '') {
 					uni.showToast({
@@ -2261,7 +2510,9 @@
 					(res) => {
 						if (res.code == 200) {
 							this.userInfo = res.user;
+							console.log("今天到底是什么时候》》》》》》》》》》", this.userInfo.updateTime)
 							this.isNow = dayjs(this.userInfo.updateTime).isSame(dayjs(), 'day')
+							console.log("今天到底是什么时候》》》》》》》》》》", this.isNow)
 						} else {
 							uni.showToast({
 								icon: 'none',
@@ -4239,6 +4490,152 @@
 </script>
 
 <style scoped lang="scss">
+	.fullscreen-exit-btn {
+	  position: absolute;
+	  bottom: 120rpx;
+	  right: 40rpx;
+	  display: flex;
+	  flex-direction: column;
+	  align-items: center;
+	  justify-content: center;
+	  z-index: 99999;
+	  background: rgba(0, 0, 0, 0.6);
+	  border-radius: 40rpx;
+	  padding: 20rpx 24rpx;
+	  transition: all 0.3s ease;
+	  
+	  &:active {
+	    transform: scale(0.95);
+	    background: rgba(0, 0, 0, 0.8);
+	  }
+	  
+	  .exit-fullscreen-icon {
+	    width: 40rpx;
+	    height: 40rpx;
+	    margin-bottom: 10rpx;
+	  }
+	  
+	  .exit-text {
+	    color: #ffffff;
+	    font-size: 22rpx;
+	    white-space: nowrap;
+	  }
+	}
+	// 全屏时的样式调整
+	.video-container.fullscreen-mode {
+	  position: fixed;
+	  top: 0;
+	  left: 0;
+	  width: 100%;
+	  height: 100%;
+	  z-index: 999999;
+	  background-color: #000;
+	  
+	  .video-player {
+	    width: 100%;
+	    height: 100%;
+	  }
+	  
+	 .custom-controls {
+	   position: absolute;
+	   bottom: 42rpx;
+	   right: 20rpx;
+	   display: flex;
+	   align-items: center;
+	   z-index: 9999;
+	   background: rgba(0, 0, 0, 0.5);
+	   border-radius: 40rpx;
+	   padding: 10rpx 20rpx;
+	   transition: all 0.3s ease;
+	   
+	   // 全屏状态下的样式调整
+	   .fullscreen-mode & {
+	     display: none;
+	   }
+	   
+	   &:active {
+	     transform: scale(0.95);
+	     background: rgba(0, 0, 0, 0.6);
+	     opacity: 0.8;
+	   }
+	 }
+	  
+	  // 全屏时其他元素隐藏
+	  .complaint-box,
+	  .replay-label {
+	    display: none;
+	  }
+	}
+
+	.video-container {
+		position: relative;
+		width: 100%;
+		height: 100%;
+		/* 根据需要调整 */
+	}
+
+	.video-player {
+		width: 100%;
+		height: 100%;
+	}
+
+	.custom-controls {
+		position: absolute;
+		bottom: 42rpx;
+		/* 调整位置,避免被其他元素覆盖 */
+		right: 20rpx;
+		display: flex;
+		align-items: center;
+		z-index: 9999;
+		/* 确保在最上层 */
+		background: rgba(0, 0, 0, 0.5);
+		border-radius: 40rpx;
+		padding: 10rpx 20rpx;
+	}
+
+	/* 优化全屏按钮样式 */
+	.custom-controls:active {
+		transform: scale(0.95);
+		background: rgba(0, 0, 0, 0.6);
+		opacity: 0.8;
+	}
+
+	.control-icon {
+		width: 46rpx;
+		height: 46rpx;
+	}
+
+	/* 全屏时的样式调整 */
+	.fullscreen-video {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100vh !important;
+		/* 交换宽高,适应横屏 */
+		height: 100vw !important;
+		/* 交换宽高,适应横屏 */
+		z-index: 999999;
+		background-color: #000;
+		transform: rotate(90deg);
+		/* 如果设备不支持自动旋转,使用CSS旋转 */
+		transform-origin: center center;
+	}
+
+	@media screen and (orientation: landscape) {
+		.video-container.horizontal-layout {
+			width: 100%;
+			height: 100%;
+		}
+
+		.video-player {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+
+
+
 	// 重置按钮样式
 	.button-reset {
 		background-color: transparent !important;
@@ -4557,6 +4954,22 @@
 							// z-index: 99;
 						}
 
+						.complaint-box {
+							position: absolute;
+							top: 20%;
+							right: 20rpx;
+							width: 140rpx;
+							margin-top: 20rpx;
+							display: flex;
+							align-items: center;
+							justify-content: center;
+							background-color: rgba(77, 77, 77, 0.5);
+							padding: 16rpx 0;
+							color: #fff;
+							border-radius: 28rpx;
+							z-index: 999;
+						}
+
 						.txt {
 							text-align: center;
 							font-weight: 500;
@@ -4567,6 +4980,8 @@
 						.video-player {
 							width: 100%;
 							height: 100%;
+							position: relative;
+							z-index: 1;
 						}
 
 						.live-end-message {
@@ -4586,11 +5001,64 @@
 							padding: 6rpx 16rpx;
 							color: #fff;
 							border-radius: 15rpx;
+							z-index: 1;
 						}
 					}
 				}
 			}
 
+			// 侧边
+			.slide-group {
+				position: absolute;
+				right: 20rpx;
+				top: 60%;
+				z-index: 9000;
+
+				.action-button-group {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					margin-bottom: 20rpx;
+				}
+
+				.action-icon {
+					width: 88rpx;
+					height: 88rpx;
+				}
+
+				.icon-button {
+					// background: var(--normal-bg);
+					// border-radius: 50%;
+					width: 88rpx;
+					height: 88rpx;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					transition: transform 0.2s ease;
+
+					// margin-left: 10rpx;
+
+					&.like-container {
+						display: flex;
+						flex-direction: column;
+						justify-content: center;
+						align-items: center;
+
+						.like-count {
+							position: absolute;
+							bottom: -20rpx;
+							font-size: 24rpx;
+							color: #FA341E;
+							padding: 6rpx 16rpx;
+							background: #FFFFFF;
+							border-radius: 30rpx;
+						}
+					}
+
+
+				}
+			}
+
 			// 聊天区域
 			.chat-area-container {
 				background: var(--chat-bg);
@@ -4625,7 +5093,6 @@
 					position: absolute;
 				}
 
-
 				&.chat-area-focused {
 					transform: translateY(calc(-1 * var(--keyboard-height, 0rpx))) translateZ(0);
 					z-index: 1000;
@@ -4634,11 +5101,25 @@
 				.tabs_bg {
 					background-color: #fff;
 					padding: 20rpx 40rpx 0;
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+
+					.complaint-box {
+						width: 120rpx;
+						height: 48rpx;
+						background: #FFFFFF;
+						border-radius: 24rpx 24rpx 24rpx 24rpx;
+						border: 2rpx solid #EEEEEE;
+						display: flex;
+						justify-content: center;
+						align-items: center;
+					}
 				}
 
 				.chat-content-wrapper {
 					flex: 1;
-					height: 368rpx;
+					height: 268rpx;
 					padding: 20rpx 0;
 					transform: translateZ(0);
 					will-change: height;
@@ -4649,6 +5130,7 @@
 					}
 
 					.notice-message {
+						font-size: 36rpx;
 						position: absolute;
 						bottom: 388rpx;
 						max-width: 80%;
@@ -4656,7 +5138,8 @@
 						background-color: var(--notice-bg);
 						margin: 0 0 20rpx 20rpx;
 						border-radius: 20rpx;
-						color: #ffda73;
+						color: #0d0b05;
+						font-weight: 500;
 						overflow: hidden;
 
 						&.horizontal-notice {
@@ -4674,14 +5157,15 @@
 						flex: 1;
 						flex-direction: column;
 						-webkit-overflow-scrolling: touch;
-						&.message-scroll2{
-							height: 368rpx;
+
+						&.message-scroll2 {
+							height: 268rpx;
 						}
 					}
 
 					.message-list {
 						width: 80%;
-						margin-bottom: 4rpx;
+						margin-bottom: 16rpx;
 						animation: simpleFade 0.2s;
 
 						.message-item {
@@ -4809,50 +5293,17 @@
 							visibility: hidden;
 						}
 
-						.action-button-group {
-							display: flex;
-							justify-content: space-between;
-							align-items: center;
+						.action-icon {
+							width: 48rpx;
+							height: 48rpx;
 						}
 
-						.icon-button {
-							background: var(--normal-bg);
-							border-radius: 50%;
-							width: 88rpx;
-							height: 88rpx;
-							display: flex;
-							justify-content: center;
-							align-items: center;
-							transition: transform 0.2s ease;
-							margin-left: 10rpx;
-
-							&.like-container {
-								display: flex;
-								flex-direction: column;
-								justify-content: center;
-								align-items: center;
-
-								.like-count {
-									position: absolute;
-									bottom: -10rpx;
-									font-size: 14rpx;
-									color: #FA341E;
-									padding: 4rpx 6rpx;
-									background: #FFFFFF;
-									border-radius: 10rpx;
-								}
-							}
+						.cart-icon {
+							width: 58rpx;
+							height: 58rpx;
+						}
 
-							.action-icon {
-								width: 48rpx;
-								height: 48rpx;
-							}
 
-							.cart-icon {
-								width: 58rpx;
-								height: 58rpx;
-							}
-						}
 					}
 				}
 			}
@@ -4965,7 +5416,7 @@
 			}
 
 			.userlogo {
-				padding: 40rpx 20rpx;
+				padding: 60rpx 20rpx 40rpx;
 				color: #181818;
 
 				.boxweixin {
@@ -4979,27 +5430,42 @@
 
 				.button-container {
 					position: relative;
-					// width: 240rpx;
+					margin: auto;
 
-					.subname {
+					.hidden-input {
+						text-align: center;
 						background-color: #00aa00;
-						color: #fff;
+						padding: 40rpx 10rpx;
+						margin: 0 auto;
+						margin: 40rpx 0 20rpx;
+						font-size: 44rpx !important;
+						color: #1d1d1d !important;
+						/* 输入文字大小 */
 					}
 
-					.subavt {
-						background-color: #fff;
-						border: 2rpx #0a0 solid;
-						color: #00aa00;
+					/* 针对 placeholder 的样式 */
+					.hidden-input::placeholder {
+						font-size: 44rpx !important;
+						color: #1d1d1d !important;
+					}
+
+					/* 兼容微信小程序的 placeholder 样式 */
+					.hidden-input .placeholder {
+						font-size: 44rpx !important;
+						color: #1d1d1d !important;
 					}
 				}
 
 				.submitname {
-					background-color: #00aa00;
-					color: #fff;
-					width: 90%;
+					background-color: #ffffff;
+					border: 3rpx solid #00aa00;
+					border-radius: 16rpx;
+					color: #000000;
+					width: 70%;
+					font-size: 36rpx;
 					margin: 0 auto;
 					text-align: center;
-					padding: 30rpx;
+					padding: 20rpx;
 					margin-top: 40rpx;
 				}
 			}

+ 45 - 124
pages_shopping/live/complaint.vue

@@ -3,7 +3,7 @@
 		<view class="mt60 p34">
 			<view class="color#{$5} ">投诉对象</view>
 			<view class="align-center mt30 mb50">
-				<image class="w100 h100 mr30" style="border-radius: 50%;" src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/logo.png"></image>
+				<image class="w100 h100 mr30" style="border-radius: 50%;" src="/static/logo.png"></image>
 				<text>百域承品</text>
 			</view>
 		</view>
@@ -39,11 +39,7 @@
 	import {
 		mapGetters
 	} from 'vuex';
-	// complaintRecord
-	// import {
-	// 	getTypeTree,
-	// 	loginByMp
-	// } from "@/api/course.js"
+	
 	export default {
 		data() {
 			return {
@@ -271,126 +267,51 @@
 					fileListLen++
 				}
 			},
+	
+			
 			uploadFilePromise(url) {
-				const projectCode = uni.getStorageSync('projectCode')
-				return new Promise((resolve, reject) => {
-					let a = uni.uploadFile({
-						url: uni.getStorageSync('addressUrl_' + projectCode) +
-						'/app/common/uploadOSS', // 仅为示例,非真实的接口地址
-						filePath: url,
-						name: 'file',
-						success: (res) => {
-							setTimeout(() => {
-								console.log(JSON.parse(res.data).url)
-								resolve(JSON.parse(res.data).url)
-							}, 1000)
-						}
-					});
-				})
+			  const projectCode = uni.getStorageSync('projectCode')
+			  // 添加日志检查关键参数
+			  // console.log('上传参数检查:', {
+			  //   projectCode: projectCode,
+			  //   addressUrl: uni.getStorageSync('addressUrl_' + projectCode),
+			  //   url: url
+			  // })
+			  
+			  return new Promise((resolve, reject) => {
+			    let a = uni.uploadFile({
+			      url:  uni.getStorageSync('requestPath')+ '/app/common/uploadOSS',
+			      filePath: url,
+			      name: 'file',
+			      formData: {
+			        // 可以添加其他必要参数
+			      'user': 'test'  // 上传附带参数
+			      },
+			      success: (res) => {
+			        console.log('上传成功响应:', res)
+			        if (res.statusCode === 200) {
+			          try {
+			            const data = JSON.parse(res.data)
+			            if (data.code === 200) {
+			              resolve(data.url)
+			            } else {
+			              reject(new Error(data.msg || '上传失败'))
+			            }
+			          } catch (e) {
+			            reject(new Error('解析响应数据失败'))
+			          }
+			        } else {
+			          reject(new Error(`HTTP错误: ${res.statusCode}`))
+			        }
+			      },
+			      fail: (err) => {
+			        console.error('上传失败:', err)
+			        reject(err)
+			      }
+			    });
+			  })
 			},
-			// goLogin(data) {
-			// 	if (!this.projectCode) {
-			// 		uni.showToast({
-			// 			title: '链接有误',
-			// 			icon: 'none'
-			// 		});
-			// 		return
-			// 	}
-			// 	this.loginFsUserWx(data)
-			// 	return
-			// 	this.utils.getProvider().then(provider => {
-			// 		console.log('当前的环境商', provider)
-			// 		if (!provider) {
-			// 			reject()
-			// 		}
-			// 		uni.login({
-			// 			provider: provider,
-			// 			success: async loginRes => {
-			// 				console.log(loginRes)
-			// 				uni.getUserInfo({
-			// 					provider: provider,
-			// 					success: (infoRes) => {
-			// 						uni.showToast({
-			// 							title: '处理中...',
-			// 							icon: 'loading'
-			// 						});
-			// 						loginByMp({
-			// 							code: loginRes.code,
-			// 							encryptedData: infoRes.encryptedData,
-			// 							iv: infoRes.iv,
-			// 							appId: getApp().globalData.appId
-			// 						}).then(res => {
-			// 							uni.hideLoading();
-			// 							if (res.code == 200) {
-			// 								this.$store.commit('setCoureLogin', 1);
-			// 								uni.setStorageSync(this.utils
-			// 									.TOKEN_KEYAuto, res.token);
-			// 								uni.setStorageSync('auto_userInfo',
-			// 									JSON.stringify(res.user));
-			// 								this.userId = res.user.userId || ''
-			// 								this.isLogin = true
-			// 								this.getMenuButton()
-			// 								this.getList()
-			// 							} else {
-			// 								uni.showToast({
-			// 									title: res.msg,
-			// 									icon: 'none'
-			// 								});
-			// 							}
-			// 						}).catch(err => {
-			// 							uni.hideLoading();
-			// 							uni.showToast({
-			// 								icon: 'none',
-			// 								title: "登录失败,请重新登录",
-			// 							});
-			// 						});
-			// 					}
-			// 				});
-			// 			}
-			// 		})
-			// 	}).catch(err => {})
-			// },
-			// H5授权绑定关系
-			// async loginFsUserWx(data) {
-			// 	if (data) {
-			// 		let token = uni.getStorageSync('TOKEN_WEXIN');
-			// 		let user = uni.getStorageSync('userInfo')
-
-			// 		uni.setStorageSync(this.utils.TOKEN_KEYAuto, token);
-			// 		uni.setStorageSync('auto_userInfo', JSON.stringify(user));
-			// 		this.userId = user.userId || ''
-			// 		this.isLogin = true
-			// 		this.getMenuButton()
-			// 		this.getList()
-			// 	} else {
-			// 		uni.setStorageSync('H5course', {
-			// 			companyId: this.urlOption.companyId,
-			// 			companyUserId: this.urlOption.companyUserId,
-			// 			type: 1, //1自动,其他手动
-			// 		})
-			// 		uni.showLoading({
-			// 			title: '加载中'
-			// 		});
-
-			// 		try {
-			// 			await this.utils.getDomain({
-			// 				projectCode: this.projectCode
-			// 			}); // code 换成你的业务标识
-			// 			await this.utils.getConfigKey();
-			// 			uni.navigateTo({
-			// 				url: '/pages_course/webview?H5course=' + uni.getStorageSync('H5course')
-			// 			})
-			// 		} catch (err) {
-			// 			console.error('初始化失败', err);
-			// 			uni.showToast({
-			// 				title: '请求失败',
-			// 				icon: 'none'
-			// 			});
-			// 		} finally {
-			// 			uni.hideLoading();
-			// 		}
-			// 	}
-			// }
+			
 		}
 	};
 </script>

BIN
static/images/complaint.png


BIN
static/images/complaint2.png


BIN
static/images/full_screen.png


BIN
static/images/half_screen.png