$msg, 'url' => $url, 'wait' => $wait, ]; $html = view('/public/jump', $result); throw new \think\exception\HttpResponseException($html); } function ajax_success($data) { $res = ['code' => 0, 'msg' => '成功', 'data' => $data]; $response = \think\Response::create($res, 'json'); throw new \think\exception\HttpResponseException($response); }