Browse Source

频道管理 定制频道

DESKTOP-O04BTUJ\muzen 3 năm trước cách đây
mục cha
commit
402657eb84
1 tập tin đã thay đổi với 10 bổ sung12 xóa
  1. 10 12
      src/views/channel/custom/detail.vue

+ 10 - 12
src/views/channel/custom/detail.vue

@@ -108,11 +108,8 @@ export default {
       dialogData: [],
       // 编辑表单
       form: {},
-      // 接口表单
-      data: {
-        channelId: this.$route.query.channelId,
-        audioType: this.$route.query.audioType
-      },
+      // 频道属性
+      channelId: this.$route.query.channelId,
       // 列表表单
       dialogForm: {
         pageNum: 1,
@@ -127,23 +124,23 @@ export default {
   mounted() {
     this.getDetail()
     this.getList()
+    console.log(this.$route.query.channelId);
   },
   methods: {
     // 频道详情
     getDetail() {
       channelDetail({
-        channelId: this.data.channelId
+        channelId: this.channelId
       }).then(res => {
         if (res.code === 0) {
           this.form = res.data
-          console.log(this.form);
         }
       })
     },
 
     // 频道内容列表
     getList() {
-      queryList(this.data.channelId).then(res => {
+      queryList(this.channelId).then(res => {
         if (res.code === 0) {
           this.tableData = res.data
         }
@@ -159,9 +156,10 @@ export default {
           this.classifyOptions = res.data
         }
       })
-
+      console.log(this.channelId, this.form);
       channelList({
-        ...this.data,
+        channelId: this.channelId,
+        audioType: this.form.channelType,
         ...this.dialogForm
       }).then(res => {
         if (res.code == 0) {
@@ -233,8 +231,8 @@ export default {
     // 添加频道内容
     getAdd() {
       list({
-        audioType: this.data.audioType,
-        channelDefaultId: this.data.channelId,
+        audioType: this.form.channelType,
+        channelDefaultId: this.channelId,
         ids: this.ids
       }).then(res => {
         if (res.code === 0) {