Răsfoiți Sursa

增加判断

wangchuanjin 2 ani în urmă
părinte
comite
5e3201ceae
1 a modificat fișierele cu 7 adăugiri și 6 ștergeri
  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.MemberMainid = util.ObjToString(temp["s_member_mainid"])
 	}
-	var obj map[string]interface{}
 	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 {
-		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{})
 	ui.GetPushSet(o_pushset)
 	return ui