浏览代码

增加判断

wangchuanjin 2 年之前
父节点
当前提交
5e3201ceae
共有 1 个文件被更改,包括 7 次插入6 次删除
  1. 7 6
      p/struct.go

+ 7 - 6
p/struct.go

@@ -159,15 +159,16 @@ func NewUserInfo(temp map[string]interface{}, tp int) *UserInfo {
 		ui.SonAccountStatus = util.IntAllDef(temp["i_member_sub_status"], -1)
 		ui.SonAccountStatus = util.IntAllDef(temp["i_member_sub_status"], -1)
 		ui.MemberMainid = util.ObjToString(temp["s_member_mainid"])
 		ui.MemberMainid = util.ObjToString(temp["s_member_mainid"])
 	}
 	}
-	var obj map[string]interface{}
 	if tp == 3 {
 	if tp == 3 {
-		obj, _ = temp["o_member_jy"].(map[string]interface{})
+		obj, _ := temp["o_member_jy"].(map[string]interface{})
+		ui.GetSubSet(false, ui.Id, obj)
 	} else if tp == 2 {
 	} else if tp == 2 {
-		obj, _ = temp["o_vipjy"].(map[string]interface{})
-	} else {
-		obj, _ = temp["o_jy"].(map[string]interface{})
+		obj, _ := temp["o_vipjy"].(map[string]interface{})
+		ui.GetSubSet(false, ui.Id, obj)
+	} else if tp == 1 {
+		obj, _ := temp["o_jy"].(map[string]interface{})
+		ui.GetSubSet(true, ui.Id, obj)
 	}
 	}
-	ui.GetSubSet(tp == 1, ui.Id, obj)
 	o_pushset, _ := temp["o_pushset"].(map[string]interface{})
 	o_pushset, _ := temp["o_pushset"].(map[string]interface{})
 	ui.GetPushSet(o_pushset)
 	ui.GetPushSet(o_pushset)
 	return ui
 	return ui