From b98fbb9b83a74370851724266efb3062a44de98f Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 30 Dec 2019 17:20:52 +0800 Subject: [PATCH] up --- platformapi/mtwmapi/user_page.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platformapi/mtwmapi/user_page.go b/platformapi/mtwmapi/user_page.go index d31c41c7..0de5c6f1 100644 --- a/platformapi/mtwmapi/user_page.go +++ b/platformapi/mtwmapi/user_page.go @@ -82,6 +82,9 @@ func (a *API) AccessUserPage2(subURL string, params map[string]interface{}, isPo return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil") } retVal = jsonResult1 + if jsonResult1["code"] == nil { + return platformapi.ErrLevelGeneralFail, fmt.Errorf("返回结果格式不正常") + } code := int(utils.MustInterface2Int64(jsonResult1["code"])) if code == ResponseCodeSuccess { retVal, _ = jsonResult1["data"].(map[string]interface{})