Commit 9a708159 by 冷斌

update

parent 8ccc412b
......@@ -1453,7 +1453,7 @@ class Model_Home extends PhalApi_Model_NotORM {
$where.= ' and uid = ' . $type;
}
$select = '*';
if (!empty($lng) && !empty($lat)) {
if (!empty($lng) && $lng > 0 && !empty($lat) && $lat > 0) {
$select .= ", ({$this->distanceSql($lat, $lng)}) as distance";
$orderBy = 'distance desc';
} else {
......
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