|
@@ -155,9 +155,9 @@ func (s *Short) Article(stype, id string) error {
|
|
|
s.T["isMember"] = isMember
|
|
|
s.T["isEntniche"] = isEntniche
|
|
|
s.T["isEntnicheNew"] = isEntnicheNew
|
|
|
- node := CNode(userId)
|
|
|
+ node, hasRetainedCapital := CNode(userId)
|
|
|
var nodeStr string
|
|
|
- if node {
|
|
|
+ if node || hasRetainedCapital {
|
|
|
nodeStr = "true"
|
|
|
} else {
|
|
|
nodeStr = "false"
|
|
@@ -377,8 +377,9 @@ func (s *Short) Article(stype, id string) error {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
-func CNode(userId string) bool {
|
|
|
+func CNode(userId string) (bool, bool) {
|
|
|
rM := map[string]interface{}{}
|
|
|
+ hasRetainedCapital := false
|
|
|
rdata, ok := mongodb.Find("saleLeads", map[string]interface{}{
|
|
|
"userid": userId,
|
|
|
}, `{"createtime":-1}`, nil, false, 0, 10)
|
|
@@ -398,6 +399,7 @@ func CNode(userId string) bool {
|
|
|
delete(rM, "userid")
|
|
|
delete(rM, "createtime")
|
|
|
delete(rM, "client")
|
|
|
+ hasRetainedCapital = true
|
|
|
}
|
|
|
if userinfo, ok := mongodb.FindById("user", userId, `{"s_phone":1,"s_m_phone":1,"s_myemail":1,"s_company":1,"o_jy":1,"o_vipjy":1}`); userinfo != nil && ok && len(*userinfo) > 0 {
|
|
|
s_phone := util.ObjToString((*userinfo)["s_phone"])
|
|
@@ -412,12 +414,12 @@ func CNode(userId string) bool {
|
|
|
if rM["name"] != nil && rM["name"] != "" && rM["phone"] != nil && rM["phone"] != "" && rM["company"] != nil && rM["company"] != "" && rM["position"] != nil && rM["position"] != "" {
|
|
|
|
|
|
if rM["position"] != "总裁" && rM["position"] != "总经理" && (rM["branch"] == nil || rM["branch"] == "") {
|
|
|
- return false
|
|
|
+ return false, hasRetainedCapital
|
|
|
}
|
|
|
- return true
|
|
|
+ return true, hasRetainedCapital
|
|
|
|
|
|
}
|
|
|
- return false
|
|
|
+ return false, hasRetainedCapital
|
|
|
}
|
|
|
|
|
|
//查看公告详情次数限制
|