From 91675d8392ea6baa2631392d97cb5b721c3a0ac2 Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 13 Jan 2020 09:49:33 +0800 Subject: [PATCH] =?UTF-8?q?ebai=20store=20page=20=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platformapi/ebaiapi/store_page.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/platformapi/ebaiapi/store_page.go b/platformapi/ebaiapi/store_page.go index be9fd4d2..2b506f55 100644 --- a/platformapi/ebaiapi/store_page.go +++ b/platformapi/ebaiapi/store_page.go @@ -351,7 +351,11 @@ func (a *API) AccessStorePage2(subURL string, params map[string]interface{}, isP } retVal = jsonResult1 if jsonResult1["errno"] == nil { - baseapi.SugarLogger.Warnf("ebai AccessStorePage2, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) + if jsonResult1[platformapi.KeyData] == nil { + baseapi.SugarLogger.Warnf("ebai AccessStorePage2, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) + } else { + return platformapi.ErrLevelRecoverableErr, fmt.Errorf("%s return not json", subURL) + } } code := int(utils.MustInterface2Int64(jsonResult1["errno"])) if code == ResponseCodeSuccess { @@ -384,7 +388,9 @@ func (a *API) AccessStorePage(subURL string, params map[string]interface{}, isPo func (a *API) GetRealMobile4Order(orderId string) (mobile string, err error) { retVal, err := a.GetStoreOrderInfo(orderId) if err == nil { - return retVal["order_basic"].(map[string]interface{})["user_phone_call"].(string), nil + if orderBasic, ok := retVal["order_basic"].(map[string]interface{}); ok { + return utils.Interface2String(orderBasic["user_phone_call"]), nil + } } return "", err }