mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-28 13:31:04 +00:00
fix(小程序): 下载与 CI 源目录由 mp_view 改为 mp-weixin
与 uni-app 构建产物目录名对齐,升级清空路径同步调整。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
60e55bc2ac
commit
c6093f571a
@ -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) {
|
||||
|
||||
@ -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'));
|
||||
//是否开启直播
|
||||
|
||||
@ -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', ''));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user