From 7a3ca8fb62bba918c6db02066c9dd768ece17e73 Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Fri, 30 Oct 2020 09:54:39 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 21 +++++++++++++++++++++ src/components/LiveCount.vue | 2 +- src/views/regime/Liveing.vue | 11 ++++++++--- 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 27c5969..294f114 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -967,4 +967,25 @@ export async function livestart(id: string) { }else{ message.error(res.msg) } + } + +export async function livestop(id: string, roomid: string) { + const res = await put("live/" + id, {status : 2}) + if(res.code == 0){ + message.success(res.msg) + }else{ + message.error(res.msg) + } + const luzhi = await get('StopMCUMixTranscode', {roomid}); + console.log(luzhi) +} +export async function luzhi(roomid: string){ + const res = await get('StartMCUMixTranscode', {roomid}); + console.log(res) +} + +// export async function StopMCUMixTranscode(roomid: number) { +// const res = await get('StopMCUMixTranscode', {roomid}); +// console.log(res) +// } diff --git a/src/components/LiveCount.vue b/src/components/LiveCount.vue index 375661e..42bd694 100644 --- a/src/components/LiveCount.vue +++ b/src/components/LiveCount.vue @@ -15,7 +15,7 @@
参加时长 -
30min
+
{{i.length}}min
{ console.error('进房失败 ' + error); }) .then(() => { console.log('进房成功'); + // if(typeof id == "string"){ + luzhi(roominfo.value.roomid) + // } fun() }); } @@ -374,7 +377,9 @@ export default defineComponent({ client.leave().then(() => { // leaving room success visible.value = false; - + if(typeof id == "string"){ + livestop(id, roominfo.value.roomid) + } }).catch((error: string) => { message.error('关闭失败: ' + error); });