DESKTOP-O04BTUJ\muzen 2 years ago
parent
commit
5aca3407c6
1 changed files with 57 additions and 1 deletions
  1. 57 1
      src/mixin/index.js

+ 57 - 1
src/mixin/index.js

@@ -10,6 +10,10 @@ import {
   options
 } from '@/api/music/radio'
 
+import {
+  channelTemplate
+} from '@/api/operation/channel'
+
 // 设备列表
 const devMixin = {
   data() {
@@ -323,6 +327,56 @@ const contentMixin = {
   }
 }
 
+// 奖励类型
+const rewardMixin = {
+  data() {
+    return {
+      rewardOptions: [{
+        //   value: 0,
+        //   label: '音乐套餐'
+        // }, {
+        //   value: 1,
+        //   label: '流量套餐'
+        // }, {
+        //   value: 2,
+        //   label: '亲子礼包'
+        // }, {
+        //   value: 3,
+        //   label: '音响实物'
+        // }, {
+        value: 4,
+        label: '积分'
+        // },{
+        //   value: 5,
+        //   label: '谢谢惠顾'
+      }]
+    }
+  }
+}
+
+// 分类
+const classifyMixin = {
+  data() {
+    return {
+      classifyOptions: []
+    }
+  },
+  mounted() {
+    channelTemplate({
+      audioType: this.audioType
+    }).then(res => {
+      if (res.code === 0) {
+        res.data.map(i => {
+          this.classifyOptions.push({
+            value: i.id,
+            label: i.name
+          })
+        })
+      }
+    })
+  }
+}
+
 export {
   devMixin,
   serviceTimeMixin,
@@ -336,5 +390,7 @@ export {
   payTypeMixin,
   albumTypeMixin,
   addressMixin,
-  contentMixin
+  contentMixin,
+  rewardMixin,
+  classifyMixin
 }