|
@@ -26,13 +26,13 @@ Page({
|
|
menuList: [
|
|
menuList: [
|
|
{ name: '审批', imgUrl: '../../../image/sp.png', url: '../my_approve/my_approve', code: 'creator admin' },
|
|
{ name: '审批', imgUrl: '../../../image/sp.png', url: '../my_approve/my_approve', code: 'creator admin' },
|
|
{ name: '任务', imgUrl: '../../../image/a7.png', url: '../../statistics/my_task/my_task', code: 'admin employee' },
|
|
{ name: '任务', imgUrl: '../../../image/a7.png', url: '../../statistics/my_task/my_task', code: 'admin employee' },
|
|
- { name: '复核', imgUrl: '../../../image/fuhe.png', url: '../review/review', code: 'creator admin' },
|
|
|
|
|
|
+ { name: '复核', imgUrl: '../../../image/fuhe.png', url: '../review/review', code: 'creator admin employee',isNoShow:true },
|
|
{ name: '奖扣B分', imgUrl: '../../../image/point_entry.png', url: '../jk_B/jk_B?type=B', code: 'creator admin' },
|
|
{ name: '奖扣B分', imgUrl: '../../../image/point_entry.png', url: '../jk_B/jk_B?type=B', code: 'creator admin' },
|
|
{ name: '指派任务', imgUrl: '../../../image/my_publish.png', url: '../../statistics/assaign/assaign', code: 'creator admin' },
|
|
{ name: '指派任务', imgUrl: '../../../image/my_publish.png', url: '../../statistics/assaign/assaign', code: 'creator admin' },
|
|
{ name: '申请积分', imgUrl: '../../../image/a_apply.png', url: '../apply/apply', code: 'admin employee' },
|
|
{ name: '申请积分', imgUrl: '../../../image/a_apply.png', url: '../apply/apply', code: 'admin employee' },
|
|
{ name: '奖扣A分', imgUrl: '../../../image/a_entry.png', url: '../jk_B/jk_B?type=A', code: 'creator admin' },
|
|
{ name: '奖扣A分', imgUrl: '../../../image/a_entry.png', url: '../jk_B/jk_B?type=A', code: 'creator admin' },
|
|
- { name: '领任务', imgUrl: '../../../image/task_hall.png', url: '../../statistics/getTask/getTask', code: 'admin employee' },
|
|
|
|
- { name: '发布悬赏', imgUrl: '../../../image/caback6.png', url: '../../statistics/offerAreward/offerAreward', code: 'creator admin' },
|
|
|
|
|
|
+ { name: '抢任务', imgUrl: '../../../image/task_hall.png', url: '../../statistics/getTask/getTask', code: 'admin employee' },
|
|
|
|
+ { name: '发布抢单', imgUrl: '../../../image/caback6.png', url: '../../statistics/offerAreward/offerAreward', code: 'creator admin' },
|
|
// { name: '发放奖票', imgUrl: '../../../image/add_ticket.png', url: '../../statistics/grant/grant', code: 'creator admin' },
|
|
// { name: '发放奖票', imgUrl: '../../../image/add_ticket.png', url: '../../statistics/grant/grant', code: 'creator admin' },
|
|
{ name: '全部', imgUrl: '../../../image/all2.png', url: 'all', code: 'creator admin employee' },
|
|
{ name: '全部', imgUrl: '../../../image/all2.png', url: 'all', code: 'creator admin employee' },
|
|
],
|
|
],
|
|
@@ -71,13 +71,8 @@ Page({
|
|
if(options.subscribe=='cancel'){
|
|
if(options.subscribe=='cancel'){
|
|
this.vlinkConfig()
|
|
this.vlinkConfig()
|
|
}else{
|
|
}else{
|
|
- // app.globalData.showToast("已关注");
|
|
|
|
this.vlinkConfig()
|
|
this.vlinkConfig()
|
|
}
|
|
}
|
|
- // dd.alert({
|
|
|
|
- // title:'disposeSubscribeData',
|
|
|
|
- // content:JSON.stringify(options)
|
|
|
|
- // })
|
|
|
|
})
|
|
})
|
|
if (app.globalData.userData) {
|
|
if (app.globalData.userData) {
|
|
dd.setNavigationBar({ title: app.globalData.userData.name });
|
|
dd.setNavigationBar({ title: app.globalData.userData.name });
|
|
@@ -347,7 +342,11 @@ Page({
|
|
},
|
|
},
|
|
// 获取公告
|
|
// 获取公告
|
|
getGg() {
|
|
getGg() {
|
|
- if (that.data.title) {
|
|
|
|
|
|
+ let accedence_time=moment(app.globalData.userData.accedence_time).format('YYYY-MM-DD');
|
|
|
|
+ // let accedence_time='2023-10-12'
|
|
|
|
+ let date = moment().format('YYYY-MM-DD');
|
|
|
|
+ console.log(accedence_time,date)
|
|
|
|
+ if (that.data.title||accedence_time==date) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
app.$get2("api/announcement/list", { page: 1, page_size: 1 }).then((res) => {
|
|
app.$get2("api/announcement/list", { page: 1, page_size: 1 }).then((res) => {
|
|
@@ -371,18 +370,9 @@ Page({
|
|
setMenuList(str) {
|
|
setMenuList(str) {
|
|
var arr = [];
|
|
var arr = [];
|
|
that.data.menuList.forEach(item => {
|
|
that.data.menuList.forEach(item => {
|
|
- if(item.name=='复核'){
|
|
|
|
- app.globalData.userData.employee_detail.role_list.some(e=>{
|
|
|
|
- if(e.name=='admin'||e.name=='creator'|| e.name == 'point_manager'){
|
|
|
|
- arr.push(item)
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
if (item.code.indexOf(str) >= 0) {
|
|
if (item.code.indexOf(str) >= 0) {
|
|
arr.push(item)
|
|
arr.push(item)
|
|
}
|
|
}
|
|
- }
|
|
|
|
})
|
|
})
|
|
that.setData({
|
|
that.setData({
|
|
menuList: arr
|
|
menuList: arr
|
|
@@ -673,21 +663,52 @@ Page({
|
|
let data = values[6].data.data;
|
|
let data = values[6].data.data;
|
|
app.globalData.config=data;
|
|
app.globalData.config=data;
|
|
let menuList=JSON.parse(JSON.stringify( that.data.menuList))
|
|
let menuList=JSON.parse(JSON.stringify( that.data.menuList))
|
|
|
|
+ //福利
|
|
if(data.shop_status==1){
|
|
if(data.shop_status==1){
|
|
if(menuList[menuList.length-2].name!='福利兑换'){
|
|
if(menuList[menuList.length-2].name!='福利兑换'){
|
|
menuList.splice(menuList.length-1,0, { name: '福利兑换', imgUrl: '../../../image/fl.png', url: '../../exchange/exchange/exchange', code: 'creator admin employee' })
|
|
menuList.splice(menuList.length-1,0, { name: '福利兑换', imgUrl: '../../../image/fl.png', url: '../../exchange/exchange/exchange', code: 'creator admin employee' })
|
|
- that.setData({
|
|
|
|
- menuList:menuList
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
if(menuList[menuList.length-2].name=='福利兑换'){
|
|
if(menuList[menuList.length-2].name=='福利兑换'){
|
|
menuList.splice(menuList.length-2,1)
|
|
menuList.splice(menuList.length-2,1)
|
|
- that.setData({
|
|
|
|
- menuList:menuList
|
|
|
|
- })
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ //复核
|
|
|
|
+ if(app.globalData.isCreator){
|
|
|
|
+ menuList.forEach(item=>{
|
|
|
|
+ if(item.name=='复核'){
|
|
|
|
+ item.isNoShow=false;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ that.setData({
|
|
|
|
+ menuList:menuList
|
|
|
|
+ })
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ if(data.event_review_manager==1){ //不是管理者
|
|
|
|
+ if(app.globalData.isSuperAdministrator){
|
|
|
|
+ menuList.forEach(item=>{
|
|
|
|
+ if(item.name=='复核'){
|
|
|
|
+ item.isNoShow=false;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ if(data.event_special){
|
|
|
|
+ let ids=data.event_special.map(e=> e.id);
|
|
|
|
+ if(ids.length>0&&ids.indexOf(app.globalData.userData.id)!=-1){
|
|
|
|
+ menuList.forEach(item=>{
|
|
|
|
+ if(item.name=='复核'){
|
|
|
|
+ item.isNoShow=false;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ that.setData({
|
|
|
|
+ menuList:menuList
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|