diff --git a/.gitignore b/.gitignore index 94a38a0..24f3809 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ *.log *.env /runtime/* +/config/database.php \ No newline at end of file diff --git a/app/home/controller/Module.php b/app/home/controller/Module.php index f047e64..9b89bc8 100644 --- a/app/home/controller/Module.php +++ b/app/home/controller/Module.php @@ -83,7 +83,7 @@ class Module extends BaseController } $param = get_params(); $name = $param['name']; - $data = curl_post('https://www.gougucms.com/home/get_module/module',['name'=>$name]); + $data = curl_post('https://oa.lwzone.top/home/get_module/module',['name'=>$name]); $json_data = json_decode($data, true); if($json_data['code'] == 1){ return to_assign(1,$json_data['msg']); diff --git a/config/database.php b/config/database.php index 8f05b71..72d6031 100644 --- a/config/database.php +++ b/config/database.php @@ -16,7 +16,7 @@ return [ // 数据库类型 'type' => 'mysql', // 服务器地址 - 'hostname' => '1Panel-mysql-jQfe', + 'hostname' => 'lwzone.top', // 数据库名 'database' => 'oa', // 用户名 diff --git a/vendor/topthink/think-captcha/src/Captcha.php b/vendor/topthink/think-captcha/src/Captcha.php index 737b943..903441c 100644 --- a/vendor/topthink/think-captcha/src/Captcha.php +++ b/vendor/topthink/think-captcha/src/Captcha.php @@ -211,7 +211,7 @@ class Captcha $this->fontttf = $ttfs[array_rand($ttfs)]; } - $fontttf = $ttfPath . $this->fontttf; + $fontttf = (strpos($this->fontttf, ':/') !== false || strpos($this->fontttf, ':\\') !== false || $this->fontttf[0] === '/') ? $this->fontttf : $ttfPath . $this->fontttf; // 添加干扰项 foreach ($this->interfere as $type => $method) { @@ -229,7 +229,6 @@ class Captcha $x = $this->fontSize * ($index + 1) * ($this->math ? 1 : 1.5); $y = $this->fontSize + mt_rand(10, 20); $angle = $this->math ? 0 : mt_rand(-40, 40); - imagettftext($this->im, (int) $this->fontSize, $angle, (int) $x, (int) $y, $this->color, $fontttf, $char); }