瀏覽代碼

管理权限或者创建人可以编辑或者作废 查重权限可以查重

xiaohaizhao 2 年之前
父節點
當前提交
a60c777376
共有 2 個文件被更改,包括 16 次插入27 次删除
  1. 15 26
      packageA/opponent/detail.js
  2. 1 1
      packageA/opponent/detail.wxml

+ 15 - 26
packageA/opponent/detail.js

@@ -1,7 +1,6 @@
 const _Http = getApp().globalData.http;
 Page({
     data: {
-        isShowTabbar: true, //是否显示底部
         tabsActive: 1, //tabs 选中项
         sa_competitorid: 0,
         detail: {}, //详情数据
@@ -33,13 +32,7 @@ Page({
         }],
         list1: [], //基本信息
         list2: [], //系统信息
-        tabbarList: [{
-            icon: "icon-bianji",
-            label: "编辑"
-        }, {
-            icon: "icon-shanchu",
-            label: "作废"
-        }]
+
     },
     onLoad(options) {
         this.setData({
@@ -166,14 +159,26 @@ Page({
                 label: "最近编辑时间",
                 value: res.data.changedate
             }];
+            let tabbarList = [];
+            if (this.data.isAdmin || res.data.createuserid == wx.getStorageSync('userMsg').userid) tabbarList = [{
+                icon: "icon-bianji",
+                label: "编辑"
+            }, {
+                icon: "icon-shanchu",
+                label: "作废"
+            }]
+            if (wx.getStorageSync('auth').wPublicCustomer.options.some(v => v == "viewRepetition")) tabbarList.push({
+                icon: "icon-a-shouyejingangquhehuoren",
+                label: "查看重复"
+            });
             this.setData({
                 detail: res.data,
                 briefs,
                 list1,
                 list2,
-                isShowTabbar: this.data.isAdmin || res.data.createuserid == wx.getStorageSync('userMsg').userid
+                tabbarList
             });
-            //获取标签
+/*  */            //获取标签
             this.getTags();
             this.partialRenewal();
         });
@@ -244,20 +249,4 @@ Page({
     onReachBottom() {
         this.partialRenewal();
     },
-    onShareAppMessage() {},
-    //标签获取到列表后
-    onGetList({
-        detail
-    }) {
-        console.log(detail)
-        if (detail.data.systemtag.includes("疑似重复") && this.data.options.find(v => v == 'viewRepetition')) {
-            this.data.tabbarList.push({
-                icon: "icon-a-shouyejingangquhehuoren",
-                label: "查看重复"
-            });
-            this.setData({
-                tabbarList: this.data.tabbarList
-            })
-        }
-    },
 })

+ 1 - 1
packageA/opponent/detail.wxml

@@ -29,7 +29,7 @@
     <view style="height: 140rpx;" />
 </Yl_FunTabs>
 <!-- 底部 -->
-<Yl_Tabbar wx:if="{{isShowTabbar}}" list='{{tabbarList}}' bind:callback="tabbarOnClick" />
+<Yl_Tabbar wx:if="{{tabbarList.length!=0}}" list='{{tabbarList}}' bind:callback="tabbarOnClick" />
 <!-- 处理四字 -->
 <wxs module="handle">
     module.exports.getName = function (name) {