|
@@ -87,6 +87,14 @@ func (m *WorkDesktopMenu) AutoUserPowerInfo() map[string]int {
|
|
|
registerTime = userPowers.Free.Registedate
|
|
|
//大会员
|
|
|
member := userPowers.Member
|
|
|
+ //超级订阅
|
|
|
+ vip := userPowers.Vip
|
|
|
+ //企业信息
|
|
|
+ entInfo := userPowers.Ent
|
|
|
+ //商机管理
|
|
|
+ entNiche := userPowers.Entniche
|
|
|
+ //免费用户
|
|
|
+ free := userPowers.Free
|
|
|
if member.Status > 0 || ConfigJson.BigMemberOff {
|
|
|
if member.Status > 0 {
|
|
|
UserPowerMap["0"] = int(member.Status)
|
|
@@ -99,8 +107,6 @@ func (m *WorkDesktopMenu) AutoUserPowerInfo() map[string]int {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- //超级订阅
|
|
|
- vip := userPowers.Vip
|
|
|
if vip.Status > 0 {
|
|
|
if registerTime < vip.EndTime {
|
|
|
registerTime = vip.EndTime
|
|
@@ -111,6 +117,11 @@ func (m *WorkDesktopMenu) AutoUserPowerInfo() map[string]int {
|
|
|
if vip.Upgrade > 0 && member.Status < 1 {
|
|
|
UserPowerMap["202"] = int(vip.Status)
|
|
|
}
|
|
|
+ if entInfo.EntRoleId == 1 {
|
|
|
+ UserPowerMap["203"] = 1 //企业管理员
|
|
|
+ } else if entInfo.EntRoleId == 2 {
|
|
|
+ UserPowerMap["204"] = 1 //部门管理员
|
|
|
+ }
|
|
|
}
|
|
|
//企业信息
|
|
|
if m.EntId > 0 {
|
|
@@ -120,9 +131,6 @@ func (m *WorkDesktopMenu) AutoUserPowerInfo() map[string]int {
|
|
|
UserPowerMap["901"] = 1
|
|
|
}
|
|
|
}
|
|
|
- entInfo := userPowers.Ent
|
|
|
- //商机管理
|
|
|
- entNiche := userPowers.Entniche
|
|
|
if entNiche.Status > 0 && entNiche.IsEntPower > 0 {
|
|
|
//entInfo.EntRoleId 1:企业管理员 2:部门管理员
|
|
|
//管理员 entInfo.EntRoleId>0 并不一定 entNiche.IsEntPower==1,entNiche.IsEntPower==0 也有权限(已废除)
|
|
@@ -169,8 +177,6 @@ func (m *WorkDesktopMenu) AutoUserPowerInfo() map[string]int {
|
|
|
//}
|
|
|
}
|
|
|
}
|
|
|
- //免费用户
|
|
|
- free := userPowers.Free
|
|
|
if free.IsFree {
|
|
|
UserPowerMap["300"] = 1
|
|
|
if free.IsUpgrade {
|
|
@@ -184,6 +190,14 @@ func (m *WorkDesktopMenu) AutoUserPowerInfo() map[string]int {
|
|
|
UserPowerMap["400"] = 1
|
|
|
}
|
|
|
//人员行为统计菜单-1、购买大会员且创建了企业的管理员;2、新版商机管理管理员;3、商机管理服务管理员
|
|
|
+ if member.Status > 0 {
|
|
|
+ UserPowerMap["50"] = 1 //
|
|
|
+ if entInfo.EntRoleId == 1 {
|
|
|
+ UserPowerMap["58"] = 1 //企业管理员
|
|
|
+ } else if entInfo.EntRoleId == 2 {
|
|
|
+ UserPowerMap["59"] = 1 // 部门管理员
|
|
|
+ }
|
|
|
+ }
|
|
|
if entInfo.EntRoleId > 0 && member.Status > 0 {
|
|
|
UserPowerMap["50"] = 1
|
|
|
}
|