|
|
@@ -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
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
})
|