From 397d26eab02f5baf52e8fc67f7c16ee9a87bee8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 8 Jun 2022 10:18:57 +0800 Subject: [PATCH] 1 --- controllers/cms_store.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/controllers/cms_store.go b/controllers/cms_store.go index b9e84f688..5aa8938e8 100644 --- a/controllers/cms_store.go +++ b/controllers/cms_store.go @@ -588,12 +588,6 @@ func (c *StoreController) GetStoreListByLocation() { if err != nil { return nil, "", err } - if total != model.YES { - return nil, "", errors.New("未注册用户") - } - if user[0].Type != model.YES { - return locationList, "", nil - } // 获取位置附近门店列表 storeIDs := make([]int, 0, len(locationList)) @@ -626,7 +620,14 @@ func (c *StoreController) GetStoreListByLocation() { } } - return result, "", err + if total != model.YES { + return result, "", errors.New("")//errors.New("未注册用户") + } + if user[0].Type != model.YES { + return locationList, "", nil + }else { + return result, "", err + } }) }