attributes = post_params(); $form->store_id = get_store_id(); $form->user_id = get_user_id(); return $form->search(); } /** * 新-订单提交 */ public function actionSubmit() { $form = new OrderSubmitForm(); $form->attributes = post_params(); $form->store_id = get_store_id(); $form->user_id = get_user_id(); $form->user = get_user(); return $form->save(); } /** * 订单支付数据 */ public function actionPayData() { $form = new OrderPayDataForm(); $form->attributes = get_params(); $form->store_id = get_store_id(); $form->user = get_user(); return $form->search(); } /** * 订单状态 */ public function actionPayStatus() { $order_id = get_params('order_id'); if (!$order_id) { return [ 'code' => 1, 'msg' => '参数异常' ]; } return [ 'code' => 0, 'msg' => 'success', 'data' => [ 'status' => Order::findOne(['id' => $order_id])->trade_status, 'coupon_list' => Coupon::getSaasList(3) ] ]; } }