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 @@