|
@@ -86,40 +86,46 @@ func (this *ParamInfo) SetAreaByOneProvince() (b bool) {
|
|
|
}
|
|
|
return b
|
|
|
}
|
|
|
-func (this *ParamInfo) IsSub() bool {
|
|
|
- mData := config.Compatible.Select(this.UserId, `{"o_jy":1,"o_member_jy":1,"o_vipjy":1}`)
|
|
|
+func (this *ParamInfo) IsSub() (bool, string) {
|
|
|
+ mData := config.Compatible.Select(this.UserId, `{"o_jy":1,"o_member_jy":1,"o_vipjy":1,"i_vip_status":1,"i_member_status":1}`)
|
|
|
+ productType := "free"
|
|
|
if mData != nil && len(*mData) != 0 {
|
|
|
+ if memberStatus := gconv.Int64((*mData)["i_member_status"]); memberStatus > 0 {
|
|
|
+ productType = "member"
|
|
|
+ } else if vipStatus := gconv.Int64((*mData)["i_vip_status"]); vipStatus > 0 {
|
|
|
+ productType = "vip"
|
|
|
+ }
|
|
|
positionType := gconv.Int64(this.Session.Get("positionType"))
|
|
|
if positionType == 1 {
|
|
|
//企业身份
|
|
|
- return false
|
|
|
+ return false, productType
|
|
|
}
|
|
|
o_jy, _ := (*mData)["o_jy"].(map[string]interface{})
|
|
|
if o_jy["o_area"] != nil {
|
|
|
- return false
|
|
|
+ return false, productType
|
|
|
}
|
|
|
a_key, _ := o_jy["a_key"].([]interface{})
|
|
|
if len(a_key) > 0 {
|
|
|
- return false
|
|
|
+ return false, productType
|
|
|
}
|
|
|
o_vipjy, _ := (*mData)["o_vipjy"].(map[string]interface{})
|
|
|
if o_vipjy["o_area"] != nil {
|
|
|
- return false
|
|
|
+ return false, productType
|
|
|
}
|
|
|
a_key, _ = o_vipjy["a_key"].([]interface{})
|
|
|
if len(a_key) > 0 {
|
|
|
- return false
|
|
|
+ return false, productType
|
|
|
}
|
|
|
o_member_jy, _ := (*mData)["o_member_jy"].(map[string]interface{})
|
|
|
if o_member_jy["o_area"] != nil {
|
|
|
- return false
|
|
|
+ return false, productType
|
|
|
}
|
|
|
a_key, _ = o_member_jy["a_key"].([]interface{})
|
|
|
if len(a_key) > 0 {
|
|
|
- return false
|
|
|
+ return false, productType
|
|
|
}
|
|
|
}
|
|
|
- return true
|
|
|
+ return true, productType
|
|
|
}
|
|
|
|
|
|
type RuleStruct struct {
|