|
|
@ -88,10 +88,8 @@ class Goods extends Controller |
|
|
|
$goods = GoodsModel::where('goods_id', $value['goods_id'])->find(); |
|
|
|
$goods = GoodsModel::where('goods_id', $value['goods_id'])->find(); |
|
|
|
switch ($goods->channel) { |
|
|
|
switch ($goods->channel) { |
|
|
|
case 'sn': |
|
|
|
case 'sn': |
|
|
|
$city = Region::where('name', $params['city'])->where('level', 2)->find(); |
|
|
|
$city = Region::withoutGlobalScope()->where('name', $params['city'])->where('level', 2)->find(); |
|
|
|
$district = Region::where('name', $params['district'])->where('level', 3)->find(); |
|
|
|
$district = Region::withoutGlobalScope()->where('name', $params['district'])->where('level', 3)->find(); |
|
|
|
// var_dump($city); |
|
|
|
|
|
|
|
// var_dump($district); |
|
|
|
|
|
|
|
$suning = new \app\common\service\Suning(); |
|
|
|
$suning = new \app\common\service\Suning(); |
|
|
|
$goods->num = $param['num'] ?? 1; |
|
|
|
$goods->num = $param['num'] ?? 1; |
|
|
|
$data = $suning->shoppingCartPrice([$goods->toArray()], $city->sn_code, $district->sn_code); |
|
|
|
$data = $suning->shoppingCartPrice([$goods->toArray()], $city->sn_code, $district->sn_code); |
|
|
@ -99,9 +97,9 @@ class Goods extends Controller |
|
|
|
$data['goods_id'] = $goods['goods_id']; |
|
|
|
$data['goods_id'] = $goods['goods_id']; |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'jd': |
|
|
|
case 'jd': |
|
|
|
$province = Region::where('name', $params['province'])->where('level', 1)->find(); |
|
|
|
$province = Region::withoutGlobalScope()->where('name', $params['province'])->where('level', 1)->find(); |
|
|
|
$city = Region::where('name', $params['city'])->where('level', 2)->find(); |
|
|
|
$city = Region::withoutGlobalScope()->where('name', $params['city'])->where('level', 2)->find(); |
|
|
|
$district = Region::where('name', $params['district'])->where('level', 3)->find(); |
|
|
|
$district = Region::withoutGlobalScope()->where('name', $params['district'])->where('level', 3)->find(); |
|
|
|
$jd = new \app\common\service\Jd(); |
|
|
|
$jd = new \app\common\service\Jd(); |
|
|
|
$arr = []; |
|
|
|
$arr = []; |
|
|
|
|
|
|
|
|
|
|
|