用户自提信息回显

wysf
ztt 9 months ago
parent 6dc4c1e70e
commit a39cf3ab75
  1. 1
      app/api/controller/goods/Service.php
  2. 6
      app/api/model/Order.php
  3. 4
      app/api/service/order/Checkout.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'));
}

@ -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;
}
}

@ -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) {

Loading…
Cancel
Save