From f4ac5e58f2ab910bb75774b3a1cf373890ccadbc Mon Sep 17 00:00:00 2001 From: wangchen14709853322 <2513189129@qq.com> Date: Sat, 4 Jul 2026 14:46:21 +0800 Subject: [PATCH] v2.0.0 --- .../app/service/core/addon/CoreAddonDevelopBuildService.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/niucloud/app/service/core/addon/CoreAddonDevelopBuildService.php b/niucloud/app/service/core/addon/CoreAddonDevelopBuildService.php index eb8cd9d2a..722795f19 100644 --- a/niucloud/app/service/core/addon/CoreAddonDevelopBuildService.php +++ b/niucloud/app/service/core/addon/CoreAddonDevelopBuildService.php @@ -29,6 +29,8 @@ class CoreAddonDevelopBuildService extends BaseCoreService protected $addon; protected $build_path; + protected $scene; + public function __construct($scene = 'build') { parent::__construct(); @@ -207,7 +209,7 @@ class CoreAddonDevelopBuildService extends BaseCoreService public function adminDist() { $admin_path = str_replace('/', DIRECTORY_SEPARATOR, $this->root_path . 'admin/dist/assets/addons/' . $this->addon . '/'); if (!is_dir($admin_path) || !is_readable($admin_path) || count(scandir($admin_path)) === 2) { - if ($this->scene = 'build') throw new CommonException("请先在admin目录下执行 npm run build:addon {$this->addon}命令编译插件admin端"); + if ($this->scene == 'build') throw new CommonException("请先在admin目录下执行 npm run build:addon {$this->addon}命令编译插件admin端"); return; } @@ -238,7 +240,7 @@ class CoreAddonDevelopBuildService extends BaseCoreService $uniapp_path = str_replace('/', DIRECTORY_SEPARATOR, $this->root_path . 'uni-app/dist/build/h5/assets/addons/' . $this->addon . '/'); if (!is_dir($uniapp_path) || !is_readable($uniapp_path) || count(scandir($uniapp_path)) === 2) { - if ($this->scene = 'build') throw new CommonException("请先在uni-app目录下执行 npm run build:h5:addon {$this->addon}命令编译插件wap端"); + if ($this->scene == 'build') throw new CommonException("请先在uni-app目录下执行 npm run build:h5:addon {$this->addon}命令编译插件wap端"); return; }