修改展示门店

This commit is contained in:
邹宗楠
2022-06-15 11:39:39 +08:00
parent af265efb0a
commit 4d28a4b8f0

View File

@@ -579,6 +579,7 @@ func (c *StoreController) GetStoreListByLocation() {
c.callGetStoreListByLocation(func(params *tStoreGetStoreListByLocationParams) (retVal interface{}, errCode string, err error) {
locationList, err := common.GetStoreListByLocation(params.Ctx, params.Lng, params.Lat, 20000, params.NeedWalkDistance, false, params.BrandID)
if params.Token != "" {
// 获取用户权限如果是普通用户不展示b2b相关目录如果是门店老板或者管理则展示全部
userAuth, err := auth2.GetTokenInfo(params.Token)
if err != nil {
@@ -621,13 +622,15 @@ func (c *StoreController) GetStoreListByLocation() {
}
if total != model.YES {
return result, "", errors.New("")//errors.New("未注册用户")
return result, "", errors.New("")
}
if user[0].Type != model.YES {
return locationList, "", nil
}else {
} else {
return result, "", err
}
}
return locationList, "", err
})
}