|
@@ -99,14 +99,19 @@ Page({
|
|
|
"channelid": this.data.accountMsg.channelid
|
|
|
}
|
|
|
}, false).then(res => {
|
|
|
- if (this.data.oldDialogue.length == 0) {
|
|
|
- for (let i = 0; i < res.data.length; i++) {
|
|
|
- let data = res.data[i].datetime.split(" ");
|
|
|
- res.data[i].datetime = data[1]
|
|
|
- }
|
|
|
- this.setData({
|
|
|
- oldDialogue: res.data
|
|
|
- })
|
|
|
+ if (res.msg != '成功') return wx.showToast({
|
|
|
+ title: res.data,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
+ let data = res.data[i].datetime.split(" ");
|
|
|
+ res.data[i].datetime = data[1]
|
|
|
+ }
|
|
|
+ this.setData({
|
|
|
+ oldDialogue: res.data
|
|
|
+ })
|
|
|
+ /* if (this.data.oldDialogue.length == 0) {
|
|
|
+
|
|
|
} else {
|
|
|
let oldDialogue = this.data.oldDialogue,
|
|
|
newDialogue = res.data;
|
|
@@ -123,7 +128,7 @@ Page({
|
|
|
oldDialogue
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
+ } */
|
|
|
})
|
|
|
},
|
|
|
/* 获取当前用户列表 */
|
|
@@ -210,11 +215,27 @@ Page({
|
|
|
"content": {}
|
|
|
}).then(res => {
|
|
|
const isSy = (method == "getSYLiveInfo") ? true : false;
|
|
|
+ console.log("直播账号详情", res)
|
|
|
this.setData({
|
|
|
accountStatus: res.code,
|
|
|
accountMsg: res.data[0],
|
|
|
isSy
|
|
|
})
|
|
|
+ //获取授权地址
|
|
|
+ if (res.data[0].fisneedauth == 1) {
|
|
|
+ _Http.basic({
|
|
|
+ "accesstoken": wx.getStorageSync('userData').token,
|
|
|
+ "classname": "enterprise.live.live",
|
|
|
+ "method": "liveauthorization",
|
|
|
+ "content": {
|
|
|
+ "tliveid": res.data[0].tliveid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ this.setData({
|
|
|
+ "accountMsg.fliveshowurl": res.msg
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
//获取实时数据
|
|
|
this.realTime()
|
|
|
//直播场次列表查询
|
|
@@ -379,7 +400,7 @@ Page({
|
|
|
userPageNumber: 1,
|
|
|
userPageTotal: 1
|
|
|
});
|
|
|
- this.getLiveInfo();
|
|
|
+ if (detail != 2) this.getLiveInfo();
|
|
|
if (detail == 2) this.getCooperationAgentsLiveList();
|
|
|
},
|
|
|
/* 获取合作商直播列表 */
|
|
@@ -397,11 +418,37 @@ Page({
|
|
|
},
|
|
|
/* 查看合作商直播 */
|
|
|
toLive(e) {
|
|
|
- let str = e.currentTarget.dataset.fliveshowurl;
|
|
|
- const url = str.slice(0, 8) + '04de51d4c1.' + str.slice(8);
|
|
|
- wx.navigateTo({
|
|
|
- url: '/pages/webView/index?url=' + url,
|
|
|
- })
|
|
|
+ const {
|
|
|
+ index
|
|
|
+ } = e.currentTarget.dataset,
|
|
|
+ data = this.data.partnerLiveList[index];
|
|
|
+ console.log(data.fisneedauth)
|
|
|
+ if (data.fisneedauth == 1) {
|
|
|
+ _Http.basic({
|
|
|
+ "accesstoken": wx.getStorageSync('userData').token,
|
|
|
+ "classname": "enterprise.live.live",
|
|
|
+ "method": "liveauthorization",
|
|
|
+ "content": {
|
|
|
+ "tliveid": data.tliveid
|
|
|
+ }
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ if (res.data != '成功') return wx.showToast({
|
|
|
+ title: '网络错误,请稍后再试',
|
|
|
+ })
|
|
|
+ let str = res.msg;
|
|
|
+ const url = str.slice(0, 8) + '04de51d4c1.' + str.slice(8);
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/pages/webView/index?url=' + encodeURIComponent(url),
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ let str = data.fliveshowurl;
|
|
|
+ const url = str.slice(0, 8) + '04de51d4c1.' + str.slice(8);
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/pages/webView/index?url=' + encodeURIComponent(url)
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|