关闭直播 #189

Merged
theluyuan merged 2 commits from xbx into master 2020-11-30 07:46:40 +00:00
2 changed files with 48 additions and 14 deletions

31
dist/js/common.js vendored
View File

@ -169,14 +169,31 @@ function setBtnClickFuc() {
}).catch(function(imError) {
console.warn('dismissGroup error:', imError); // 解散群组失败的相关信息
});
$.ajax({
url: window.url + 'StopMCUMixTranscode?roomid=' + window.roomid,
headers: "Bearer " + localStorage.getItem("token"),
success(){
window.parent.location.href="/regime/livedetail?id=" + window.liveid;
}
const jiekou = new Promise((res)=>{
$.ajax({
url: window.url + 'StopMCUMixTranscode?roomid=' + window.roomid,
headers: "Bearer " + localStorage.getItem("token"),
success(){
res(1)
}
})
})
const jieshu = new Promise((res)=>{
$.ajax({
url: window.url + 'live?liveid=' + window.liveid,
headers: "Bearer " + localStorage.getItem("token"),
method:"POST",
data:{
status: 2
},
success(){
res(1)
}
})
})
Promise.allSettled([promise,jiekou,jieshu]).then(()=>{
window.parent.location.href="/regime/livedetail?id=" + window.liveid;
})
}
else{

View File

@ -169,14 +169,31 @@ function setBtnClickFuc() {
}).catch(function(imError) {
console.warn('dismissGroup error:', imError); // 解散群组失败的相关信息
});
$.ajax({
url: window.url + 'StopMCUMixTranscode?roomid=' + window.roomid,
headers: "Bearer " + localStorage.getItem("token"),
success(){
window.parent.location.href="/regime/livedetail?id=" + window.liveid;
}
const jiekou = new Promise((res)=>{
$.ajax({
url: window.url + 'StopMCUMixTranscode?roomid=' + window.roomid,
headers: "Bearer " + localStorage.getItem("token"),
success(){
res(1)
}
})
})
const jieshu = new Promise((res)=>{
$.ajax({
url: window.url + 'live?liveid=' + window.liveid,
headers: "Bearer " + localStorage.getItem("token"),
method:"POST",
data:{
status: 2
},
success(){
res(1)
}
})
})
Promise.allSettled([promise,jiekou,jieshu]).then(()=>{
window.parent.location.href="/regime/livedetail?id=" + window.liveid;
})
}
else{