From 3d7070b8d72ac2ed65a34c606bba33ea6d686025 Mon Sep 17 00:00:00 2001 From: asd <374367073@qq.com> Date: Wed, 14 Oct 2020 08:57:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.ts | 49 +- src/components/LiveItem.vue | 41 +- src/types/index.d.ts | 27 + src/views/mine/ReleaseWebcast.vue | 901 ++++++++++++++++++------------ src/views/regime/Live.vue | 24 +- 5 files changed, 628 insertions(+), 414 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index abab7b9..f6c0134 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,6 +1,6 @@ import router from '@/router'; import store from '@/store'; -import { LoginData, UserInfo } from '@/types'; +import { LiveList, LoginData, UserInfo } from '@/types'; import { saveValue } from '@/utils/common'; import { message } from 'ant-design-vue'; import { get, post, setToken } from './base' @@ -132,35 +132,12 @@ export async function getvideolist() { * 直播列表 */ -interface LiveList { - liveid: number; - memberid: number; - title: string; - img: string; - fileid: string; - fileurl: string; - fileduration: string; - vodurl: string; - vodid: string; - vodduration: string; - dateline: string; - livetime: number; - livenumber: number; - status: number; - livestatus: number; - students: string; - desc: string; - deleted_at: null; - created_at: string; - updated_at: string; - statusname: string; - starttime: string; - begin: number; -} -export async function getlivelist() { - const res = await get>('live'); - console.log(res); + +export async function getlivelist(data?:any) { + const res = await get>('live',data); + // console.log(res); + return res.data } /** @@ -181,4 +158,16 @@ export async function getstatisticlist() { videoInfo:res.data?.videoInfo, studentInfo:res.data?.studentInfo } -} \ No newline at end of file +} + +/** + * 发布直播 + */ +interface Liveaddrule{ + code:number, + msg:string + } + export async function liveadd(data:any) { + const res = await post('live',data); + console.log(res) + } \ No newline at end of file diff --git a/src/components/LiveItem.vue b/src/components/LiveItem.vue index dc886ea..9875590 100644 --- a/src/components/LiveItem.vue +++ b/src/components/LiveItem.vue @@ -1,34 +1,34 @@