From 5d893d26b5fdac6a164030705b137292d3d39593 Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Thu, 12 Nov 2020 18:03:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/common.js | 12 ++---- public/js/presetting.js | 4 +- public/zhibo.html | 76 ++++++++---------------------------- src/views/regime/Liveing.vue | 17 ++++++-- 4 files changed, 36 insertions(+), 73 deletions(-) diff --git a/public/js/common.js b/public/js/common.js index 065a2cf..33a41bc 100644 --- a/public/js/common.js +++ b/public/js/common.js @@ -12,14 +12,7 @@ let cameraId = ''; let micId = ''; function login() { - if ($('#userId').val() == '') { - alert('用户名不能为空!'); - return; - } - if ($('#roomId').val() == '') { - alert('房间号不能为空!'); - return; - } + presetting.login(false, options => { rtc = new RtcClient(options); join(); @@ -29,7 +22,10 @@ function login() { share = new ShareClient(options); }); } +$(function (){ + login(); +}) function join() { rtc.join(); $('#login-root').hide(); diff --git a/public/js/presetting.js b/public/js/presetting.js index 3c0022c..f43283a 100644 --- a/public/js/presetting.js +++ b/public/js/presetting.js @@ -25,7 +25,7 @@ class Presetting { } login(share, callback) { - let userId = $('#userId').val(); + let userId = window.mid; if (share) { userId = 'share_' + userId; } @@ -33,7 +33,7 @@ class Presetting { let sdkAppId; let userSig; - let roomId = $('#roomId').val(); + let roomId = window.roomid; genTestUserSig(userId).then((res)=>{ sdkAppId = res.id; userSig = res.data diff --git a/public/zhibo.html b/public/zhibo.html index 7830e3a..d72203b 100644 --- a/public/zhibo.html +++ b/public/zhibo.html @@ -31,66 +31,7 @@
视频通话
-
-
- - -
-
- - -
-
- - - -
- - - -
- - - -
- -
-
- -
- 设备检测 -
- -
+ @@ -409,7 +350,22 @@ diff --git a/src/views/regime/Liveing.vue b/src/views/regime/Liveing.vue index d102905..e7e5c22 100644 --- a/src/views/regime/Liveing.vue +++ b/src/views/regime/Liveing.vue @@ -1,18 +1,29 @@