zhaoxiaohai há 2 anos atrás
pai
commit
15f1b071ed

+ 6 - 4
pages/annunciate/details.js

@@ -19,9 +19,10 @@ Page({
         isEvaluate: false
     },
     onLoad(options) {
-        console.log(options)
-        let dataAuth = '';
-        if (options.auth.includes('团队内部数据分析') && options.auth.includes('经销商数据分析')) {
+        console.log(options.auth)
+        let auth = options.auth.split(","),
+            dataAuth = '';
+        if (auth.includes('团队内部数据分析') && auth.includes('经销商数据分析')) {
             dataAuth = 'all';
         } else {
             dataAuth = options.auth.includes('团队内部数据分析') ? '内部' : '经销商'
@@ -30,10 +31,10 @@ Page({
         this.setData({
             viewData,
             dataAuth,
+            auth,
             sat_noticeid: options.id
         });
         this.queryNoticeMain(); //获取详情
-        if (viewData) this.queryReadRecord(); //查询数据
     },
     /* 通告详情 */
     queryNoticeMain() {
@@ -48,6 +49,7 @@ Page({
                 title: res.msg,
                 icon: "none"
             });
+            if (this.data.viewData) this.queryReadRecord(); //查询数据
             let list = MFT.fileList(res.data.attinfos.filter(v => v.usetype != 'cover')), //过滤封面文件
                 videoList = [], //视频附件列表
                 attinfos = []; //其他附件

+ 3 - 2
pages/annunciate/details.wxml

@@ -31,7 +31,7 @@
         <view class="label">视频</view>
         <video wx:for="{{videoList}}" src="{{item.url}}" />
     </view>
-    <My_card custom-class="evaluate" title="通告评价" hover>
+    <My_card wx:if="{{per.query(auth,'反馈')}}" custom-class="evaluate" title="通告评价" hover>
         <view slot='title-r' class="title-r">{{evaluate.evaluatecount}}人评分</view>
         <view class="score">
             <text>总体</text>
@@ -47,4 +47,5 @@
         </view>
     </My_card>
     <view style="height: 30px;" />
-</view>
+</view>
+<wxs src='../../utils/wxmlQueryPer.wxs' module="per" />

+ 1 - 1
pages/annunciate/index.js

@@ -68,7 +68,7 @@ Page({
             item
         } = e.currentTarget.dataset, authList = this.data.authList;
         wx.navigateTo({
-            url: `./details?id=${item.sat_noticeid}&feedback=${authList.includes('反馈')}&auth=${authList}`
+            url: `./details?id=${item.sat_noticeid}&auth=${authList}`
         })
     },