From 111c6bbbb0102183ff0bf7d99a1afc3534c8ac63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 15 Mar 2021 17:06:16 +0800 Subject: [PATCH] aa --- platformapi/mtwmapi/user_page.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platformapi/mtwmapi/user_page.go b/platformapi/mtwmapi/user_page.go index 71e52d9a..92f9be25 100644 --- a/platformapi/mtwmapi/user_page.go +++ b/platformapi/mtwmapi/user_page.go @@ -427,7 +427,11 @@ func (a *API) GetStandardProductListWithCond(upc string) (getStandardProductList } result, err := a.AccessUserPage("reuse/sc/product/retail/r/getStandardProductListWithCond", params) if err == nil { - utils.Map2StructByJson(result["list"].([]interface{})[0], &getStandardProductListWithCondResult, false) + if len(result["list"].([]interface{})) == 0 { + return nil, err + } else { + utils.Map2StructByJson(result["list"].([]interface{})[0], &getStandardProductListWithCondResult, false) + } } return getStandardProductListWithCondResult, err }