|
@@ -17,7 +17,7 @@
|
|
|
src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/readyStart.png">
|
|
src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/readyStart.png">
|
|
|
</image>
|
|
</image>
|
|
|
<view class="countdown-container" v-if="liveItem.status == 1 && liveCountdown">
|
|
<view class="countdown-container" v-if="liveItem.status == 1 && liveCountdown">
|
|
|
- <!-- <view class="live-name">{{ liveItem.liveName }}</view> -->
|
|
|
|
|
|
|
+ <view class="live-name" v-if="liveItem.previewUrl">{{ liveItem.liveName }}</view>
|
|
|
<view class="countdown-display">
|
|
<view class="countdown-display">
|
|
|
<text class="countdown-label">距离开播还有</text>
|
|
<text class="countdown-label">距离开播还有</text>
|
|
|
<view class="countdown-unit">
|
|
<view class="countdown-unit">
|
|
@@ -173,7 +173,7 @@
|
|
|
<view class="videolist" v-if="liveItem.status == 3">
|
|
<view class="videolist" v-if="liveItem.status == 3">
|
|
|
<view class="video-container" style="height: 500rpx;"
|
|
<view class="video-container" style="height: 500rpx;"
|
|
|
:class="{'horizontal-layout': liveItem.showType == 1, 'fullscreen-mode': isFullscreen}">
|
|
:class="{'horizontal-layout': liveItem.showType == 1, 'fullscreen-mode': isFullscreen}">
|
|
|
- <view class="live-end-message">直播已结束</view>
|
|
|
|
|
|
|
+ <view class="live-end-message" :style="{marginTop:liveItem.showType === 2?'50%':''}">直播已结束</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
@@ -214,8 +214,8 @@
|
|
|
<!-- 底部聊天区域 -->
|
|
<!-- 底部聊天区域 -->
|
|
|
<view class="chat-area-container" :class="{
|
|
<view class="chat-area-container" :class="{
|
|
|
'chat-area-container2': liveItem.showType == 1,
|
|
'chat-area-container2': liveItem.showType == 1,
|
|
|
- 'chat-area-container3': liveItem.status == 1 && !liveItem.previewUrl,
|
|
|
|
|
- 'chat-area-container4': liveItem.status == 1 && liveItem.previewUrl,
|
|
|
|
|
|
|
+ 'chat-area-container3': liveItem.status == 1 && !liveItem.previewUrl && liveItem.showType == 1,
|
|
|
|
|
+ 'chat-area-container4': liveItem.status == 1 && liveItem.previewUrl && liveItem.showType == 1,
|
|
|
'chat-area-focused': isFocus
|
|
'chat-area-focused': isFocus
|
|
|
}" :style="{ '--keyboard-height': keyboardHeight + 'rpx' ,'display':isFullscreen?'none':''}">
|
|
}" :style="{ '--keyboard-height': keyboardHeight + 'rpx' ,'display':isFullscreen?'none':''}">
|
|
|
<view class="tabs_bg" v-if="liveItem.showType == 1">
|
|
<view class="tabs_bg" v-if="liveItem.showType == 1">
|
|
@@ -239,7 +239,7 @@
|
|
|
:style="{ height: liveItem.showType === 1?`calc(100% - ${commonViewHeight}px)`:liveItem.status == 1?'100%':'',marginTop:liveItem.showType === 1?commonViewHeight+'px':'' }"
|
|
:style="{ height: liveItem.showType === 1?`calc(100% - ${commonViewHeight}px)`:liveItem.status == 1?'100%':'',marginTop:liveItem.showType === 1?commonViewHeight+'px':'' }"
|
|
|
:enhanced="true" :bounces="false" :show-scrollbar="false" :fast-deceleration="false"
|
|
:enhanced="true" :bounces="false" :show-scrollbar="false" :fast-deceleration="false"
|
|
|
:enable-back-to-top="false" class="message-scroll-view"
|
|
:enable-back-to-top="false" class="message-scroll-view"
|
|
|
- :class="liveItem.status == 1 ? 'message-scroll2' : ''" :scroll-top="scrollTop"
|
|
|
|
|
|
|
+ :class="liveItem.status == 1 ? '' : ''" :scroll-top="scrollTop"
|
|
|
:scroll-into-view="scrollIntoView" @scroll="onScroll" ref="scrollView">
|
|
:scroll-into-view="scrollIntoView" @scroll="onScroll" ref="scrollView">
|
|
|
<view class="message-list" v-for="(item, talkIndex) in (talklist || [])"
|
|
<view class="message-list" v-for="(item, talkIndex) in (talklist || [])"
|
|
|
:key="item.uniqueId " :id="`list_${item.uniqueId }`" v-show="item.cmd != 'red' ">
|
|
:key="item.uniqueId " :id="`list_${item.uniqueId }`" v-show="item.cmd != 'red' ">
|
|
@@ -716,7 +716,9 @@
|
|
|
internetTraffic, // 流量(缓冲百分比),
|
|
internetTraffic, // 流量(缓冲百分比),
|
|
|
liveInternetTraffic, // 直播流量(缓冲百分比),
|
|
liveInternetTraffic, // 直播流量(缓冲百分比),
|
|
|
loginByMp,
|
|
loginByMp,
|
|
|
- getUserInfo
|
|
|
|
|
|
|
+ getUserInfo,
|
|
|
|
|
+ getIsAddKf,
|
|
|
|
|
+ liveWatchUser
|
|
|
} from '@/api/living.js';
|
|
} from '@/api/living.js';
|
|
|
import {
|
|
import {
|
|
|
editUser
|
|
editUser
|
|
@@ -748,6 +750,7 @@
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ urlOption:{},
|
|
|
menuButtonInfo: {}, // 胶囊按钮布局信息
|
|
menuButtonInfo: {}, // 胶囊按钮布局信息
|
|
|
isHeight: false,
|
|
isHeight: false,
|
|
|
isFullscreen: false,
|
|
isFullscreen: false,
|
|
@@ -933,6 +936,16 @@
|
|
|
this.getLocationByIP();
|
|
this.getLocationByIP();
|
|
|
if (options.liveId) {
|
|
if (options.liveId) {
|
|
|
this.liveId = options.liveId;
|
|
this.liveId = options.liveId;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ if(options.qwUserId){
|
|
|
|
|
+ this.urlOption.companyId=options.companyId
|
|
|
|
|
+ this.urlOption.companyUserId=options.companyUserId
|
|
|
|
|
+ this.urlOption.corpId=options.corpId
|
|
|
|
|
+ this.urlOption.liveId=options.liveId
|
|
|
|
|
+ this.urlOption.qwUserId=options.qwUserId
|
|
|
|
|
+ this.urlOption.qwExternalId=options.externalId
|
|
|
|
|
+ this.urlOption.chatId=options.chatId
|
|
|
}
|
|
}
|
|
|
// 扫码传来的参数
|
|
// 扫码传来的参数
|
|
|
if (options.scene) {
|
|
if (options.scene) {
|
|
@@ -954,12 +967,13 @@
|
|
|
}
|
|
}
|
|
|
this.userinfo = uni.getStorageSync('userinfo');
|
|
this.userinfo = uni.getStorageSync('userinfo');
|
|
|
// this.userData = uni.getStorageSync('userData');
|
|
// this.userData = uni.getStorageSync('userData');
|
|
|
- console.log('全部参数', options);
|
|
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
const isLogin = await this.utils.checkLiveToken();
|
|
const isLogin = await this.utils.checkLiveToken();
|
|
|
if (isLogin) {
|
|
if (isLogin) {
|
|
|
this.haveLogin()
|
|
this.haveLogin()
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.error('初始化失败:', error);
|
|
console.error('初始化失败:', error);
|
|
|
}
|
|
}
|
|
@@ -1056,6 +1070,9 @@
|
|
|
const isLogin = await this.utils.checkLiveToken();
|
|
const isLogin = await this.utils.checkLiveToken();
|
|
|
if (isLogin) {
|
|
if (isLogin) {
|
|
|
this.haveLogin()
|
|
this.haveLogin()
|
|
|
|
|
+ if(this.urlOption.qwUserId){
|
|
|
|
|
+ this.getIsAddKf()
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
this.goLogin();
|
|
this.goLogin();
|
|
|
}
|
|
}
|
|
@@ -1064,7 +1081,6 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.getLocationByIP();
|
|
this.getLocationByIP();
|
|
|
-
|
|
|
|
|
this.uuId = generateRandomString(16);
|
|
this.uuId = generateRandomString(16);
|
|
|
const isLiveLogin = uni.getStorageSync('isLiveLogin');
|
|
const isLiveLogin = uni.getStorageSync('isLiveLogin');
|
|
|
this.share = uni.getStorageSync('share');
|
|
this.share = uni.getStorageSync('share');
|
|
@@ -1750,14 +1766,14 @@
|
|
|
this.userInfo = uni.getStorageSync('userInfo');
|
|
this.userInfo = uni.getStorageSync('userInfo');
|
|
|
if (this.userInfo) {
|
|
if (this.userInfo) {
|
|
|
await this.getUserInfo();
|
|
await this.getUserInfo();
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// this.initTime();
|
|
// this.initTime();
|
|
|
if (this.liveId) {
|
|
if (this.liveId) {
|
|
|
// 先获取直播间信息
|
|
// 先获取直播间信息
|
|
|
await this.getliving(this.liveId);
|
|
await this.getliving(this.liveId);
|
|
|
this.isOnload = true;
|
|
this.isOnload = true;
|
|
|
-
|
|
|
|
|
await this.getLiveMsg(this.liveItem);
|
|
await this.getLiveMsg(this.liveItem);
|
|
|
await this.getliveViewData();
|
|
await this.getliveViewData();
|
|
|
// await this.getliving(this.liveId);
|
|
// await this.getliving(this.liveId);
|
|
@@ -1811,7 +1827,9 @@
|
|
|
this.haveLogin()
|
|
this.haveLogin()
|
|
|
this.userlogo = true
|
|
this.userlogo = true
|
|
|
// console.log("TOKEN_KEYAuto",TOKEN_KEYAuto)
|
|
// console.log("TOKEN_KEYAuto",TOKEN_KEYAuto)
|
|
|
- // this.getIsAddKf()
|
|
|
|
|
|
|
+ if(this.urlOption.qwUserId){
|
|
|
|
|
+ this.getIsAddKf() //this.getIsAddKf()
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: res.msg,
|
|
title: res.msg,
|
|
@@ -1830,6 +1848,52 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ // liveWatchUser(){
|
|
|
|
|
+ // var data={
|
|
|
|
|
+ // qwUserId:this.urlOption.qwUserId,
|
|
|
|
|
+ // liveId:this.urlOption.liveId,
|
|
|
|
|
+ // userId:this.userInfo.userId,
|
|
|
|
|
+ // corpId:this.urlOption.corpId,
|
|
|
|
|
+ // companyUserId:this.urlOption.companyUserId,
|
|
|
|
|
+ // qwExternalId:this.urlOption.qwExternalId,
|
|
|
|
|
+ // companyId:this.urlOption.companyId,
|
|
|
|
|
+ // chatId:this.urlOption.chatId,
|
|
|
|
|
+ // }
|
|
|
|
|
+ // liveWatchUser(data).then(
|
|
|
|
|
+ // res => {
|
|
|
|
|
+ // if (res.code == 200) {
|
|
|
|
|
+
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // uni.showToast({
|
|
|
|
|
+ // icon: 'none',
|
|
|
|
|
+ // title: res.msg,
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ // rej => {}
|
|
|
|
|
+ // );
|
|
|
|
|
+ // },
|
|
|
|
|
+ // 客服
|
|
|
|
|
+ getIsAddKf() {
|
|
|
|
|
+ // {videoId: this.videoId,qwUserId: this.qwUserId,corpId: this.corpId}
|
|
|
|
|
+ getIsAddKf(this.urlOption).then(res => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ this.isAddKf = 1
|
|
|
|
|
+ //this.getH5CourseVideoDetails()
|
|
|
|
|
+ } else if (res.code == 401) {
|
|
|
|
|
+ this.isAddKf = 0
|
|
|
|
|
+ this.goLogin();
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: res.msg,
|
|
|
|
|
+ icon: 'none'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ err => {}
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
clickTabs(item) {},
|
|
clickTabs(item) {},
|
|
|
getLocationByIP() {
|
|
getLocationByIP() {
|
|
|
// 高德IP定位API,需要替换成你的key
|
|
// 高德IP定位API,需要替换成你的key
|
|
@@ -5440,7 +5504,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
&.chat-area-container4 {
|
|
&.chat-area-container4 {
|
|
|
- height: calc(85% - 640rpx);
|
|
|
|
|
|
|
+ height: calc(85% - 680rpx);
|
|
|
flex: 1;
|
|
flex: 1;
|
|
|
transform: none; // 移除之前的变换
|
|
transform: none; // 移除之前的变换
|
|
|
will-change: auto;
|
|
will-change: auto;
|
|
@@ -5491,7 +5555,7 @@
|
|
|
position: relative;
|
|
position: relative;
|
|
|
|
|
|
|
|
&.chat-content-focused {
|
|
&.chat-content-focused {
|
|
|
- height: 100rpx;
|
|
|
|
|
|
|
+ height: 100rpx !important;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.notice-message {
|
|
.notice-message {
|