正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
@@ -240,7 +240,7 @@ class Goods extends Frontend | @@ -240,7 +240,7 @@ class Goods extends Frontend | ||
240 | ->alias('g') | 240 | ->alias('g') |
241 | ->field([ | 241 | ->field([ |
242 | 'g.*,t.name as goodstype_name,s.lng,s.lat,s.name as store_name,s.phone as store_phone,s.address as store_address,s.property,s.type,s.content as store_content,s.thumbnail as store_thumbnail,s.money as store_money', | 242 | 'g.*,t.name as goodstype_name,s.lng,s.lat,s.name as store_name,s.phone as store_phone,s.address as store_address,s.property,s.type,s.content as store_content,s.thumbnail as store_thumbnail,s.money as store_money', |
243 | - "round((6378.138 * 2 * asin(sqrt(pow(sin((s.latitude * pi() / 180 - ".$param['lat']." * pi() / 180) / 2),2) + cos(s.latitude * pi() / 180) * cos(".$param['lat']." * pi() / 180) * pow(sin((s.longitude * pi() / 180 - ".$param['lng']." * pi() / 180) / 2),2)))),2) as distance", | 243 | + "round((6378.138 * 2 * asin(sqrt(pow(sin((s.lat * pi() / 180 - ".$param['lat']." * pi() / 180) / 2),2) + cos(s.lat * pi() / 180) * cos(".$param['lat']." * pi() / 180) * pow(sin((s.lng * pi() / 180 - ".$param['lng']." * pi() / 180) / 2),2)))),2) as distance", |
244 | ]) | 244 | ]) |
245 | ->join('sto_goodstype t','t.id = g.goodstype_id') | 245 | ->join('sto_goodstype t','t.id = g.goodstype_id') |
246 | ->join('sto_store s','s.id = g.store_id') | 246 | ->join('sto_store s','s.id = g.store_id') |
-
请 注册 或 登录 后发表评论