修改部分bug

This commit is contained in:
2025-08-07 19:56:53 +08:00
parent d1b4fa8ca3
commit c7dd90f669
10 changed files with 95 additions and 37 deletions

View File

@ -24,6 +24,8 @@ Page({
monthRefundAmount: 0, // 本月退款总金额
monthPromotionCount: 0, // 本月推广数量
userRole: '', // 用户角色
isShowArr: [],
widthRate: '30%'
},
onLoad(options) {
@ -45,6 +47,13 @@ Page({
break;
}
this.setData({ showRole });
if (options.role === 'manger') this.setData({isShowArr: [true, true, true]})
else if (options.role === 'supervisor') this.setData({isShowArr: [false, true, true]})
else if (options.role === 'staff') this.setData({isShowArr: [false, false, true]})
const trueCount = this.data.isShowArr.filter(v => v === true).length;
if (trueCount === 3) this.setData({widthRate: '30%'})
else if (trueCount === 2) this.setData({widthRate: '47.5%'})
else if (trueCount === 1) this.setData({widthRate: '100%'})
},
fetchPerformance() {