瀏覽代碼

feat:页面样式优化

chenjiaxin 3 周之前
父節點
當前提交
c4d35a9df8
共有 2 個文件被更改,包括 36 次插入6 次删除
  1. 1 1
      src/router/index.js
  2. 35 5
      src/views/video/oral-video.vue

+ 1 - 1
src/router/index.js

@@ -39,7 +39,7 @@ import videoRouter from "./modules/video";
 
 export const asyncRoutes = [
   videoRouter,
-  userAuthRouter,
+  // userAuthRouter,
 ];
 
 

+ 35 - 5
src/views/video/oral-video.vue

@@ -102,7 +102,12 @@
         align="center"
         prop="reviewStatus"
       >
-        <template slot-scope="scope">
+       <template slot-scope="scope">
+          <span class="status-tag" :class="{
+            'status-pending': scope.row.reviewStatus === 0,
+            'status-success': scope.row.reviewStatus === 1,
+            'status-error': scope.row.reviewStatus === 2
+          }"></span>
           {{ getValueByKey(scope.row.reviewStatus, auditStatus) }}
         </template>
       </el-table-column>
@@ -126,6 +131,11 @@
         prop="publishStatus"
       >
         <template slot-scope="scope">
+          <span class="status-tag" :class="{
+            'status-pending': scope.row.publishStatus === 0,
+            'status-success': scope.row.publishStatus === 1,
+            'status-error': scope.row.publishStatus === 2
+          }"></span>
           {{ getValueByKey(scope.row.publishStatus, auditStatus) }}
         </template>
       </el-table-column>
@@ -217,7 +227,7 @@
             <el-button
               type="danger"
               size="mini"
-              @click="handleDelete(scope.row.id)"
+              @click="handleDelete(scope.row)"
             >
               删除
             </el-button>
@@ -329,8 +339,7 @@ export default {
         this.$message.error("视频地址不存在");
         return;
       }
-      this.currentVideoUrl =
-        "https://cdn.shopify.com/videos/c/o/v/a1f2197c35ed4c4985f953af47cb68f0.mp4";
+      this.currentVideoUrl = videoUrl;
       this.currentVideoTitle = videoTitle;
       this.$refs.videoPlayer.show();
     },
@@ -346,7 +355,7 @@ export default {
         type: "warning"
       }).then(() => {
         const { id } = row;
-        deleteOralVideoList({ idList: [id] }).then(() => {
+        deleteOralVideoList([id]).then(() => {
           this.$notify({
             title: "成功",
             message: "删除成功",
@@ -401,4 +410,25 @@ export default {
     }
   }
 }
+
+.status-tag {
+  display: inline-block;
+  width: 8px;
+  height: 8px;
+  border-radius: 50%;
+  margin-right: 6px;
+}
+
+.status-pending {
+  background-color: #e6a23c;
+}
+
+.status-success {
+  background-color: #67c23a;
+}
+
+.status-error {
+  background-color: #f56c6c;
+}
+</style>
 </style>