Merge pull request 'xbx' (#230) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/230
This commit is contained in:
luyuan 2020-12-03 10:23:44 +08:00
commit 40fd471420
6 changed files with 48 additions and 4 deletions

2
dist/css/room.css vendored
View File

@ -73,7 +73,7 @@ video{
width: 100%;
height: 100%;
padding: 10rem;
grid-area: 1/1/3/4;
grid-area: 1/1/3/5;
border-radius: 17rem;
}
.video-box{

22
dist/js/iminit.js vendored
View File

@ -24,6 +24,22 @@ function getname(id){
})
}
function getgrouplist(){
let promise = tim.getGroupOnlineMemberCount(window.roomid);
promise.then(function(imResponse) {
console.log(imResponse.data.memberCount);
if(imResponse.data.memberCount < 3){
$("#main-video").css("grid-area","1/1/3/5")
$(".liaotian").css("grid-area","3/1/4/5")
}else{
$("#main-video").css("grid-area","1/1/3/4")
$(".liaotian").css("grid-area","3/1/4/4")
}
}).catch(function(imError) {
console.warn('getGroupOnlineMemberCount error:', imError); // 获取直播群在线人数失败的相关信息
});
}
function formatDateTime (inputTime) {
inputTime = inputTime * 1000
var date = new Date(inputTime);
@ -169,6 +185,9 @@ function formatDateTime (inputTime) {
default:
break;
}
setInterval(() => {
getgrouplist()
}, 2000);
}).catch((err)=>{
console.log(err)
})
@ -189,6 +208,9 @@ function formatDateTime (inputTime) {
default:
break;
}
setInterval(() => {
getgrouplist()
}, 2000);
}).catch((err)=>{
console.log(err)
})

2
dist/zhibo.html vendored
View File

@ -65,7 +65,7 @@
border-bottom: 1rem solid #EEEEEE;
}
.liaotian{
grid-area: 3/1/4/4;
grid-area: 3/1/4/5;
margin-top: 28rem;
height: 90%;
margin-left: 10rem;

View File

@ -73,7 +73,7 @@ video{
width: 100%;
height: 100%;
padding: 10rem;
grid-area: 1/1/3/4;
grid-area: 1/1/3/5;
border-radius: 17rem;
}
.video-box{

View File

@ -24,6 +24,22 @@ function getname(id){
})
}
function getgrouplist(){
let promise = tim.getGroupOnlineMemberCount(window.roomid);
promise.then(function(imResponse) {
console.log(imResponse.data.memberCount);
if(imResponse.data.memberCount < 3){
$("#main-video").css("grid-area","1/1/3/5")
$(".liaotian").css("grid-area","3/1/4/5")
}else{
$("#main-video").css("grid-area","1/1/3/4")
$(".liaotian").css("grid-area","3/1/4/4")
}
}).catch(function(imError) {
console.warn('getGroupOnlineMemberCount error:', imError); // 获取直播群在线人数失败的相关信息
});
}
function formatDateTime (inputTime) {
inputTime = inputTime * 1000
var date = new Date(inputTime);
@ -169,6 +185,9 @@ function formatDateTime (inputTime) {
default:
break;
}
setInterval(() => {
getgrouplist()
}, 2000);
}).catch((err)=>{
console.log(err)
})
@ -189,6 +208,9 @@ function formatDateTime (inputTime) {
default:
break;
}
setInterval(() => {
getgrouplist()
}, 2000);
}).catch((err)=>{
console.log(err)
})

View File

@ -65,7 +65,7 @@
border-bottom: 1rem solid #EEEEEE;
}
.liaotian{
grid-area: 3/1/4/4;
grid-area: 3/1/4/5;
margin-top: 28rem;
height: 90%;
margin-left: 10rem;