在下單時
// 訂單創建API
api/order/create/:key
數據表store_order_cart_info的字段cart_info沒有生成內容“postage_price”,
導致:
進入申請退款頁面,接口
// 退款訂單詳情API
api/order/refund_detail/:uni/[:cartId]
報錯:
{
status: 400,
msg: "很抱歉!系統開小差了",
data: {
code:?0,
file:?"/www/wwwroot/***/app/api/controller/v1/order/StoreOrderController.php",
line:?805,
message: "Undefined index: postage_price",
previous:?null,
trace:?[{,…},…]
}
}
進而導致無法退款!??!
請問怎么解決“數據表store_order_cart_info的字段cart_info沒有生成內容‘postage_price’”的問題???
解決方法:
// \app\services\order\StoreCartServices::handleCartList
public function handleCartList(int $uid, array $cartList, $addr = [])
{
…
foreach ($cartList as &$item) {
// 兼容客戶端無法申請退款,即數據表store_order_cart_info的字段cart_info沒有生成內容“postage_price”(約第573行)
$item['postage_price'] = $item['postage_price'] ?? 0;
…
}
…
}
【產品名稱】:CRMEB標準版
【產品版本】:v4.3.2
【部署方式】:linux寶塔面板
【部署環境】:線上環境
【php版本】:7.3
【Mysql版本】:8.0
【使用終端】:小程序/ H5