|
@@ -10,6 +10,21 @@ class Act extends Core
|
|
|
public function buy()
|
|
|
{
|
|
|
$shop = $this->shop;
|
|
|
+
|
|
|
+ $goods_id = Dever::input('goods_id');
|
|
|
+ if (!$goods_id) {
|
|
|
+ Dever::alert('请传入商品');
|
|
|
+ }
|
|
|
+ $goods_id = explode(',', $goods_id);
|
|
|
+
|
|
|
+ $sku_id = Dever::input('price_id');
|
|
|
+ if ($sku_id) {
|
|
|
+ $sku_id = explode(',', $sku_id);
|
|
|
+ }
|
|
|
+
|
|
|
+ $num = Dever::input('num');
|
|
|
+ $num = explode(',', $num);
|
|
|
+
|
|
|
# 获取门店分配的仓库和工厂
|
|
|
|
|
|
$sql = 'select *,round((st_distance(point(lng, lat), point('.$shop['lng'].', '.$shop['lat'].'))*111195)/1000, 2) as distance from {table} where '.$where.' order by distance asc';
|