|
@@ -89,12 +89,9 @@ func (this *ParamInfo) SetAreaByOneProvince() (b bool) {
|
|
|
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"
|
|
|
+ memberStatus := gconv.Int64((*mData)["i_member_status"])
|
|
|
+ vipStatus := gconv.Int64((*mData)["i_vip_status"])
|
|
|
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 {
|
|
|
//企业身份
|
|
@@ -111,28 +108,34 @@ func (this *ParamInfo) IsSub() (bool, string) {
|
|
|
if len(a_key) > 0 {
|
|
|
return false, productType
|
|
|
}
|
|
|
- o_vipjy, _ := (*mData)["o_vipjy"].(map[string]interface{})
|
|
|
- if o_vipjy["o_area"] != nil {
|
|
|
- oarea, _ := o_vipjy["o_area"].(map[string]interface{})
|
|
|
- if len(oarea) > 0 {
|
|
|
+ if vipStatus > 0 {
|
|
|
+ productType = "vip"
|
|
|
+ o_vipjy, _ := (*mData)["o_vipjy"].(map[string]interface{})
|
|
|
+ if o_vipjy["o_area"] != nil {
|
|
|
+ oarea, _ := o_vipjy["o_area"].(map[string]interface{})
|
|
|
+ if len(oarea) > 0 {
|
|
|
+ return false, productType
|
|
|
+ }
|
|
|
+ }
|
|
|
+ a_key, _ = o_vipjy["a_key"].([]interface{})
|
|
|
+ if len(a_key) > 0 {
|
|
|
return false, productType
|
|
|
}
|
|
|
}
|
|
|
- a_key, _ = o_vipjy["a_key"].([]interface{})
|
|
|
- if len(a_key) > 0 {
|
|
|
- return false, productType
|
|
|
- }
|
|
|
- o_member_jy, _ := (*mData)["o_member_jy"].(map[string]interface{})
|
|
|
- if o_member_jy["o_area"] != nil {
|
|
|
- oarea, _ := o_member_jy["o_area"].(map[string]interface{})
|
|
|
- if len(oarea) > 0 {
|
|
|
+ if memberStatus > 0 {
|
|
|
+ productType = "member"
|
|
|
+ o_member_jy, _ := (*mData)["o_member_jy"].(map[string]interface{})
|
|
|
+ if o_member_jy["o_area"] != nil {
|
|
|
+ oarea, _ := o_member_jy["o_area"].(map[string]interface{})
|
|
|
+ if len(oarea) > 0 {
|
|
|
+ return false, productType
|
|
|
+ }
|
|
|
+ }
|
|
|
+ a_key, _ = o_member_jy["a_key"].([]interface{})
|
|
|
+ if len(a_key) > 0 {
|
|
|
return false, productType
|
|
|
}
|
|
|
}
|
|
|
- a_key, _ = o_member_jy["a_key"].([]interface{})
|
|
|
- if len(a_key) > 0 {
|
|
|
- return false, productType
|
|
|
- }
|
|
|
}
|
|
|
return true, productType
|
|
|
}
|