From c6093f571aace80ec6f89dd846fc425461e80445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=98=8A=E5=A4=A9?= <442384644@qq.com> Date: Wed, 28 Oct 2026 11:06:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B0=8F=E7=A8=8B=E5=BA=8F):=20=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E4=B8=8E=20CI=20=E6=BA=90=E7=9B=AE=E5=BD=95=E7=94=B1?= =?UTF-8?q?=20mp=5Fview=20=E6=94=B9=E4=B8=BA=20mp-weixin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 与 uni-app 构建产物目录名对齐,升级清空路径同步调整。 Co-authored-by: Cursor --- backend/app/services/system/UpgradeServices.php | 2 +- .../controller/admin/RoutineTemplateController.php | 2 +- .../channel/wechat_mini/service/RoutineCIServices.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/backend/app/services/system/UpgradeServices.php b/backend/app/services/system/UpgradeServices.php index 53c13483a..7fc40a334 100644 --- a/backend/app/services/system/UpgradeServices.php +++ b/backend/app/services/system/UpgradeServices.php @@ -833,7 +833,7 @@ class UpgradeServices extends BaseService if (is_file($serverPackageName)) { $clearDirs = [ app()->getRootPath() . 'public' . DS . 'admin', - app()->getRootPath() . 'public' . DS . 'statics' . DS . 'mp_view', + app()->getRootPath() . 'public' . DS . 'statics' . DS . 'mp-weixin', app()->getRootPath() . 'public' . DS . 'statics' . DS . 'download', ]; foreach ($clearDirs as $clearDir) { diff --git a/backend/modules/channel/wechat_mini/controller/admin/RoutineTemplateController.php b/backend/modules/channel/wechat_mini/controller/admin/RoutineTemplateController.php index c93704626..7e05ca3b7 100644 --- a/backend/modules/channel/wechat_mini/controller/admin/RoutineTemplateController.php +++ b/backend/modules/channel/wechat_mini/controller/admin/RoutineTemplateController.php @@ -91,7 +91,7 @@ class RoutineTemplateController extends AuthController //拷贝源文件 /** @var File $fileService */ $fileService = app(File::class); - $fileService->copyDir(public_path() . 'statics/mp_view', public_path() . 'statics/download'); + $fileService->copyDir(public_path() . 'statics/mp-weixin', public_path() . 'statics/download'); //替换appid和名称 $this->updateConfigJson(sys_config('routine_appId'), $name !== '' ? $name : sys_config('routine_name')); //是否开启直播 diff --git a/backend/modules/channel/wechat_mini/service/RoutineCIServices.php b/backend/modules/channel/wechat_mini/service/RoutineCIServices.php index bc8d8e367..8b0c5514f 100644 --- a/backend/modules/channel/wechat_mini/service/RoutineCIServices.php +++ b/backend/modules/channel/wechat_mini/service/RoutineCIServices.php @@ -182,7 +182,7 @@ class RoutineCIServices extends BaseService * * 上传前的项目准备工作,包括复制源码和替换配置: * 1. 清理旧的项目文件 (如果存在) - * 2. 将小程序源码从 mp_view 目录复制到 download 目录 + * 2. 将小程序源码从 mp-weixin 目录复制到 download 目录 * 3. 替换 project.config.json 中的 appid 和 projectname * 4. 根据是否开启直播决定是否移除直播插件配置 * 5. 替换代码中的 API 域名为当前服务器域名 @@ -206,10 +206,10 @@ class RoutineCIServices extends BaseService } // 步骤2: 复制小程序源码到目标目录 - // 源目录: public/statics/mp_view (小程序编译后的源码) + // 源目录: public/statics/mp-weixin (小程序编译后的源码) /** @var File $fileService */ $fileService = app(File::class); - $fileService->copyDir(public_path() . 'statics/mp_view', $this->projectPath); + $fileService->copyDir(public_path() . 'statics/mp-weixin', $this->projectPath); // 步骤3: 替换 project.config.json 中的 appid 和 项目名称 $this->updateConfigJson($this->appId, sys_config('routine_name', ''));