From 94b19f23f16652accd8c2c1b7c1113f55b94e7cf Mon Sep 17 00:00:00 2001 From: zhangbang <386654667@qq.com> Date: Wed, 17 Aug 2022 21:44:11 +0800 Subject: [PATCH 01/47] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=8F=9C=E5=8D=95ICON?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/mycms/config-admin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/mycms/config-admin.js b/public/mycms/config-admin.js index 0ac4d836..9714b685 100644 --- a/public/mycms/config-admin.js +++ b/public/mycms/config-admin.js @@ -27,7 +27,7 @@ require.config({ // 路径配置信息 var PATH_CONFIG = { - iconLess: BASE_URL + "plugs/font-awesome-4.7.0/less/variables.less", + iconLess: BASE_URL + "/mycms/plugs/font-awesome-4.7.0/less/variables.less", }; window.PATH_CONFIG = PATH_CONFIG; -- Gitee From e13cd28513740f7113820d9647715386ff96fe16 Mon Sep 17 00:00:00 2001 From: zhangbang <386654667@qq.com> Date: Thu, 18 Aug 2022 16:16:37 +0800 Subject: [PATCH 02/47] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=80=BB=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=99=A8=E5=A2=9E=E5=8A=A0=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/MyAdminController.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/MyAdminController.php b/app/Http/Controllers/MyAdminController.php index 12ea87d7..03e06913 100644 --- a/app/Http/Controllers/MyAdminController.php +++ b/app/Http/Controllers/MyAdminController.php @@ -19,7 +19,6 @@ class MyAdminController extends MyController public $with = []; - public function __call($method, $parameters) { if (method_exists($this, "{$method}Action")) { @@ -53,6 +52,7 @@ class MyAdminController extends MyController if (request()->ajax() && request()->wantsJson()) { $data = $this->getModel()::with($this->with) + ->where($this->getIndexWhere()) ->orderBy('id', 'desc') ->paginate($this->request('limit', 'intval')) ->toArray(); @@ -63,6 +63,16 @@ class MyAdminController extends MyController return $this->view($this->view . 'index'); } + + /** + * @return array + */ + public function getIndexWhere(): array + { + return []; + } + + /** * 创建页 */ -- Gitee From 0932699e7f48c038343c3b5288e42eb455b1f919 Mon Sep 17 00:00:00 2001 From: zhangbang <386654667@qq.com> Date: Fri, 19 Aug 2022 15:51:38 +0800 Subject: [PATCH 03/47] =?UTF-8?q?=E6=B3=A8=E9=87=8A=20=E7=A9=BA=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=E8=BD=ACnull=20=E4=B8=AD=E9=97=B4=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Kernel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 2055831a..7acd0107 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -21,7 +21,7 @@ class Kernel extends HttpKernel \App\Http\Middleware\PreventRequestsDuringMaintenance::class, \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, - \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, + //\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, \Expand\Addon\Middlewares\RouteBehavior::class ]; -- Gitee From dcc92a2258017529c76b22904c3379614697ec07 Mon Sep 17 00:00:00 2001 From: zhangbang <386654667@qq.com> Date: Mon, 22 Aug 2022 23:05:42 +0800 Subject: [PATCH 04/47] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=95=B0=E6=8D=AE=E5=A1=AB=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/seeders/DatabaseSeeder.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index e52970b9..372435e6 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -8,6 +8,7 @@ use Modules\System\Database\Seeders\SystemAdminSeeder; use Modules\System\Database\Seeders\SystemConfigSeeder; use Modules\System\Database\Seeders\SystemMenuSeeder; use Modules\System\Database\Seeders\SystemRoleSeeder; +use Nwidart\Modules\Facades\Module; class DatabaseSeeder extends Seeder { @@ -23,5 +24,25 @@ class DatabaseSeeder extends Seeder $this->call(SystemMenuSeeder::class); $this->call(SystemRoleSeeder::class); $this->call(RegionSeeder::class); + + $this->runModuleSeeder(); + } + + /** + * 运行模块自定义数据填充 + */ + protected function runModuleSeeder() + { + $modules = Module::allEnabled(); + + foreach ($modules as $module) { + + $name = $module->getName(); + + if (file_exists(module_path($name,"Database/Seeders/{$name}DatabaseSeeder.php"))) { + + $this->call("Modules\\{$name}\Database\Seeders\\{$name}DatabaseSeeder"); + } + } } } -- Gitee From 64dd56f42291dfa2824f99c05cb818c5b6e1fd2e Mon Sep 17 00:00:00 2001 From: zhangbang <386654667@qq.com> Date: Wed, 24 Aug 2022 11:51:45 +0800 Subject: [PATCH 05/47] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=95=B0=E6=8D=AE=E5=A1=AB=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/seeders/DatabaseSeeder.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 372435e6..44568b43 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -33,15 +33,16 @@ class DatabaseSeeder extends Seeder */ protected function runModuleSeeder() { - $modules = Module::allEnabled(); + $modules = json_decode(file_get_contents(base_path('modules_statuses.json')), true); - foreach ($modules as $module) { + foreach ($modules as $name => $value) { - $name = $module->getName(); + if ($value) { - if (file_exists(module_path($name,"Database/Seeders/{$name}DatabaseSeeder.php"))) { + if (file_exists(module_path($name, "Database/Seeders/{$name}DatabaseSeeder.php"))) { - $this->call("Modules\\{$name}\Database\Seeders\\{$name}DatabaseSeeder"); + $this->call("Modules\\{$name}\Database\Seeders\\{$name}DatabaseSeeder"); + } } } } -- Gitee From f9fee3ff7f11a32e701066b3c9e37611b99081f9 Mon Sep 17 00:00:00 2001 From: zhangbang <386654667@qq.com> Date: Wed, 24 Aug 2022 16:34:10 +0800 Subject: [PATCH 06/47] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=A2=9E=E5=8A=A0with?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/MyAdminController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/MyAdminController.php b/app/Http/Controllers/MyAdminController.php index 03e06913..dc330520 100644 --- a/app/Http/Controllers/MyAdminController.php +++ b/app/Http/Controllers/MyAdminController.php @@ -103,7 +103,8 @@ class MyAdminController extends MyController */ public function editAction() { - $data = $this->getModel()::find($this->request('id', 'intval')); + $data = $this->getModel()::with($this->with) + ->find($this->request('id', 'intval')); return $this->view($this->view . 'edit', compact('data')); } -- Gitee From 7f40d69ca0b48ea3d4866851b188ef178e797bab Mon Sep 17 00:00:00 2001 From: zhangbang <386654667@qq.com> Date: Wed, 24 Aug 2022 16:35:35 +0800 Subject: [PATCH 07/47] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E9=80=9A=E7=94=A8?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=A2=9E=E5=8A=A0with?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/MyAdminController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/MyAdminController.php b/app/Http/Controllers/MyAdminController.php index dc330520..b5664cf7 100644 --- a/app/Http/Controllers/MyAdminController.php +++ b/app/Http/Controllers/MyAdminController.php @@ -19,6 +19,8 @@ class MyAdminController extends MyController public $with = []; + public $editWith = []; + public function __call($method, $parameters) { if (method_exists($this, "{$method}Action")) { @@ -103,7 +105,7 @@ class MyAdminController extends MyController */ public function editAction() { - $data = $this->getModel()::with($this->with) + $data = $this->getModel()::with($this->editWith) ->find($this->request('id', 'intval')); return $this->view($this->view . 'edit', compact('data')); -- Gitee From 4aab3fa4ce0e98d1b3dc259b2d0454be7991f85b Mon Sep 17 00:00:00 2001 From: zhangbang <386654667@qq.com> Date: Thu, 25 Aug 2022 09:50:12 +0800 Subject: [PATCH 08/47] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E8=AF=AD=E8=A8=80=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/lang/en/installer_messages.php | 2 +- resources/lang/fr/installer_messages.php | 2 +- resources/lang/zh-CN/installer_messages.php | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/lang/en/installer_messages.php b/resources/lang/en/installer_messages.php index 04718332..bd485930 100644 --- a/resources/lang/en/installer_messages.php +++ b/resources/lang/en/installer_messages.php @@ -188,7 +188,7 @@ return [ 'title' => 'Installation Finished', 'templateTitle' => 'Installation Finished', 'finished' => 'Application has been successfully installed.', - 'migration' => 'Migration & Seed Console Output:', + 'migration' => 'Migration & Seed Console Output:', 'console' => 'Application Console Output:', 'log' => 'Installation Log Entry:', 'env' => 'Final .env File:', diff --git a/resources/lang/fr/installer_messages.php b/resources/lang/fr/installer_messages.php index 01cba9b4..48eba47d 100644 --- a/resources/lang/fr/installer_messages.php +++ b/resources/lang/fr/installer_messages.php @@ -177,7 +177,7 @@ return [ 'title' => 'Terminé', 'templateTitle' => 'Installation Terminé', 'finished' => 'L’application a été installée avec succès.', - 'migration' => 'Migration & Seed Console Output:', + 'migration' => 'Migration & Seed Console Output:', 'console' => 'Application Console Output:', 'log' => 'Installation Log Entry:', 'env' => 'Final .env File:', diff --git a/resources/lang/zh-CN/installer_messages.php b/resources/lang/zh-CN/installer_messages.php index 7f3a023d..93d1f660 100644 --- a/resources/lang/zh-CN/installer_messages.php +++ b/resources/lang/zh-CN/installer_messages.php @@ -172,8 +172,10 @@ return [ * */ 'final' => [ - 'title' => '完成', + 'title' => '安装完成', + 'templateTitle' => '安装完成', 'finished' => '应用已成功安装.', 'exit' => '回到首页', + ], ]; -- Gitee From af934eb33cb9cb03e2cef343f6e69d561574d1ed Mon Sep 17 00:00:00 2001 From: zhangbang <386654667@qq.com> Date: Fri, 26 Aug 2022 16:50:36 +0800 Subject: [PATCH 09/47] =?UTF-8?q?=E6=96=87=E7=AB=A0=E5=88=86=E7=B1=BB=20&?= =?UTF-8?q?=20=E5=95=86=E5=93=81=E5=88=86=E7=B1=BB=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=BC=A9=E7=95=A5=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...8_26_164324_AlterArticleCategoryAddImg.php | 32 +++++++++++++++++++ .../Http/Requests/ArticleCategoryRequest.php | 1 + .../views/admin/category/create.blade.php | 11 +++++++ .../views/admin/category/edit.blade.php | 11 +++++++ ..._08_26_164247_AlterGoodsCategoryAddImg.php | 32 +++++++++++++++++++ .../Shop/Http/Requests/CategoryRequest.php | 1 + .../views/admin/category/create.blade.php | 11 +++++++ .../views/admin/category/edit.blade.php | 11 +++++++ 8 files changed, 110 insertions(+) create mode 100644 Modules/Cms/Database/Migrations/2022_08_26_164324_AlterArticleCategoryAddImg.php create mode 100644 Modules/Shop/Database/Migrations/2022_08_26_164247_AlterGoodsCategoryAddImg.php diff --git a/Modules/Cms/Database/Migrations/2022_08_26_164324_AlterArticleCategoryAddImg.php b/Modules/Cms/Database/Migrations/2022_08_26_164324_AlterArticleCategoryAddImg.php new file mode 100644 index 00000000..d57b6259 --- /dev/null +++ b/Modules/Cms/Database/Migrations/2022_08_26_164324_AlterArticleCategoryAddImg.php @@ -0,0 +1,32 @@ +string('img')->after('description')->default(''); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('my_article_category', function (Blueprint $table) { + $table->dropColumn('img'); + }); + } +} diff --git a/Modules/Cms/Http/Requests/ArticleCategoryRequest.php b/Modules/Cms/Http/Requests/ArticleCategoryRequest.php index 8adb54da..fe730b17 100644 --- a/Modules/Cms/Http/Requests/ArticleCategoryRequest.php +++ b/Modules/Cms/Http/Requests/ArticleCategoryRequest.php @@ -19,6 +19,7 @@ class ArticleCategoryRequest extends MyRequest 'pid' => ['required'], 'name' => ['required','max:255'], 'description' => ['max:255'], + 'img' => [], ]; } diff --git a/Modules/Cms/Resources/views/admin/category/create.blade.php b/Modules/Cms/Resources/views/admin/category/create.blade.php index ddcbd1e8..4aac12e9 100644 --- a/Modules/Cms/Resources/views/admin/category/create.blade.php +++ b/Modules/Cms/Resources/views/admin/category/create.blade.php @@ -55,6 +55,17 @@ @endif +