From a341593ba67aa3e54b720e06559ee551fa9bfd41 Mon Sep 17 00:00:00 2001 From: asd <374367073@qq.com> Date: Wed, 14 Oct 2020 18:52:50 +0800 Subject: [PATCH] fin --- src/api/index.ts | 58 ++++++++++++++++++++----------- src/components/VideoCont.vue | 60 +++++++++++++++++++++++++++++---- src/views/mine/ReleaseVideo.vue | 35 ++++++++++++------- src/views/regime/VideoInfo.vue | 7 ++-- 4 files changed, 118 insertions(+), 42 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index ca89648..0e21d97 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -3,7 +3,7 @@ import store from '@/store'; import { LiveList, LoginData, UserInfo, VideoInfo } from '@/types'; import { saveValue } from '@/utils/common'; import { message } from 'ant-design-vue'; -import { get, post, setToken } from './base' +import { del, get, post, setToken } from './base' /** @@ -178,6 +178,9 @@ export async function liveadd(data:any) { */ export async function videoadd(data:any) { const res=await post('video',data) + if(res.code==0){ + message.success("发布成功") + } } /** @@ -201,25 +204,38 @@ interface VideoDetail{ watch:number } -export async function videodetail(data?:any) { +export async function videodetail(data?:any,ifupdate?:number) { const res=await get('video/'+data) - console.log(res,"lllk") - return { - videoid: res.data.videoid, - memberid: res.data.memberid, - title: res.data.title, - img: res.data.img, - fileid: res.data.fileid, - fileurl: res.data.fileurl, - fileduration: res.data.fileduration, - status: res.data.status, - desc: res.data.desc, - deleted_at: res.data.deleted_at, - created_at: res.data.created_at, - updated_at: res.data.updated_at, - watch:res.data.watch, - share:res.data.share + if(ifupdate){ + console.log(111) + return{ + title: res.data.title, + img: res.data.img, + fileid: res.data.fileid, + fileurl: res.data.fileurl, + fileduration: res.data.fileduration, + desc:res.data.desc, + video:[res.data.fileurl], + } + }else{ + return { + videoid: res.data.videoid, + memberid: res.data.memberid, + title: res.data.title, + img: res.data.img, + fileid: res.data.fileid, + fileurl: res.data.fileurl, + fileduration: res.data.fileduration, + status: res.data.status, + desc: res.data.desc, + deleted_at: res.data.deleted_at, + created_at: res.data.created_at, + updated_at: res.data.updated_at, + watch:res.data.watch, + share:res.data.share + } } + } @@ -229,7 +245,11 @@ export async function videodetail(data?:any) { * 删除视频 */ export async function videodel(data:any) { - const res = await post('live',data); + const res = await del('video/'+data); + if(res.code==0){ + message.success("删除成功") + } + console.log(res) } diff --git a/src/components/VideoCont.vue b/src/components/VideoCont.vue index 5c62d20..3585cfe 100644 --- a/src/components/VideoCont.vue +++ b/src/components/VideoCont.vue @@ -5,22 +5,36 @@
上传时间: - {{date}} + {{date}} +
播放量 - {{watch}} + {{watch}} +
转发量 - {{share}} + {{share}} +
+
+ 状态 + 正在审核中,情耐心等待 +
+
+ 状态 + 审核未通过 +
+
+ 原因 + 您的视频中含有大量敏感词汇,请修改后再次上传,感谢您对Beelink的技术支持
-
修改该视频
-
删除该视频
+
修改该视频
+
删除该视频
@@ -40,6 +54,17 @@ border-bottom: 1px solid #eee; } .info { + .item1{ + position: relative; + left:-12px + } + .status{ + color: #07AD97!important; + // font-weight: bold; + } + .status1{ + color: #D12C2D!important; + } .item { display: flex; align-content: center; @@ -47,7 +72,7 @@ > img { width: 24px; height: 24px; - background-color: #0f0; + // background-color: #0f0; } > span { font-size: 11px; @@ -81,7 +106,10 @@ }