修改展示门店
This commit is contained in:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user