config['allowed_tourist_upload']) { $this->token && $this->auth($this->token); } else { $this->auth($this->token); } } /** * 上传 */ public function index() { Db::startTrans(); try { $data = (new \app\index\controller\Upload)->execute(); Db::commit(); } catch (Exception $e) { Db::rollback(); return $this->response($e->getMessage(), 500); } return $this->response('success', 200, $data); } }