直播5秒

This commit is contained in:
unknown 2020-11-30 11:57:26 +08:00
parent 68fac22bbf
commit a0742923b5
5 changed files with 24 additions and 23 deletions

2
dist/js/common.js vendored
View File

@ -165,7 +165,7 @@ function setBtnClickFuc() {
$('#login-root').show(); $('#login-root').show();
$.ajax({ $.ajax({
url: window.url + 'StopMCUMixTranscode?roomid=' + window.roomid, url: window.url + 'StopMCUMixTranscode?roomid=' + window.roomid,
headers: "Bearer " + localStorage.getItem("token"), headers: { "Authorization": "Bearer " + localStorage.getItem("token")},
success(){ success(){
window.parent.location.href="/regime/live"; window.parent.location.href="/regime/live";
} }

View File

@ -163,17 +163,7 @@ function setBtnClickFuc() {
leave(); leave();
$('#room-root').hide(); $('#room-root').hide();
$('#login-root').show(); $('#login-root').show();
$.ajax({
url: window.url + 'onExitRoom?roomid=' + window.roomid,
headers: "Bearer " + localStorage.getItem("token"),
method:"POST",
data:{
type:1,
memberid:window.mid,
liveid:wiondow.liveid,
length:window.mytime
},
success(){
$.ajax({ $.ajax({
url: window.url + 'StopMCUMixTranscode?roomid=' + window.roomid, url: window.url + 'StopMCUMixTranscode?roomid=' + window.roomid,
headers: "Bearer " + localStorage.getItem("token"), headers: "Bearer " + localStorage.getItem("token"),
@ -181,8 +171,6 @@ function setBtnClickFuc() {
window.parent.location.href="/regime/live"; window.parent.location.href="/regime/live";
} }
}) })
}
})
} }

View File

@ -411,7 +411,7 @@
const urldata = GetRequest('roomid') const urldata = GetRequest('roomid')
window.roomid = urldata.roomid window.roomid = urldata.roomid
window.mid = urldata.memberid window.mid = urldata.memberid
window.lvieid = urldata.liveid window.liveid = urldata.liveid
window.uname = urldata.name window.uname = urldata.name
</script> </script>
@ -438,10 +438,23 @@
<script src="./js/index.js"></script> <script src="./js/index.js"></script>
<a href="/regime/video" target="_top" id="navto"></a> <a href="/regime/video" target="_top" id="navto"></a>
<script> <script>
window.mytime = 0;
window.myt = setInterval(()=>{ setInterval(()=>{
mytime++; $.ajax({
},1000) url: window.url + 'onExitRoom',
headers: { "Authorization": "Bearer " + localStorage.getItem("token")},
method:"POST",
data:{
type:1,
memberid:window.mid,
liveid:window.liveid,
length:5
},
success(){
}
})
},5000)
</script> </script>
</body> </body>

View File

@ -275,7 +275,7 @@ export default defineComponent({
} }
if(index == 2){ if(index == 2){
window.location.href="https://api.weibo.com/oauth2/authorize?client_id=2754574056&response_type=code&redirect_uri=https://beelink.theluyuan.com/" window.location.href="https://api.weibo.com/oauth2/authorize?client_id=2754574056&response_type=code&redirect_uri=https://beelink.theluyuan.com/wblogin"
} }
} }

View File

@ -18,7 +18,7 @@ export default defineComponent({
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}`
}) })
} }