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 + } }) }