This commit is contained in:
Your Name
2019-11-19 10:38:54 +08:00
committed by JerryYan
parent a9ad9b69ae
commit 13ee1a3610
4 changed files with 4 additions and 4 deletions

View File

@ -161,9 +161,9 @@ class Shopping extends Base{
// COS('.$lat.'*PI()/180)*COS(lat*PI()/180)*POW(SIN(('.$lng.'*PI()/180-lng*PI()/180)/2),2)))*1000) AS distance';
$order = 'distance ASC';
//纬度
$where['s.lat']=array('between',array($start['left-bottom']['lat'],$start['left-top']['lat']));
//$where['s.lat']=array('between',array($start['left-bottom']['lat'],$start['left-top']['lat']));
//经度
$where['s.lng']=array('between',array($start['left-bottom']['lng'],$start['right-bottom']['lng']));
//$where['s.lng']=array('between',array($start['left-bottom']['lng'],$start['right-bottom']['lng']));
$rs = Db::name('shops s')
->where($where)
->field($field)