Browse Source

Merge branch 'develop/3.1.7' into test

DESKTOP-SVI9JE1\muzen 1 year ago
parent
commit
d732919329

+ 4 - 3
src/api/music/radio.js

@@ -10,10 +10,11 @@ export function list(data) {
 }
 
 // 地域 / 内容分类
-export function options(type) {
+export function options(query) {
   return request({
-    url: `/admin/tBroadcast/getAddOrContentlist/${type}`,
-    method: 'get'
+    url: `/admin/tBroadcast/getAddOrContentlist`,
+    method: 'get',
+    params: query
   })
 }
 

+ 3 - 6
src/mixin/index.js

@@ -469,7 +469,7 @@ const addressMixin = {
   },
   methods: {
     getAddress() {
-      options(2).then(res => {
+      options({type: 2}).then(res => {
         if (res.code === 0) {
           res.data.map(i => {
             this.addressOptions.push({
@@ -490,12 +490,9 @@ const contentMixin = {
       contentOptions: []
     }
   },
-  mounted() {
-    this.getContent()
-  },
   methods: {
-    getContent() {
-      options(1).then(res => {
+    getContent(data) {
+      options(data).then(res => {
         if (res.code === 0) {
           res.data.map(i => {
             this.contentOptions.push({

+ 1 - 0
src/views/music/choiceness/detail.vue

@@ -161,6 +161,7 @@ export default {
     }
   },
   mounted() {
+    this.getContent({ type: 1, platformId: 4})
     if (this.$route.query.id) {
       this.form.id = this.$route.query.id
       this.disabled = Boolean(this.$route.query.disabled)

+ 7 - 3
src/views/music/radio/detail.vue

@@ -49,9 +49,9 @@
 
 <script>
 import { submit, detail } from '@/api/music/radio'
-import { platformMixin, addressMixin, contentMixin, mapMixin } from '@/mixin/index'
+import { platformMixin, addressMixin, mapMixin, contentMixin } from '@/mixin/index'
 export default {
-  mixins: [platformMixin, addressMixin, contentMixin, mapMixin],
+  mixins: [platformMixin, addressMixin, mapMixin, contentMixin],
   data() {
     return {
       // 表单
@@ -87,6 +87,11 @@ export default {
       disabled: false
     }
   },
+  watch: {
+    'form.platformId'(val) {
+      this.getContent({type: 1, platformId: val})
+    }
+  },
   mounted() {
     // 获取资源平台
     this.getPlatform({
@@ -122,7 +127,6 @@ export default {
 
     // 确定
     getSubmit() {
-      console.log(this.form);
       this.$refs.form.validate((valid) => {
         if (valid) {
           this.form.province = this.form.cascader[0]

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

@@ -119,6 +119,7 @@ export default {
     this.getPlatform({
       audioType: 2
     })
+    this.getContent({ type: 1 })
     this.getList()
   },
   methods: {