From 2f985d9f6fc380fdc04f6fc78049596107c71e48 Mon Sep 17 00:00:00 2001 From: toom1996 Date: Wed, 18 Jun 2025 15:12:42 +0800 Subject: [PATCH] update --- app/Constants/Config.php | 12 ++++++++++++ app/Controller/UploadController.php | 2 +- app/Controller/admin/api/KeywordsController.php | 3 ++- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 app/Constants/Config.php diff --git a/app/Constants/Config.php b/app/Constants/Config.php new file mode 100644 index 0000000..e013569 --- /dev/null +++ b/app/Constants/Config.php @@ -0,0 +1,12 @@ +getClientFilename(), PATHINFO_EXTENSION); $date = date('m-d'); - $targetPath = BASE_PATH . '/uploads/' . $filename; + $targetPath = BASE_PATH . '/public/uploads/search-image/' . $date . '/' . $filename; // 确保目录存在 if (!is_dir(dirname($targetPath))) { diff --git a/app/Controller/admin/api/KeywordsController.php b/app/Controller/admin/api/KeywordsController.php index be418ea..4a23a88 100644 --- a/app/Controller/admin/api/KeywordsController.php +++ b/app/Controller/admin/api/KeywordsController.php @@ -2,6 +2,7 @@ namespace App\Controller\admin\api; +use App\Constants\Config; use App\Controller\AbstractController; use App\Helpers\ExcelHelper; use App\Model\AppKeywordsMonitor; @@ -171,7 +172,7 @@ class KeywordsController extends AbstractController foreach ($res as &$v) { $v['keyword'] = AppKeywordsMonitorTask::find($v['aid'])->keyword; - $v['screen_path'] = 'http://127..0.0.1:9503' . $v['screen_path']; + $v['screen_path'] = Config::DOMAIN . $v['screen_path']; } $fileName = date('Y-m-d') . '关键词监控结果'; return ExcelHelper::exportData($this->response, list: $res, header: [