Bläddra i källkod

feat: 歌单、资源平台为api接口的,合集内容允许改变排序

Damon 7 månader sedan
förälder
incheckning
95abc7bba5
3 ändrade filer med 42 tillägg och 4 borttagningar
  1. 32 1
      src/mixin/index.js
  2. 1 1
      src/utils/request.js
  3. 9 2
      src/views/music/menu/detail.vue

+ 32 - 1
src/mixin/index.js

@@ -132,7 +132,7 @@ const devFucMixin = {
     };
   },
 
-  
+
   mounted() {
     functionList({
       status: 0,
@@ -427,6 +427,32 @@ const platformMixin = {
   },
   methods: {
     // 通过音频类型获取对应的平台
+    //     {"data":[{"id":"5","name":"音乐随身听","status":1,"isThird":null,"updateTime":1684215874,"createTime":0,
+    //       "audioType":"10,9,11,15,6,8,12","joinType":"2,3"},{"id":"6","name":"QQ音乐","status":1,"isThird":null,
+    //         "updateTime":1666345649,"createTime":0,"audioType":"10,11,9,15","joinType":"1"},
+    //   {"id":"25","name":"验收测试环境3","status":1,"isThird":null,
+    // "updateTime":1664274267,"createTime":1663146321,"audioType":"10,11,9,15","joinType":"1"}
+    // ,{"id":"72","name":"测试3","status":1,"isThird":null,"updateTime":1667455705,
+    // "createTime":1664173454,"audioType":"2,8,6,11,10,9,12,15","joinType":"1,3"},
+    // {"id":"82","name":"测试本地管理","status":1,"isThird":null,"updateTime":1684208429,"createTime":1684206852,
+    //   "audioType":"2,6,8,9,10,11,12,15","joinType":"2"},{"id":"99","name":"人民音乐出版社","status":1,
+    //     "isThird":null,"updateTime":1731041082,"createTime":1711004056,"audioType":"6,8,9,10,11,15,12",
+    //     "joinType":"2"}],"code":0,"message":"","requestId":null,"success":true}
+
+    /// 喜马拉雅:12
+    // 获取对应平台====5==音乐随身听==2,3
+    // 获取对应平台====6==QQ音乐==1
+    // 获取对应平台====7==HIFIVE音加加==1
+    // 获取对应平台====7==HIFIVE音加加==1
+    // 获取对应平台====8==看见音乐==1
+    // 获取对应平台====9==酷狗音乐==1
+    // 获取对应平台====10==爱听歌单音乐==1
+    // 获取对应平台====21==测试环境==2
+    // 获取对应平台====25==验收测试环境3==1
+    // 获取对应平台====72==测试3==1,3
+    // 获取对应平台====82==测试本地管理==2
+    // 获取对应平台====99==人民音乐出版社==2
+
     getPlatform(e) {
       this.platformOptions = [];
       return new Promise((resolve, reject) => {
@@ -441,6 +467,11 @@ const platformMixin = {
                 })
               );
               e ? (this.platformTypeOptions = this.platformOptions) : "";
+              res.data.map((i) => {
+                console.log("获取对应平台====" + Number(i.id) + "==" + i.name + "==" + i.joinType);
+                return i;
+              });
+
               resolve(this.platformOptions, this.platformTypeOptions);
             }
           })

+ 1 - 1
src/utils/request.js

@@ -65,7 +65,7 @@ service.interceptors.request.use(config => {
       const s_time = sessionObj.time; // 请求时间
       var interval; // 间隔时间(ms),小于此时间视为重复提交
 
-      console.log("gadfadsqwerqewrwqr=aaa==" + JSON.stringify(config.url));
+//      console.log("获取请求链接==" + JSON.stringify(config.url));
       ///活动管理-新增赠送流量特殊处理
       if (config.url === "/admin/activity/doExchange") {
         interval = 2000;

+ 9 - 2
src/views/music/menu/detail.vue

@@ -125,7 +125,7 @@
               type="text"
               icon="el-icon-caret-top"
               @click="getChange(true, scope.$index,scope.$index - 1)"
-              :disabled="scope.$index < 1&& !disabled"
+              :disabled="scope.$index < 1&& !disabled&&canOrder"
             />
 
             <!-- 向下移动 -->
@@ -133,7 +133,7 @@
               type="text"
               icon="el-icon-caret-bottom"
               @click="getChange(false,scope.$index, scope.$index + 1)"
-              :disabled="scope.$index > form.programList.length-2&& !disabled"
+              :disabled="scope.$index > form.programList.length-2&& !disabled&&canOrder"
             />
 
             </template>
@@ -383,6 +383,8 @@ export default {
       disabledChecked: false,
       ///被选中数据是否加载完
       isLoad: false,
+      ///是否可以调整顺序
+      canOrder: true,
     };
   },
   mounted() {
@@ -488,10 +490,15 @@ export default {
     },
 
     // 详情
+    // platformId:7 HIFIVE音加加
     getDetail() {
       detail(this.form.id).then((res) => {
         if (res.code === 0) {
           this.form = res.data;
+          ///qq音乐和喜马拉雅
+          if (this.form.platformId == 6 || this.form.platformId == 12) {
+            this.canOrder = false;
+          }
           this.form.programList =
             res.data.programList === null ? [] : res.data.programList;
         }