getLists([ 'user_id' => $this->auth->getUser()->id, 'start_time' => $startTime, 'end_time' => $endTime ], $rows, $page, [ 'a.id', 'a.title', 'a.goods_id', 'a.activity_id', 'a.activity_price', 'a.is_use', 'a.is_rob', 'a.create_time', 'b.nickname', 'b.avatar', 'b.mobile', 'c.title' => 'goods_title', 'c.image' ]); $this->success('获取成功', $result); } /** * 立即预约 * @return \think\response\Json */ public function order() { $data = input('post.activity/a'); if (empty($data['id']) || empty($data['goods_id']) || empty($data['status_code']) || empty($data['price'])) { return json([ 'code' => 701, 'msg' => '参数错误' ]); } if ($data['status_code'] != 'ing') { return json([ 'code' => 702, 'msg' => '还未到预约时间' ]); } $res = RobOrderModel::add($this->auth->getUser(), $data); return json($res); } }