Prechádzať zdrojové kódy

清理无用代码, 简化项目中...

reghao 1 mesiac pred
rodič
commit
fd3f74deba

+ 6 - 0
src/api/video.js

@@ -19,6 +19,7 @@ const videoApi = {
   tagVideoPostApi: '/api/content/video/tag',
   videoInfoApi: '/api/content/video/detail',
   videoUrlApi: '/api/content/video/url',
+  videoApi: '/api/content/video',
 
   videoDownloadApi: '/api/content/video/download',
   cacheBiliApi: '/api/content/video/cache/bili',
@@ -172,3 +173,8 @@ export function getUserContentData(userId) {
 export function videoTimeline(nextId) {
   return get(videoApi.videoTimelineApi + '?nextId=' + nextId)
 }
+
+// 报告视频错误
+export function videoErrorReport(data) {
+  return post(videoApi.videoApi + '/error_report', data)
+}

+ 0 - 31
src/api/video_edit.js

@@ -1,31 +0,0 @@
-import { get, post } from '@/utils/request'
-
-const editVideoApi = {
-  videoErrorReportApi: '/api/content/video/edit/report',
-  getVipTags: '/api/content/video/edit/vip_tags',
-  updateVideoUserApi: '/api/content/video/edit/update_owner'
-}
-
-// 报告视频错误
-export function videoErrorReport(data) {
-  return post(editVideoApi.videoErrorReportApi, data)
-}
-
-// 报告视频错误
-export function videoErrorDelete(data) {
-  return post(editVideoApi.videoErrorReportApi, data)
-}
-
-// 用户视频时间线
-export function getVipTags() {
-  return get(editVideoApi.getVipTags)
-}
-
-export function updateVipTags(payload) {
-  return post(editVideoApi.getVipTags, payload)
-}
-
-// 编辑视频所有者
-export function updateVideoOwner(payload) {
-  return post(editVideoApi.updateVideoUserApi, payload)
-}

+ 0 - 126
src/components/card/EditVideoCard.vue

@@ -1,126 +0,0 @@
-<template>
-  <div>
-    <el-dialog
-      append-to-body
-      :visible.sync="createDialog"
-      :before-close="handleClose"
-      center
-    >
-      <el-card class="box-card">
-        <div slot="header" class="clearfix">
-          <span>视频标签编辑</span>
-          <el-button style="float: right; padding: 3px 0" type="text" @click="submitEditVideo">提交编辑结果</el-button>
-        </div>
-        <div class="text item">
-          <div v-for="(vipTag, index) in candidateList" :key="index">
-            <el-row>
-              <el-checkbox v-model="vipTag.checkAll" :indeterminate="vipTag.isIndeterminate" @change="handleCheckAllChange4">
-                全选<span style="color: red">({{ vipTag.title }})</span>
-              </el-checkbox>
-              <div style="margin: 15px 0;" />
-              <el-checkbox-group v-model="vipTag.checked" @change="handleCheckedCitiesChange4">
-                <el-checkbox v-for="name in vipTag.candidates" :key="name" :label="name">{{ name }}</el-checkbox>
-              </el-checkbox-group>
-            </el-row>
-            <el-divider />
-          </div>
-        </div>
-      </el-card>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { getVipTags, updateVipTags } from '@/api/video_edit'
-
-export default {
-  name: 'EditVideoCard',
-  props: {
-    video: {
-      type: Object,
-      default: null
-    },
-    createDialog: {
-      type: Boolean
-    }
-  },
-  data() {
-    return {
-      item: {
-        title: '',
-        checkAll: false,
-        checked: [],
-        candidates: [],
-        isIndeterminate: true
-      },
-      candidateList: [],
-      vipTags: []
-    }
-  },
-  mounted() {
-    // this.getVipTagsWrapper()
-  },
-  created() {
-  },
-  methods: {
-    getVipTagsWrapper() {
-      getVipTags().then(resp => {
-        this.vipTags = resp.data
-        for (const item of this.vipTags) {
-          var candidates = []
-          for (const i of item.children) {
-            candidates.push(i.name)
-          }
-
-          this.candidateList.push({
-            title: item.name,
-            checkAll: false,
-            checked: [],
-            candidates: candidates,
-            isIndeterminate: true
-          })
-        }
-      })
-    },
-    handleClose() {
-      // 取消和 x 按钮的事件,防止重复操作createDialog变量
-      this.$emit('closeDialog')
-    },
-    // ****************************************************************************************************************
-    handleCheckAllChange4(val) {
-      // this.$message.info('handleCheckAllChange4')
-      // this.checkedCities4 = val ? this.cities4 : []
-      // this.isIndeterminate4 = false
-    },
-    handleCheckedCitiesChange4(value) {
-      // this.$message.info('handleCheckAllChange4')
-      // const checkedCount = value.length
-      // this.checkAll4 = checkedCount === this.cities4.length
-      // this.isIndeterminate4 = checkedCount > 0 && checkedCount < this.cities4.length
-    },
-    // ****************************************************************************************************************
-    submitEditVideo() {
-      var tags = []
-      for (const item of this.candidateList) {
-        for (const i of item.checked) {
-          tags.push(i)
-        }
-      }
-
-      var jsonData = {}
-      jsonData.videoId = this.video.videoId
-      jsonData.tags = tags
-      updateVipTags(jsonData).then(resp => {
-        if (resp.code !== 0) {
-          this.$message.info('submit edit video failed')
-        }
-      }).finally(() => {
-        this.$emit('closeDialog')
-      })
-    }
-  }
-}
-</script>
-
-<style scoped>
-</style>

+ 22 - 28
src/components/card/VideoOpsCard.vue

@@ -3,58 +3,52 @@
     <div class="action-buttons">
       <el-button-group class="mobile-group">
         <el-button
-            type="primary"
-            plain
-            icon="el-icon-thumb"
-            @click="$emit('like', video)"
+          type="primary"
+          plain
+          icon="el-icon-thumb"
+          @click="$emit('like', video)"
         >
           <span class="btn-text">喜欢</span> {{ video.thumbUp }}
         </el-button>
         <el-button
-            type="info"
-            plain
-            icon="el-icon-bottom"
-            @click="$emit('dislike', video)"
-        ></el-button>
+          type="info"
+          plain
+          icon="el-icon-bottom"
+          @click="$emit('dislike', video)"
+        />
       </el-button-group>
 
       <el-button
-          type="warning"
-          icon="el-icon-star-off"
-          class="ml-10"
-          @click="$emit('collect', video)"
+        type="warning"
+        icon="el-icon-star-off"
+        class="ml-10"
+        @click="$emit('collect', video)"
       >
         <span class="btn-text">收藏</span> {{ video.favorite }}
       </el-button>
 
       <el-button
-          type="success"
-          icon="el-icon-share"
-          plain
-          @click="$emit('share')"
+        type="success"
+        icon="el-icon-share"
+        plain
+        @click="$emit('share')"
       >
         <span class="btn-text">分享</span>
       </el-button>
 
       <el-button
-          icon="el-icon-download"
-          plain
-          @click="$emit('download', video.videoId)"
+        icon="el-icon-download"
+        plain
+        @click="$emit('download', video.videoId)"
       >
         <span class="btn-text">下载</span>
       </el-button>
 
       <el-dropdown trigger="click" class="ml-10">
-        <el-button icon="el-icon-more" circle size="small"></el-button>
+        <el-button icon="el-icon-more" circle size="small" />
         <el-dropdown-menu slot="dropdown">
-          <el-dropdown-item v-if="showEdit" @click.native="$emit('edit')">
-            <i class="el-icon-edit"></i> 编辑
-          </el-dropdown-item>
-          <el-dropdown-item v-if="showEdit" @click.native="$emit('delete', video)" style="color: #F56C6C;">
-            <i class="el-icon-delete"></i> 删除
-          </el-dropdown-item>
           <el-dropdown-item :divided="showEdit" @click.native="$emit('report')">
-            <i class="el-icon-warning-outline"></i> 报错
+            <i class="el-icon-warning-outline" /> 报错
           </el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>

+ 2 - 2
src/views/admin/aaa/AdminUserList.vue

@@ -36,13 +36,13 @@
 
     <el-main class="table-main">
       <el-table
+        v-loading="loading"
         :data="dataList"
         border
         stripe
         height="520"
         style="width: 100%"
         class="custom-table"
-        v-loading="loading"
       >
         <el-table-column
           fixed="left"
@@ -141,7 +141,7 @@
           min-width="140"
         >
           <template slot-scope="scope">
-            <div class="role-tags-wrapper" v-if="scope.row.roles && scope.row.roles.length">
+            <div v-if="scope.row.roles && scope.row.roles.length" class="role-tags-wrapper">
               <el-tag
                 v-for="role in (Array.isArray(scope.row.roles) ? scope.row.roles : scope.row.roles.split(','))"
                 :key="role"

+ 27 - 29
src/views/home/PlaylistView.vue

@@ -23,22 +23,22 @@
 
           <div class="video-actions">
             <el-button
-                type="danger"
-                size="small"
-                round
-                icon="el-icon-collection"
-                :disabled="isCollected"
-                @click="collection(video.videoId)"
+              type="danger"
+              size="small"
+              round
+              icon="el-icon-collection"
+              :disabled="isCollected"
+              @click="collection(video.videoId)"
             >
               收藏 {{ video.favorite }}
             </el-button>
             <el-button
-                type="info"
-                size="small"
-                round
-                plain
-                icon="el-icon-warning-outline"
-                @click="deleteVideo(video)"
+              type="info"
+              size="small"
+              round
+              plain
+              icon="el-icon-warning-outline"
+              @click="deleteVideo(video)"
             >
               报错/删除
             </el-button>
@@ -52,11 +52,11 @@
           <el-divider />
           <div class="tag-group">
             <el-tag
-                v-for="(tag, index) in video.tags"
-                :key="index"
-                class="video-tag"
-                size="small"
-                effect="plain"
+              v-for="(tag, index) in video.tags"
+              :key="index"
+              class="video-tag"
+              size="small"
+              effect="plain"
             >
               <router-link :to="`/video/tag/${tag}`">{{ tag }}</router-link>
             </el-tag>
@@ -78,22 +78,22 @@
 
           <div class="playlist-body">
             <el-table
-                :data="playList.list"
-                :show-header="false"
-                highlight-current-row
-                :row-class-name="tableRowClassName"
-                @row-click="playItem"
-                class="playlist-table"
+              :data="playList.list"
+              :show-header="false"
+              highlight-current-row
+              :row-class-name="tableRowClassName"
+              class="playlist-table"
+              @row-click="playItem"
             >
               <el-table-column width="40" type="index" align="center" />
               <el-table-column width="100">
                 <template slot-scope="scope">
                   <div class="playlist-cover-container">
                     <el-image
-                        lazy
-                        fit="cover"
-                        class="playlist-cover-img"
-                        :src="scope.row.coverUrl"
+                      lazy
+                      fit="cover"
+                      class="playlist-cover-img"
+                      :src="scope.row.coverUrl"
                     />
                     <span class="duration-badge">{{ scope.row.duration }}</span>
                   </div>
@@ -120,9 +120,7 @@
 import PermissionDeniedCard from '@/components/card/PermissionDeniedCard'
 import DPlayer from 'dplayer'
 import { videoUrl, videoInfo } from '@/api/video'
-import { videoErrorDelete } from '@/api/video_edit'
 import { getPlaylistItems } from '@/api/collect'
-import { getUserInfo } from '@/api/user'
 
 export default {
   name: 'PlaylistView',

+ 0 - 214
src/views/home/VideoList.vue

@@ -1,214 +0,0 @@
-<template>
-  <div>
-    <el-row class="movie-list">
-      <el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">全选</el-checkbox>
-      <el-button style="float: right; padding: 3px 0" type="text" @click="onSubmit">发布</el-button>
-    </el-row>
-    <!--电影列表,与推荐列表-->
-    <el-row class="movie-list">
-      <!--电影列表-->
-      <el-col>
-        <el-checkbox-group v-model="checkedVideos" @change="handleCheckedChange">
-          <el-checkbox v-for="video in dataList" :key="video.videoId" :label="video.videoId">
-            <div style="cursor: pointer" :title="video.title">
-              <el-image
-                lazy
-                fit="cover"
-                class="coverImg"
-                :src="video.coverUrl"
-              />
-              <span style="position: absolute; top: 0; left: 60%; color:red"> {{ video.duration }} </span>
-              <div style="padding: 14px">
-                <router-link style="text-decoration-line: none" target="_blank" :to="`/video/${video.videoId}`">
-                  <span style="left: 0;margin-bottom: 0px;color: black;">
-                    {{ video.title | ellipsis }}
-                  </span>
-                </router-link>
-              </div>
-            </div>
-          </el-checkbox>
-        </el-checkbox-group>
-        <el-col :span="24" class="pagination">
-          <el-pagination
-            :small="screenWidth <= 768"
-            layout="prev, pager, next"
-            :page-size="pageSize"
-            :current-page="currentPage"
-            :total="totalSize"
-            @current-change="handleCurrentChange"
-          />
-        </el-col>
-      </el-col>
-    </el-row>
-
-    <el-dialog :visible.sync="showDialog" width="30%" center>
-      <el-card class="box-card" style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px">
-        <div slot="header" class="clearfix">
-          <span>修改视频所有者</span>
-          <el-button style="float: right; padding: 10px" type="text" @click="onUpdate">保存修改</el-button>
-        </div>
-        <div class="text item">
-          <el-input
-            v-model="jsonData.newUserId"
-            placeholder="新用户 ID"
-            style="margin-left: 5px;width: 220px"
-            prefix-icon="el-icon-search"
-          />
-        </div>
-      </el-card>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { getUserVideos } from '@/api/video'
-import { updateVideoOwner } from '@/api/video_edit'
-import { getUserInfo } from '@/api/user'
-
-export default {
-  name: 'VideoList',
-  filters: {
-    ellipsis(value) {
-      if (!value) return ''
-      const max = 20
-      if (value.length > max) {
-        return value.slice(0, max) + '...'
-      }
-      return value
-    }
-  },
-  data() {
-    return {
-      // 屏幕宽度, 为了控制分页条的大小
-      screenWidth: document.body.clientWidth,
-      currentPage: 1,
-      pageSize: 120,
-      totalSize: 0,
-      dataList: [],
-      checkAll: false,
-      checkedVideos: [],
-      cityOptions: [],
-      isIndeterminate: true,
-      showDialog: false,
-      jsonData: {
-        oldUserId: null,
-        newUserId: null,
-        videoIds: null
-      }
-    }
-  },
-  created() {
-    document.title = 'VideoList'
-    this.userId = this.$route.params.userId
-    var pnStr = this.$route.query.pn
-    if (pnStr === null || pnStr === undefined) {
-      pnStr = 1
-    }
-
-    getUserInfo(this.userId).then(resp => {
-      if (resp.code === 0) {
-        this.user = resp.data
-        document.title = this.user.screenName + '的视频'
-      }
-    })
-
-    this.currentPage = parseInt(pnStr)
-    this.userVideoListWrapper(this.currentPage, this.userId)
-  },
-  mounted() {
-    // 当窗口宽度改变时获取屏幕宽度
-    window.onresize = () => {
-      return () => {
-        window.screenWidth = document.body.clientWidth
-        this.screenWidth = window.screenWidth
-      }
-    }
-  },
-  methods: {
-    handleCurrentChange(currentPage) {
-      this.currentPage = currentPage
-      this.$router.push({
-        path: '/edit/videolist/' + this.userId,
-        query: {
-          pn: this.currentPage
-        }
-      })
-      this.$router.go(0)
-    },
-    userVideoListWrapper(pageNumber, userId) {
-      this.dataList = []
-      this.totalSize = 0
-      getUserVideos(userId, pageNumber).then(resp => {
-        if (resp.code === 0) {
-          const respData = resp.data
-          this.dataList = respData.list
-          this.totalSize = respData.totalSize
-          this.showEmpty = this.dataList.length === 0
-
-          for (const item of this.dataList) {
-            // 使用 videoId 作为 checked 的值
-            this.cityOptions.push(item.videoId)
-          }
-        }
-      })
-    },
-    handleCheckAllChange(val) {
-      this.checkedVideos = val ? this.cityOptions : []
-      this.isIndeterminate = false
-    },
-    handleCheckedChange(value) {
-      const checkedCount = value.length
-      this.checkAll = checkedCount === this.cityOptions.length
-      this.isIndeterminate = checkedCount > 0 && checkedCount < this.cityOptions.length
-      // console.log(value)
-    },
-    onSubmit() {
-      this.jsonData.oldUserIdStr = this.userId
-      // this.jsonData.newUserId = 10196
-      this.jsonData.videoIds = this.checkedVideos
-
-      this.showDialog = true
-    },
-    onUpdate() {
-      updateVideoOwner(this.jsonData).then(resp => {
-        if (resp.code !== 0) {
-          this.$message.error(resp.msg)
-        } else {
-          this.checkedVideos = []
-          this.checkAll = false
-          this.$router.go(0)
-        }
-      }).finally(e => {
-        this.showDialog = false
-
-        this.jsonData.oldUserIdStr = this.userId
-        this.jsonData.newUserId = null
-        this.jsonData.videoIds = []
-      })
-    }
-  }
-}
-</script>
-
-<style scoped>
-.movie-list {
-  padding-top: 5px;
-  padding-left: 1%;
-  padding-right: 1%;
-}
-
-.pagination {
-  text-align: center;
-  padding: 10px;
-}
-
-.imgs {
-  position: relative;
-}
-
-.coverImg {
-  width: 100%;
-  height: 175px;
-  display: block;
-}
-</style>

+ 25 - 42
src/views/home/VideoPage.vue

@@ -7,16 +7,16 @@
             <h1 class="video-title" v-html="video.title" />
             <div class="video-meta">
               <div class="meta-left">
-                <span class="meta-item"><i class="el-icon-video-play"></i> {{ video.view }} 次播放</span>
-                <span class="meta-item"><i class="el-icon-s-comment"></i> {{ video.comment }} 评论</span>
-                <span class="meta-item"><i class="el-icon-watch"></i> {{ video.pubDate }}</span>
+                <span class="meta-item"><i class="el-icon-video-play" /> {{ video.view }} 次播放</span>
+                <span class="meta-item"><i class="el-icon-s-comment" /> {{ video.comment }} 评论</span>
+                <span class="meta-item"><i class="el-icon-watch" /> {{ video.pubDate }}</span>
               </div>
               <div class="meta-right">
                 <el-tag v-if="videoId && videoId.includes('BV')" size="mini" type="info" effect="plain">
                   <a target="_blank" :href="'https://bilibili.com/' + videoId" class="bili-link">B站源</a>
                 </el-tag>
                 <el-tag type="danger" size="small" effect="dark" class="live-tag">
-                  <i class="el-icon-view"></i> {{ realtimeViewCount }} 人正在看
+                  <i class="el-icon-view" /> {{ realtimeViewCount }} 人正在看
                 </el-tag>
               </div>
             </div>
@@ -24,32 +24,30 @@
 
           <div class="video-content">
             <video-player-card
-                v-if="video"
-                :video-id="videoId"
-                :video-data="video"
-                :user-token="userToken"
-                :send-event="sendEvent"
-                @update-view-count="val => realtimeViewCount = val"
+              v-if="video"
+              :video-id="videoId"
+              :video-data="video"
+              :user-token="userToken"
+              :send-event="sendEvent"
+              @update-view-count="val => realtimeViewCount = val"
             />
           </div>
 
           <video-ops-card
-              v-if="video"
-              :video="video"
-              :show-edit="showEdit"
-              @like="likeVideo"
-              @dislike="dislikeVideoWrapper"
-              @collect="collection"
-              @share="displayShareVideoDialog"
-              @download="getDownloadUrl"
-              @report="displayErrorReportDialog"
-              @edit="displayEditDialog"
-              @delete="deleteVideo"
+            v-if="video"
+            :video="video"
+            :show-edit="showEdit"
+            @like="likeVideo"
+            @dislike="dislikeVideoWrapper"
+            @collect="collection"
+            @share="displayShareVideoDialog"
+            @download="getDownloadUrl"
+            @report="displayErrorReportDialog"
           />
         </div>
 
         <el-card class="info-card shadow-box">
-          <div class="video-description" v-html="video.description"></div>
+          <div class="video-description" v-html="video.description" />
           <div class="video-tags">
             <el-tag v-for="(tag,index) in video.tags" :key="index" class="video-tag-item" size="small" effect="light" round>
               <router-link :to="'/video/tag/' + tag"># {{ tag }}</router-link>
@@ -116,14 +114,12 @@
       <el-dialog append-to-body :visible.sync="showShareVideoDialog" title="分享视频" width="500px">
         <div class="share-preview">
           <el-image lazy fit="cover" class="share-cover" :src="video.coverUrl" />
-          <h4 v-html="video.title"></h4>
+          <h4 v-html="video.title" />
         </div>
         <span slot="footer">
           <el-button type="primary" icon="el-icon-document-copy" @click="submitShareVideo">复制分享链接</el-button>
         </span>
       </el-dialog>
-
-      <edit-video-card :video="video" :create-dialog="showEditDialog" @closeDialog="closeHandle" />
     </el-row>
   </el-row>
   <el-row v-else class="denied-container">
@@ -132,25 +128,22 @@
 </template>
 
 <script>
-import { similarVideo, videoInfo, downloadVideo, getShortUrl } from '@/api/video'
-import { videoErrorReport, videoErrorDelete } from '@/api/video_edit'
+import { similarVideo, videoInfo, downloadVideo, getShortUrl, videoErrorReport } from '@/api/video'
 import { collectItem, createAlbum, getUserAlbumList } from '@/api/collect'
 import { getUserInfo } from '@/api/user'
 import { getAccessToken, getAuthedUser } from '@/utils/auth'
 import { dislikeVideo } from '@/api/content'
 
-// 组件导入
 import PermissionDeniedCard from '@/components/card/PermissionDeniedCard'
 import VideoPlayerCard from 'components/card/VideoPlayerCard'
 import SideVideoCard from 'components/card/SideVideoCard'
 import UserAvatarCard from '@/components/card/UserAvatarCard'
-import EditVideoCard from '@/components/card/EditVideoCard'
 import UserCommentCard from '@/components/card/UserCommentCard'
 import VideoOpsCard from 'components/card/VideoOpsCard'
 
 export default {
   name: 'VideoPage',
-  components: { EditVideoCard, SideVideoCard, UserAvatarCard, PermissionDeniedCard, VideoPlayerCard, UserCommentCard, VideoOpsCard },
+  components: { SideVideoCard, UserAvatarCard, PermissionDeniedCard, VideoPlayerCard, UserCommentCard, VideoOpsCard },
   data() {
     return {
       screenWidth: document.body.clientWidth,
@@ -170,7 +163,6 @@ export default {
       albumForm: { albumName: null },
       currentRow: null,
       showShareVideoDialog: false,
-      showEditDialog: false,
       showEdit: true,
       userToken: null,
       sendEvent: true,
@@ -236,13 +228,6 @@ export default {
       createAlbum(this.albumForm).then(resp => { if (resp.code === 0) this.playlist.push(resp.data) })
       this.albumForm.albumName = null
     },
-    deleteVideo(video) {
-      this.$confirm('确定要删除 ' + video.title + '?', '提示', { type: 'warning' }).then(() => {
-        videoErrorDelete({ videoId: video.videoId, errorCode: 4 }).then(resp => {
-          if (resp.code === 0) this.$notify.warning({ title: '提示', message: '视频错误已提交' })
-        })
-      })
-    },
     displayErrorReportDialog() { this.errorReportForm.videoId = this.video.videoId; this.showErrorReportDialog = true },
     submitErrorReport() {
       videoErrorReport(this.errorReportForm).then(resp => {
@@ -251,14 +236,12 @@ export default {
       })
     },
     displayShareVideoDialog() { this.showShareVideoDialog = true },
-    displayEditDialog() { this.showEditDialog = true },
-    closeHandle() { this.showEditDialog = false },
     submitShareVideo() {
       getShortUrl(this.video.videoId).then(resp => {
         if (resp.code === 0) {
           const content = window.location.origin + resp.data
-          const input = document.createElement('input'); input.value = content; document.body.appendChild(input);
-          input.select(); document.execCommand('Copy'); document.body.removeChild(input);
+          const input = document.createElement('input'); input.value = content; document.body.appendChild(input)
+          input.select(); document.execCommand('Copy'); document.body.removeChild(input)
           this.$message.info('已成功复制到剪贴板')
         }
         this.showShareVideoDialog = false

+ 2 - 1
src/views/post/VideoPostPublish.vue

@@ -17,6 +17,7 @@
           </div>
           <div class="cover-upload-wrapper">
             <el-upload
+              v-if="imgOssUrl !== ''"
               class="avatar-uploader"
               :action="imgOssUrl"
               :headers="imgHeaders"
@@ -137,7 +138,7 @@
 
 <script>
 import UploaderCard from 'components/card/UploaderCard.vue'
-import {addVideoFile, updateVideoCover, updateVideoFile, videoRegion} from '@/api/video'
+import { addVideoFile, updateVideoCover, updateVideoFile, videoRegion } from '@/api/video'
 import { getVideoChannelInfo, getVideoCoverChannelInfo } from '@/api/file'
 
 export default {