diff --git a/app/api/controller/goods/Service.php b/app/api/controller/goods/Service.php index b37e97f6..149e274d 100644 --- a/app/api/controller/goods/Service.php +++ b/app/api/controller/goods/Service.php @@ -34,6 +34,7 @@ class Service extends Controller public function list(int $goodsId): Json { $model = new ServiceModel; + if(empty($goodsId)) return $this->renderError('goodsId非空'); $list = $model->getListByGoods($goodsId); return $this->renderSuccess(compact('list')); } diff --git a/app/api/model/Order.php b/app/api/model/Order.php index 1070fb85..2a52f80e 100644 --- a/app/api/model/Order.php +++ b/app/api/model/Order.php @@ -609,4 +609,10 @@ class Order extends OrderModel 'take_goods_number' => OrderModel::where('user_id', $userId)->where('delivery_type',20)->count(), // 发货记录&提货记录 ]; } + + + public function getZitiAddressAttr($value) { + if(!empty($value)) return json_decode($value, true); + return $value; + } } diff --git a/app/api/service/order/Checkout.php b/app/api/service/order/Checkout.php index 5746aff4..20fd6235 100644 --- a/app/api/service/order/Checkout.php +++ b/app/api/service/order/Checkout.php @@ -853,9 +853,13 @@ class Checkout extends BaseService 'expect_receive_time' => $this->param['expect_receive_time'],//期待收货时间 'is_street_take' => $this->param['is_street_take'],//是否街边1-在 0-不在 'to_store_time' => $this->param['to_store_time'],//预计到店时间 + 'linkman' => $this->param['linkman'], + 'phone' => $this->param['phone'], + 'ziti_address' => !empty($this->param['ziti_address']) ? json_encode($this->param['ziti_address'], JSON_UNESCAPED_UNICODE) : '', //添加成本价 'cost_price' => $this->getCostPrice($order['goodsList']), ]; +// dd($data); if ($order['delivery'] == DeliveryTypeEnum::EXPRESS) { $data['express_price'] = $order['expressPrice']; } elseif ($order['delivery'] == DeliveryTypeEnum::EXTRACT) {