Pārlūkot izejas kodu

feature:修改设备详情资源的资源文案,数据源获取方法

zeng.chen 1 mēnesi atpakaļ
vecāks
revīzija
81a46cad3d
1 mainītis faili ar 10 papildinājumiem un 10 dzēšanām
  1. 10 10
      src/views/device/list/detail.vue

+ 10 - 10
src/views/device/list/detail.vue

@@ -84,7 +84,7 @@
           </el-table-column>
           <el-table-column prop="contentVip" label="设备会员收费时间" width="180">
             <template slot-scope="scope">
-              <el-select v-model="scope.row.contentVip" placeholder="请选择流量平台" clearable>
+              <el-select v-model="scope.row.contentVip" placeholder="请设备会员收费时间" clearable>
                 <el-option v-for="item in contentVipOptions" :key="item.value" :label="item.label"
                   :value="item.value" />
               </el-select>
@@ -208,7 +208,6 @@ import {
   devModeMixin,
   devTypeMixin,
   yesOrNoMixin,
-  platformMixin,
 } from "@/mixin/index";
 
 export default {
@@ -219,14 +218,19 @@ export default {
     devCategoryMixin,
     yesOrNoMixin,
     devFucMixin,
-    platformMixin,
   ],
   data() {
     return {
       isChecked1: false,
       isChecked2: false,
       isShowPlatform: false,
-      contentVipPlatformList: [],
+      contentVipPlatformList: [
+
+      ],
+      platformOptions: [
+        { label: "QQ音乐", value: 6 },
+        { label: "喜马拉雅", value: 12 },
+      ],
       platformContentVipOptions: [],
       // 表单
       form: {
@@ -356,9 +360,6 @@ export default {
   mounted() {
     this.getCateGory(1);
     this.getList();
-    this.getPlatform({
-      audioType: 15,
-    })
   },
   methods: {
     // 详情
@@ -507,9 +508,9 @@ export default {
       }
       this.form.contentVipPlatformList = []
       this.contentVipPlatformList.forEach(element => {
-        if (element.contentVip != null) {
+        if (element.platformId != null) {
           this.form.contentVipPlatformList.push({
-            contentVip: element.contentVip,
+            contentVip: element.contentVip ?? 0,
             platformId: element.platformId,
           })
         }
@@ -544,7 +545,6 @@ export default {
     },
     clickAddPlatform() {
       this.isShowPlatform = true;
-      console.log("新增一个平台", this.platformOptions.length, this.contentVipPlatformList.length);
       if (this.platformOptions.length != 0 && this.contentVipPlatformList.length <= this.platformOptions.length) {
         this.contentVipPlatformList.push({ "contentVip": null, "platformId": null, });
       } else {