فهرست منبع

Signed-off-by: 李妹妹 <1639016684@qq.com>

李妹妹 1 هفته پیش
والد
کامیت
3f7a230543
3فایلهای تغییر یافته به همراه42 افزوده شده و 10 حذف شده
  1. 2 2
      pages/user/index.vue
  2. 22 7
      pages_course/living.vue
  3. 18 1
      pages_user/user/storeOrder.vue

+ 2 - 2
pages/user/index.vue

@@ -145,12 +145,12 @@
 								<text class="text">资质证书</text>
 							</view> -->
 							<!-- v-if="user.bindCompanyUserId" -->
-							<view class="item no-marin-bottom" @click="navgetTo('/pages_shopping/live/order')">
+							<!-- <view class="item no-marin-bottom" @click="navgetTo('/pages_shopping/live/order')">
 								<image
 									src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/shop/images/live.png"
 									mode=""></image>
 								<text class="text">直播订单</text>
-							</view>
+							</view> -->
 
 							<!-- 销售可见 -->
 							<!-- <view  v-if="user.bindCompanyUserId" class="item no-marin-bottom" @click="toManager()">

+ 22 - 7
pages_course/living.vue

@@ -42,7 +42,7 @@
 
 					<view class="action-button reserve-button" @click="handleAgreement">
 						<!-- <image class="button-icon mr8" src="/static/images/trailer.png"></image> -->
-						<text>预约直播</text>
+						<text>{{ hasSubscribed ? '已预约' : '预约直播'}}</text>
 					</view>
 				</view>
 			</view>
@@ -230,7 +230,7 @@
 						</view>
 					</view>
 
-					<view class="chat-content-wrapper" :class="{ 'chat-content-focused': isFocus }">
+					<view class="chat-content-wrapper"  :style="{height:liveItem.status == 1 && !liveItem.previewUrl && liveItem.showType == 2?'700rpx':''}"   :class="{ 'chat-content-focused': isFocus }">
 						<view class="notice-message" v-if="isShowNotice"
 							:class="liveItem.showType == 1 ? 'horizontal-notice' : 'horizontal-notice2'">
 							公告消息: {{notice.msg}}
@@ -750,6 +750,7 @@
 		},
 		data() {
 			return {
+				hasSubscribed: false, // 已成功订阅(永久禁用)
 				urlOption:{},
 				menuButtonInfo: {}, // 胶囊按钮布局信息
 				isHeight: false,
@@ -973,6 +974,7 @@
 				this.qrFrom = `&companyId=${options.companyId}&companyUserId=${options.companyUserId}`;
 			}
 			this.userinfo = uni.getStorageSync('userinfo');
+			this.hasSubscribed = uni.getStorageSync('subscribe_status_' + this.liveId) || false;
 			console.log('全部参数', options);
 
 			// 优先判断登录状态,然后加载数据
@@ -1099,6 +1101,9 @@
 					this.hasCheckedLogin = true;
 					if (isLogin) {
 						await this.haveLogin();
+						if(this.urlOption.qwUserId){
+												this.getIsAddKf()
+											}
 					} else {
 						this.goLogin();
 					}
@@ -2317,7 +2322,7 @@
 
 			// 强制滚动到底部(用于发送消息,绕过防抖限制)
 			forceScrollToBottomOnSend() {
-				// console.log('执行强制滚动到底部(发送消息专用)');
+				//console.log('执行强制滚动到底部(发送消息专用)');
 
 				// 清理之前的定时器
 				if (this.scrollTimer) {
@@ -2836,24 +2841,31 @@
 			//订阅消息
 			handleAgreement() {
 				const templateId = this.templateId;
+				if (this.hasSubscribed) return;
 				uni.requestSubscribeMessage({
 					tmplIds: [templateId],
 					success: (res) => {
 						if (res[templateId] === 'accept') {
 							uni.showToast({
 								title: '订阅成功,开播将提醒您',
-								icon: 'success'
+								icon: 'success',
+								duration: 2500 // 成功提示延长到2.5秒
 							});
+							// 订阅成功时
+							this.hasSubscribed = true;
+							uni.setStorageSync('subscribe_status_' + this.liveId, true);
 							this.callSendMessageApi();
 						} else if (res[templateId] === 'reject') {
 							uni.showToast({
 								title: '您已拒绝订阅,将无法收到提醒',
-								icon: 'none'
+								icon: 'none',
+								duration: 2500 // 成功提示延长到2.5秒
 							});
 						} else if (res[templateId] === 'ban') {
 							uni.showToast({
 								title: '您已关闭所有订阅权限,请在设置中开启',
-								icon: 'none'
+								icon: 'none',
+								duration: 2500 // 成功提示延长到2.5秒
 							});
 						}
 					},
@@ -2861,7 +2873,8 @@
 						console.error('订阅消息失败', err);
 						uni.showToast({
 							title: '订阅失败,请重试',
-							icon: 'none'
+							icon: 'none',
+							duration: 2500 // 成功提示延长到2.5秒
 						});
 					}
 				});
@@ -3195,6 +3208,7 @@
 				// 立即更新状态,确保UI零延迟响应
 				this.isFocus = true;
 				this.isKeyboardShow = true;
+				this.scrollTop=9999999
 			},
 			inputBlur() {
 				this.isFocus = false;
@@ -4794,6 +4808,7 @@
 				try {
 					if (this.myselfFlag) {
 						this.addToTalkList(data);
+						this.forceScrollToBottomOnSend();
 					} else {
 						this.socket.send({
 							data: JSON.stringify(data),

+ 18 - 1
pages_user/user/storeOrder.vue

@@ -37,7 +37,7 @@
 						<view class="status-box">
 							<!-- <view   class="recom-box">推荐订单</view> -->
 							<text   class="text success">
-								{{utils.getDictLabelName("storeOrderStatus",item.status)}}
+								{{utils.getDictLabelName("storeOrderStatus",item.status)||''}}
 							</text>
 						</view>
 					</view>
@@ -172,6 +172,7 @@
 
 <script>
 	import {getMyStoreOrderList,cancelOrder,canceliveOrder, deleteOrder as deleteOrderApi, cancelLiveOrder} from '@/api/storeOrder'
+	import {getDicts} from '@/api/index'
 	import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
 	export default {
 		mixins: [MescrollMixin], 
@@ -207,6 +208,7 @@
 		},
 		onLoad(option) {
 			this.status = option.status
+			this.getDicts();
 			var that=this;
 			uni.$on('refreshOrder', () => {
 				that.mescroll.resetUpScroll()
@@ -217,6 +219,21 @@
 				this.searchKey=e.detail.value;
 				this.mescroll.resetUpScroll()
 			},
+			getDicts:function(){
+				getDicts().then(
+					res => {
+						if(res.code==200){
+							uni.setStorageSync('dicts',JSON.stringify(res));
+							
+						}else{
+							 
+						}
+						// this.loadding=false;
+						// this.navigatHandler();
+					},
+					rej => {}
+				);
+			},
 			refund(item) {
 				if(item.orderType==2){
 					uni.navigateTo({