const res = await this.callApi('post','place_order',this.formItem)if(res.status == 200){ this.order.push(res.data) this.s("Order Successful !") this.formItem = {}}当我收到来自控制器的响应时,显示我的“推送”是未定义的。这是我的控制器public function place_order(Request $request){ $data = $request->all(); $order= Order::create($data); return response()->json([ 'order' => $order, 'success' => true ],200); }
添加回答
举报
0/150
提交
取消