直播管理

This commit is contained in:
asd
2020-10-14 08:57:57 +08:00
parent 8709d8ffb7
commit 3d7070b8d7
5 changed files with 628 additions and 414 deletions

View File

@@ -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<Array<LiveList>>('live');
console.log(res);
export async function getlivelist(data?:any) {
const res = await get<Array<LiveList>>('live',data);
// console.log(res);
return res.data
}
/**
@@ -181,4 +158,16 @@ export async function getstatisticlist() {
videoInfo:res.data?.videoInfo,
studentInfo:res.data?.studentInfo
}
}
}
/**
* 发布直播
*/
interface Liveaddrule{
code:number,
msg:string
}
export async function liveadd(data:any) {
const res = await post<Liveaddrule>('live',data);
console.log(res)
}