|
@@ -38,7 +38,7 @@ func (this *UserInfo) SaveNameByUserId() bool {
|
|
var namesarr = []string{}
|
|
var namesarr = []string{}
|
|
if this.Names != "" {
|
|
if this.Names != "" {
|
|
for _, v := range strings.Split(this.Names, ",") {
|
|
for _, v := range strings.Split(this.Names, ",") {
|
|
- if IsPower(v, this.UserId) {
|
|
|
|
|
|
+ if !ChargeMap[v] || IsPower(v, this.UserId) {
|
|
namesarr = append(namesarr, v)
|
|
namesarr = append(namesarr, v)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -101,10 +101,13 @@ func (this *UserInfo) GetNameByUserId() (fns []*FuncNames) {
|
|
return fns
|
|
return fns
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+var ChargeMap = map[string]bool{}
|
|
|
|
+
|
|
//获取所有用户可用功能
|
|
//获取所有用户可用功能
|
|
func (this *UserInfo) AllNames() (fns []*FuncNames) {
|
|
func (this *UserInfo) AllNames() (fns []*FuncNames) {
|
|
for _, v := range BaseFuncInfo.CommonFunctions {
|
|
for _, v := range BaseFuncInfo.CommonFunctions {
|
|
- if IsPower(v.Name, this.UserId) {
|
|
|
|
|
|
+ ChargeMap[v.Name] = v.Charge
|
|
|
|
+ if !v.Charge || IsPower(v.Name, this.UserId) {
|
|
fns = append(fns, &FuncNames{
|
|
fns = append(fns, &FuncNames{
|
|
Name: v.Name,
|
|
Name: v.Name,
|
|
Url: thisByPlat(this.Platform, "url", &v),
|
|
Url: thisByPlat(this.Platform, "url", &v),
|
|
@@ -149,7 +152,7 @@ func IsPower(name, userId string) (b bool) {
|
|
if BigPower.Status > 0 {
|
|
if BigPower.Status > 0 {
|
|
switch name {
|
|
switch name {
|
|
case "企业情报监控":
|
|
case "企业情报监控":
|
|
- b = true || BigPower.PowerMap[4] || BigPower.PowerMap[12] || BigPower.PowerMap[13]
|
|
|
|
|
|
+ b = BigPower.PowerMap[4] || BigPower.PowerMap[12] || BigPower.PowerMap[13]
|
|
case "潜在客户挖掘", "客户关注":
|
|
case "潜在客户挖掘", "客户关注":
|
|
b = BigPower.PowerMap[7]
|
|
b = BigPower.PowerMap[7]
|
|
case "潜在竞争对手/合作伙伴挖掘":
|
|
case "潜在竞争对手/合作伙伴挖掘":
|