This commit is contained in:
unknown 2020-11-30 17:13:37 +08:00
parent 66279db25d
commit 69b938fc29
3 changed files with 14 additions and 14 deletions

View File

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

View File

@ -1032,8 +1032,8 @@ export async function livestop(id: string, roomid: string) {
}else{ }else{
message.error(res.msg) message.error(res.msg)
} }
const luzhi = await get('StopMCUMixTranscode', {roomid}); // const luzhi = await get('StopMCUMixTranscode', {roomid});
console.log(luzhi) // console.log(luzhi)
} }
export async function luzhi(roomid: string){ export async function luzhi(roomid: string){
const res = await get('StartMCUMixTranscode', {roomid}); const res = await get('StartMCUMixTranscode', {roomid});

View File

@ -17,7 +17,7 @@ export default defineComponent({
const url = ref<string>() const url = ref<string>()
if(id && typeof id == 'string'){ if(id && typeof id == 'string'){
getliveinfo(parseInt(id)).then((res: any)=>{ getliveinfo(parseInt(id)).then((res: any)=>{
luzhi(res.roomid) // luzhi(res.roomid)
url.value = `/zhibo.html?roomid=${res.roomid}&memberid=${res.memberid}&name=${escape(store.state.userinfo.name)}&liveid=${res.liveid}` url.value = `/zhibo.html?roomid=${res.roomid}&memberid=${res.memberid}&name=${escape(store.state.userinfo.name)}&liveid=${res.liveid}`
}) })