From f57c656369846a2744b2225ba9e3271adc074d63 Mon Sep 17 00:00:00 2001 From: liufumingren Date: Mon, 21 Sep 2026 17:23:25 +0800 Subject: [PATCH] 1 --- application/index/controller/Index.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/application/index/controller/Index.php b/application/index/controller/Index.php index 7fc7cbb..cdfbeee 100644 --- a/application/index/controller/Index.php +++ b/application/index/controller/Index.php @@ -528,8 +528,14 @@ class Index extends Frontend return view('error', ['msg' => '系统处理异常,请稍后重试']); } } - public function auth($state) + public function auth($state = null) { + // 兼容未传 state 的情况(如直接访问 /index/index/auth),避免"方法参数错误:state" + if (empty($state)) { + $state = $this->request->get('state', ''); + } + \think\Log::info('进入授权页 auth,state: ' . $state); + // 获取参数 $type = $this->request->get('type', 3); // 默认授权所有权限 $view = $this->request->get('view', 'pc'); // 默认PC端 @@ -664,7 +670,7 @@ class Index extends Frontend * @param string $host 目标域名 * @return bool */ - private function forwardToTest($path, $rawBody = '', $host = 'http://test_wms.gztbyc.com') + private function forwardToTest($path, $rawBody = '', $host = 'http://test_wms.o.gztbyc.com') { try { // 拼装目标地址:域名 + 路径 + 原始GET参数