request->post('gifts_id'); $nums = $this->request->post('nums',"1"); $from_user_id = $this->auth->id; $result = GiftsModel::giveGiftGirlfriend($gifts_id, $from_user_id, $nums); return $this->success('成功', $result); } /* * 创建购买礼物订单 */ public function createOrder(){ $gifts_id = $this->request->post('gifts_id'); $nums = $this->request->post('nums',"1"); $pay_type = $this->request->post('pay_type'); $from_user_id = $this->auth->id; $result = GiftsOrderModel::createOrder($gifts_id, $from_user_id, $pay_type, $nums); if ($result['code'] <= 0){ $this->error($result['msg']); }else{ return $this->success('成功', $result['data']); } return $this->success('成功', $result); } }