From 6a0a50d9f7c59bf9dc91294a2b57464a2f2a499b Mon Sep 17 00:00:00 2001 From: theluyuan <1162963624@qq.com> Date: Thu, 3 Dec 2020 10:23:09 +0800 Subject: [PATCH] dist --- dist/css/room.css | 2 +- dist/js/iminit.js | 22 ++++++++++++++++++++++ dist/zhibo.html | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dist/css/room.css b/dist/css/room.css index 7d617ab..e544cd8 100644 --- a/dist/css/room.css +++ b/dist/css/room.css @@ -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{ diff --git a/dist/js/iminit.js b/dist/js/iminit.js index d70933a..8066cb9 100644 --- a/dist/js/iminit.js +++ b/dist/js/iminit.js @@ -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) }) diff --git a/dist/zhibo.html b/dist/zhibo.html index 8743b07..319ef21 100644 --- a/dist/zhibo.html +++ b/dist/zhibo.html @@ -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;