zhaoxiaohai 3 年之前
父节点
当前提交
49a887ae9e
共有 1 个文件被更改,包括 7 次插入8 次删除
  1. 7 8
      pages/annunciate/details.js

+ 7 - 8
pages/annunciate/details.js

@@ -31,19 +31,18 @@ Page({
                 title: res.data,
                 icon: "none"
             });
-
-            let list = MFT.fileList(res.data[0].attinfos.filter(v => v.usetype != 'cover')),
+            let list = MFT.fileList(res.data.attinfos.filter(v => v.usetype != 'cover')),
                 videoList = [],
                 attinfos = [];
             if (list.length > 0) {
                 for (let i = 0; i < list.length; i++) {
                     list[i].fileType == 'video' ? videoList.push(list[i]) : attinfos.push(list[i]);
                 }
-                res.data[0].attinfos = attinfos;
+                res.data.attinfos = attinfos;
             }
-            if (res.data[0].content.length) res.data[0].content = decodeURIComponent(res.data[0].content);
+            if (res.data.content.length) res.data.content = decodeURIComponent(res.data.content);
             this.setData({
-                detailsData: res.data[0],
+                detailsData: res.data,
                 videoList
             });
         });
@@ -59,14 +58,14 @@ Page({
                 icon: "none"
             });
             let isEvaluate = false;
-            if (res.data[0].score != 0) {
+            if (res.data.score != 0) {
                 this.rateChange({
-                    detail: res.data[0].score
+                    detail: res.data.score
                 })
                 isEvaluate = true;
             }
             this.setData({
-                evaluate: res.data[0],
+                evaluate: res.data,
                 isEvaluate
             })
         });