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