Browse Source

音频管理 获取资源平台接口传参修改

DESKTOP-O04BTUJ\muzen 2 years ago
parent
commit
cf71b39fb9

+ 4 - 1
src/views/music/album/detail.vue

@@ -200,7 +200,10 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(15)
+    this.getPlatform({
+      audioType: 15,
+      joinType: 2
+    })
     if (this.$route.query.id) {
       this.form.id = this.$route.query.id
       this.disabled = Boolean(this.$route.query.disabled)

+ 3 - 1
src/views/music/album/index.vue

@@ -102,7 +102,9 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(15)
+    this.getPlatform({
+      audioType: 15
+    })
     this.getList()
   },
   methods: {

+ 4 - 1
src/views/music/anchor/detail.vue

@@ -61,7 +61,10 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(12)
+    this.getPlatform({
+      audioType: 12,
+      joinType: 2
+    })
     if (this.$route.query.id) {
       this.form.id = this.$route.query.id
       this.disabled = Boolean(this.$route.query.disabled)

+ 3 - 1
src/views/music/anchor/index.vue

@@ -73,7 +73,9 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(12)
+    this.getPlatform({
+      audioType: 12
+    })
     this.getList()
   },
   methods: {

+ 4 - 1
src/views/music/blog/detail.vue

@@ -205,7 +205,10 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(8)
+    this.getPlatform({
+      audioType: 8,
+      joinType: 2
+    })
     // 分类
     this.getClassify(8)
     if (this.$route.query.id) {

+ 3 - 1
src/views/music/blog/index.vue

@@ -102,7 +102,9 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(8)
+    this.getPlatform({
+      audioType: 8
+    })
     // 获取分类
     this.getClassify(8)
     this.getList()

+ 4 - 1
src/views/music/list/detail.vue

@@ -89,7 +89,10 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(11)
+    this.getPlatform({
+      audioType: 11,
+      joinType: 2
+    })
     if (this.$route.query.id) {
       this.form.id = this.$route.query.id
       this.disabled = Boolean(this.$route.query.disabled)

+ 3 - 1
src/views/music/list/index.vue

@@ -107,7 +107,9 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(11)
+    this.getPlatform({
+      audioType: 11
+    })
     this.getList()
   },
   methods: {

+ 4 - 1
src/views/music/menu/detail.vue

@@ -154,7 +154,10 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(10)
+    this.getPlatform({
+      audioType: 10,
+      joinType: 2
+    })
     if (this.$route.query.id) {
       this.form.id = this.$route.query.id
       this.disabled = Boolean(this.$route.query.disabled)

+ 3 - 1
src/views/music/menu/index.vue

@@ -89,7 +89,9 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(10)
+    this.getPlatform({
+      audioType: 10
+    })
     this.getList()
   },
   methods: {

+ 22 - 1
src/views/music/platform/index.vue

@@ -6,6 +6,7 @@
       <el-table-column type="index" label="序号" align="center" />
       <el-table-column label="资源平台" prop="name" align="center" />
       <el-table-column label="音频类型" prop="audioType" align="center" :formatter="audioFormatter" />
+      <el-table-column label="对接方式" prop="joinType" align="center" :formatter="joinTypeFormatter" />
       <el-table-column label="操作" align="center">
         <template slot-scope="scope">
           <el-button type="text" @click="getDialog(scope.row.id)">编辑</el-button>
@@ -28,6 +29,12 @@
               :label="item.label" />
           </el-select>
         </el-form-item>
+        <el-form-item label="对接方式:" prop="joinType">
+          <el-select v-model="dialogForm.joinType" placeholder="请选择资源对接方式">
+            <el-option v-for="item in joinTypeOptions" :key="item.value" :value="item.value.toString()"
+              :label="item.label" />
+          </el-select>
+        </el-form-item>
         <el-form-item style="text-align: right;">
           <el-button @click="cancel">取消</el-button>
           <el-button type="primary" @click="getSubmit">确定</el-button>
@@ -72,8 +79,19 @@ export default {
         }],
         audioType: [{
           required: true, message: '请选择音频类型', trigger: 'change'
+        }],
+        joinType: [{
+          required: true, message: '请选择资源对接方式', trigger: 'change'
         }]
-      }
+      },
+      // 对接方式
+      joinTypeOptions: [{
+        value: 1,
+        label: 'API接口'
+      }, {
+        value: 2,
+        label: '本地管理'
+      }]
     }
   },
   mounted() {
@@ -151,6 +169,9 @@ export default {
     // 字典翻译
     audioFormatter(row) {
       return row.audioType ? row.audioType.split(',').map(i => this.selectDictLabel(this.audioOptions, i)).join(',') : '/'
+    },
+    joinTypeFormatter(row) {
+      return this.selectDictLabel(this.joinTypeOptions, row.joinType)
     }
   }
 };

+ 4 - 1
src/views/music/program/detail.vue

@@ -116,7 +116,10 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(6)
+    this.getPlatform({
+      audioType: 6,
+      joinType: 2
+    })
     if (this.$route.query.id) {
       this.form.id = this.$route.query.id
       this.disabled = Boolean(this.$route.query.disabled)

+ 3 - 1
src/views/music/program/index.vue

@@ -94,7 +94,9 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(6)
+    this.getPlatform({
+      audioType: 6
+    })
     this.getList()
   },
   methods: {

+ 4 - 1
src/views/music/radio/detail.vue

@@ -84,7 +84,10 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(2)
+    this.getPlatform({
+      audioType: 2,
+      joinType: 2
+    })
     if (this.$route.query.id) {
       this.form.id = this.$route.query.id
       this.disabled = Boolean(this.$route.query.disabled)

+ 3 - 1
src/views/music/radio/index.vue

@@ -102,7 +102,9 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(2)
+    this.getPlatform({
+      audioType: 2
+    })
     this.getList()
   },
   methods: {

+ 4 - 1
src/views/music/singer/detail.vue

@@ -90,7 +90,10 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(9)
+    this.getPlatform({
+      audioType: 9,
+      joinType: 2
+    })
     if (this.$route.query.id) {
       this.form.id = this.$route.query.id
       this.disabled = Boolean(this.$route.query.disabled)

+ 3 - 1
src/views/music/singer/index.vue

@@ -86,7 +86,9 @@ export default {
   },
   mounted() {
     // 获取资源平台
-    this.getPlatform(9)
+    this.getPlatform({
+      audioType: 9
+    })
     this.getList()
   },
   methods: {