edit修改相关内容
This commit is contained in:
parent
af2cb09175
commit
82ec19f862
@ -18,7 +18,8 @@ class SigningController extends Controller
|
|||||||
'login' => [
|
'login' => [
|
||||||
'class' => LoginBehavior::className(),
|
'class' => LoginBehavior::className(),
|
||||||
'ignore' => [
|
'ignore' => [
|
||||||
'api/signing/signing-pay-notify'
|
'api/signing/signing-pay-notify',
|
||||||
|
// 'api/signing/signing-detail',
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|||||||
@ -114,15 +114,23 @@ class SigningForm extends ApiModel
|
|||||||
public function orderDetail($orderNo)
|
public function orderDetail($orderNo)
|
||||||
{
|
{
|
||||||
|
|
||||||
$order = Signing::find()->andWhere(['order_no' => $orderNo, 'user_id' => $this->user_id])->one()->toArray();
|
$order = Signing::find()->andWhere(['order_no' => $orderNo, 'user_id' => $this->user_id])->one();
|
||||||
|
if(empty($order)){
|
||||||
|
return $this->apiReturnError('订单号错误');
|
||||||
|
}
|
||||||
|
$order = $order->toArray();
|
||||||
|
// $order = Signing::find()->andWhere(['order_no' => $orderNo])->one()->toArray();
|
||||||
|
|
||||||
if (!$order) {
|
if (!$order) {
|
||||||
return $this->apiReturnError('订单号错误');
|
return $this->apiReturnError('订单号错误');
|
||||||
}
|
}
|
||||||
|
|
||||||
$order['goods'] = Goods::findOne($order['goods_id']);
|
$order['goods'] = Goods::findOne($order['goods_id'])->toArray();
|
||||||
|
// $order['goods']['price'] = $order['moy'];
|
||||||
|
|
||||||
$order['goods_hub'] = GoodsHub::findOne($order['goods']['goods_hub_id']);
|
$order['goods_hub'] = GoodsHub::findOne($order['goods']['goods_hub_id'])->toArray();
|
||||||
|
$order['goods_hub']['original_price'] = $order['moy'];
|
||||||
|
$order['goods_hub']['cost_price'] = $order['moy'];
|
||||||
|
|
||||||
return $this->apiReturnSuccess('success', $order);
|
return $this->apiReturnSuccess('success', $order);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user