Commit f463291e authored by 卢洪光's avatar 卢洪光

Merge branch 'pre_release' into 'master'

自提点经纬度异常参数兼容

See merge request bp/goods!72
parents 5b344da1 40134752
......@@ -131,6 +131,19 @@ class TakePlaceService
$page = $params['page'] ?? 1;
$limit = $params['limit'] ?? 20;
//兼容客户端传递NaN字符串的问题
if(!empty($longitude) && !is_numeric($longitude)) {
$longitude = '';
}
if(!empty($latitude) && !is_numeric($latitude)) {
$latitude = '';
}
//经纬度小程序调用时前后端都是反的,客户端按正确顺序传,程序把参数反过来,小程序目前来不及改,暂时先按反着的来
//临时交换客户端传过来的经纬度的值 @todo 后期前后端一起修正传参后去掉此逻辑(注意小程序版本控制)
if(isset($params['app_id']) && $params['app_id'] == 'merchant-c') {
list($longitude,$latitude) = [$latitude,$longitude];
}
$offset = ($page-1)*$limit;
$res = ['list'=>[],'total'=>0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment