From 87a37d625297d365caa79d7ce954acfa1fa27e47 Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Wed, 8 Mar 2023 14:09:01 +0800 Subject: [PATCH] Optimize plugin types. wip wip wip Code format --- beike/Models/Plugin.php | 2 + .../Admin/View/DesignBuilders/Bestseller.php | 9 +- plugins/Bestseller/Bootstrap.php | 2 +- plugins/Bestseller/Lang/en/common.php | 15 +++ plugins/Bestseller/Lang/zh_cn/common.php | 15 +++ .../Bestseller/Repositories/ProductRepo.php | 5 +- plugins/Bestseller/Static/image/icon.png | Bin 0 -> 4207 bytes .../admin/design_module_bestseller.blade.php | 35 ++++--- .../shop/design_module_bestseller.blade.php | 21 ++-- plugins/Bestseller/config.json | 10 +- resources/beike/admin/css/design/app.scss | 12 ++- .../pages/design/builder/index.blade.php | 14 ++- .../views/pages/design/module/brand.blade.php | 35 ++++--- .../views/pages/design/module/icons.blade.php | 32 +++--- .../pages/design/module/image100.blade.php | 52 +++++----- .../pages/design/module/image401.blade.php | 98 +++++++++--------- .../pages/design/module/product.blade.php | 33 +++--- .../pages/design/module/rich_text.blade.php | 32 +++--- .../pages/design/module/slideshow.blade.php | 67 ++++++------ .../pages/design/module/tab_product.blade.php | 34 +++--- resources/lang/de/admin/plugin.php | 2 + resources/lang/en/admin/plugin.php | 2 + resources/lang/es/admin/plugin.php | 2 + resources/lang/fr/admin/plugin.php | 2 + resources/lang/it/admin/plugin.php | 2 + resources/lang/ja/admin/plugin.php | 2 + resources/lang/ru/admin/plugin.php | 2 + resources/lang/zh_cn/admin/plugin.php | 2 + resources/lang/zh_hk/admin/plugin.php | 2 + themes/default/design/product.blade.php | 3 +- 30 files changed, 318 insertions(+), 226 deletions(-) create mode 100644 plugins/Bestseller/Lang/en/common.php create mode 100644 plugins/Bestseller/Lang/zh_cn/common.php create mode 100644 plugins/Bestseller/Static/image/icon.png diff --git a/beike/Models/Plugin.php b/beike/Models/Plugin.php index 50aae3d9..d6c67664 100644 --- a/beike/Models/Plugin.php +++ b/beike/Models/Plugin.php @@ -19,6 +19,8 @@ class Plugin extends Base 'total', // 订单金额 'social', // 社交网络 'feature', // 功能模块 + 'language', // 语言翻译 + 'theme', // 主题模板 ]; protected $fillable = ['type', 'code']; diff --git a/plugins/Bestseller/Admin/View/DesignBuilders/Bestseller.php b/plugins/Bestseller/Admin/View/DesignBuilders/Bestseller.php index 319d15d5..fd236855 100644 --- a/plugins/Bestseller/Admin/View/DesignBuilders/Bestseller.php +++ b/plugins/Bestseller/Admin/View/DesignBuilders/Bestseller.php @@ -33,11 +33,10 @@ class Bestseller extends Component public function render(): View { $data['register'] = [ - 'code' => 'bestseller', - 'sort' => 0, - // 'name' => trans('admin/design_builder.module_brand'), - 'name' => 'Bestseller', - 'icon' => '', + 'code' => 'bestseller', + 'sort' => 0, + 'name' => trans('Bestseller::common.module_name'), + 'icon' => plugin_asset('Bestseller', 'image/icon.png'), 'view_path' => 'Bestseller::shop/design_module_bestseller', ]; diff --git a/plugins/Bestseller/Bootstrap.php b/plugins/Bestseller/Bootstrap.php index 67eb1a88..4eee1eef 100644 --- a/plugins/Bestseller/Bootstrap.php +++ b/plugins/Bestseller/Bootstrap.php @@ -33,7 +33,7 @@ class Bootstrap $module = $data['module_code'] ?? ''; if ($module == 'bestseller') { - $data['title'] = $data['title'][locale()] ?? ''; + $data['title'] = $data['title'][locale()] ?? ''; $data['products'] = ProductRepo::getBestSellerProducts($data['limit']); } diff --git a/plugins/Bestseller/Lang/en/common.php b/plugins/Bestseller/Lang/en/common.php new file mode 100644 index 00000000..bcc7a8e9 --- /dev/null +++ b/plugins/Bestseller/Lang/en/common.php @@ -0,0 +1,15 @@ + + * @created 2022-07-28 16:19:06 + * @modified 2022-07-28 16:19:06 + */ + +return [ + 'module_name' => 'Bestseller', + 'limit' => 'Limit', +]; diff --git a/plugins/Bestseller/Lang/zh_cn/common.php b/plugins/Bestseller/Lang/zh_cn/common.php new file mode 100644 index 00000000..e962884f --- /dev/null +++ b/plugins/Bestseller/Lang/zh_cn/common.php @@ -0,0 +1,15 @@ + + * @created 2022-07-28 16:19:06 + * @modified 2022-07-28 16:19:06 + */ + +return [ + 'module_name' => '热卖模块', + 'limit' => '数量限制', +]; diff --git a/plugins/Bestseller/Repositories/ProductRepo.php b/plugins/Bestseller/Repositories/ProductRepo.php index 6d0da567..525ca388 100644 --- a/plugins/Bestseller/Repositories/ProductRepo.php +++ b/plugins/Bestseller/Repositories/ProductRepo.php @@ -25,11 +25,12 @@ class ProductRepo { $products = \Beike\Repositories\ProductRepo::getBuilder([ 'active' => 1, - 'sort' => 'products.sales', - 'order' => 'desc', + 'sort' => 'products.sales', + 'order' => 'desc', ]) ->whereHas('masterSku') ->limit($limit)->get(); + return ProductSimple::collection($products)->jsonSerialize(); } } diff --git a/plugins/Bestseller/Static/image/icon.png b/plugins/Bestseller/Static/image/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..00aafdab223c96311d4eb6af465594b858fd6eb5 GIT binary patch literal 4207 zcmV-#5RmVQP)Px_DM>^@RCr$PT?@1(MRBg0yVnJcM#-)yNLU|%m>8cd2pq{01O;TX+}kz(-Naz< zh!1?ACrW%|eSt>ABZ3O@NHCJ@@=x`>yJrP=K^}{VPc#@`D59?NQWxWc)f3n|Q=Yoa zf6v_6nSZ)x=D+(B{yyiPf6q>JRds*UJ>At+)d-_9R6T%0rOikg7y&Y5FTn_q5g z14E|HXoQRa8L}Q2GId5HWCX~N^}vv+Ga4ZyKRMP(%(4f?)0!0J47q z0NeEs5w|Bv^5Y-~wu{L2UAuN|-?VAduj)x&+*(6BLRPO{{ph{++G~}F{51gR-?D~X za~mRlT0}kr05>sn+>qZust*+)olfWJaU36wh%Zb*2nNz>fcr$`svrn%M8uoA-R^Az zlH<*GC;&0WoPvn20f6Uwx1gO0UlNgvthJwNhh2RxdlV2NdNBZ;0RZ~zQtkzSy8+-X z{S}e9e+NOJzmO!!egLpPBI@tlztdmW>250koX^bqyGP0%0i@IEJXb`{5Rp?VT75Sn zUXvurwTO5vGyiX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j4*S4?TKOV%<4Mvqpd*C56LLM#{jsO`l zq(^{^02#6#7&3K6BV+`~koCZjsWTcOBS40%2Zl_Y-vg$Q3(kEk@Du<5002ovPDHLk FV1nb~41NFr literal 0 HcmV?d00001 diff --git a/plugins/Bestseller/Views/admin/design_module_bestseller.blade.php b/plugins/Bestseller/Views/admin/design_module_bestseller.blade.php index b8ad345c..eda73c16 100644 --- a/plugins/Bestseller/Views/admin/design_module_bestseller.blade.php +++ b/plugins/Bestseller/Views/admin/design_module_bestseller.blade.php @@ -6,7 +6,7 @@
-
数量限制
+
{{ __('Bestseller::common.limit') }}
@@ -33,19 +33,22 @@ Vue.component('module-editor-bestseller', { } }, }); - -const register = @json($register); - -// 定义模块的配置项 -register.make = { - style: { - background_color: '' - }, - title: languagesFill('{{ __('admin/builder.text_module_title') }}'), - limit: 8, -} - -setTimeout(() => { - app.source.modules.push(register) -}, 100) + +{{-- 定义模块的配置项 --}} +@push('add-script') + +@endpush + diff --git a/plugins/Bestseller/Views/shop/design_module_bestseller.blade.php b/plugins/Bestseller/Views/shop/design_module_bestseller.blade.php index e0eff36f..4f14fc73 100644 --- a/plugins/Bestseller/Views/shop/design_module_bestseller.blade.php +++ b/plugins/Bestseller/Views/shop/design_module_bestseller.blade.php @@ -4,7 +4,7 @@
{{ $content['title'] }}
@if ($content['products']) -
+
@foreach ($content['products'] as $product)
@@ -13,9 +13,9 @@ @endforeach
-
-
-
+
+
+
@elseif (!$content['products'] and $design)
@for ($s = 0; $s < 4; $s++) @@ -36,30 +36,31 @@
diff --git a/plugins/Bestseller/config.json b/plugins/Bestseller/config.json index b4bee6a7..f4ae6961 100644 --- a/plugins/Bestseller/config.json +++ b/plugins/Bestseller/config.json @@ -1,7 +1,13 @@ { "code": "bestseller", - "name": "热卖商品模块", - "description": "首页装修热卖商品模块", + "name": { + "zh_cn": "热卖商品模块", + "en": "Hot Items Module" + }, + "description": { + "zh_cn": "首页装修热卖商品模块", + "en": "Home Decoration Hot Products Module" + }, "type": "feature", "version": "v1.0.0", "icon": "/image/logo.png", diff --git a/resources/beike/admin/css/design/app.scss b/resources/beike/admin/css/design/app.scss index 849343ab..abbf22d8 100644 --- a/resources/beike/admin/css/design/app.scss +++ b/resources/beike/admin/css/design/app.scss @@ -168,9 +168,15 @@ body.page-design { display: flex; justify-content: center; align-items: center; - img { - max-width: 100%; - max-height: auto; + + .img-icon { + width: 36px; + height: 36px; + + img { + max-width: 100%; + max-height: auto; + } } i { diff --git a/resources/beike/admin/views/pages/design/builder/index.blade.php b/resources/beike/admin/views/pages/design/builder/index.blade.php index 7f88de92..66ee3fe1 100644 --- a/resources/beike/admin/views/pages/design/builder/index.blade.php +++ b/resources/beike/admin/views/pages/design/builder/index.blade.php @@ -62,7 +62,10 @@
-
+
+ +
+
@{{ item.name }}
@@ -154,6 +157,8 @@ @include('admin::pages.design.builder.component.rich_text_i18n') + @stack('add-script') diff --git a/resources/beike/admin/views/pages/design/module/brand.blade.php b/resources/beike/admin/views/pages/design/module/brand.blade.php index 8df24834..ac99b8fb 100644 --- a/resources/beike/admin/views/pages/design/module/brand.blade.php +++ b/resources/beike/admin/views/pages/design/module/brand.blade.php @@ -105,21 +105,22 @@ Vue.component('module-editor-brand', { }, } }); - -setTimeout(() => { - const make = { - style: { - background_color: '' - }, - floor: languagesFill(''), - full: true, - title: languagesFill('{{ __('admin/builder.text_module_title') }}'), - brands: [] - } - - let register = @json($register); - - register.make = make; - app.source.modules.push(register) -}, 100) + +@push('add-script') + +@endpush diff --git a/resources/beike/admin/views/pages/design/module/icons.blade.php b/resources/beike/admin/views/pages/design/module/icons.blade.php index e3fa9823..1dc214cc 100644 --- a/resources/beike/admin/views/pages/design/module/icons.blade.php +++ b/resources/beike/admin/views/pages/design/module/icons.blade.php @@ -86,19 +86,21 @@ Vue.component('module-editor-icons', { } }); -setTimeout(() => { - const make = { - style: { - background_color: '' - }, - title: languagesFill('{{ __('admin/builder.text_module_title') }}'), - floor: languagesFill(''), - images: [] - } - - let register = @json($register); - - register.make = make; - app.source.modules.push(register) -}, 100) + +@push('add-script') + +@endpush \ No newline at end of file diff --git a/resources/beike/admin/views/pages/design/module/image100.blade.php b/resources/beike/admin/views/pages/design/module/image100.blade.php index 623d27db..f14b274c 100644 --- a/resources/beike/admin/views/pages/design/module/image100.blade.php +++ b/resources/beike/admin/views/pages/design/module/image100.blade.php @@ -48,29 +48,31 @@ Vue.component('module-editor-image100', { } }); - -setTimeout(() => { - const make = { - style: { - background_color: '' - }, - floor: languagesFill(''), - full: true, - images: [ - { - image: languagesFill('catalog/demo/banner/banner-2-en.png'), - show: true, - link: { - type: 'product', - value:'' - } - } - ] - } - - let register = @json($register); - - register.make = make; - app.source.modules.push(register) -}, 100) + +@push('add-script') + +@endpush \ No newline at end of file diff --git a/resources/beike/admin/views/pages/design/module/image401.blade.php b/resources/beike/admin/views/pages/design/module/image401.blade.php index 55cb08a0..b8f48daa 100644 --- a/resources/beike/admin/views/pages/design/module/image401.blade.php +++ b/resources/beike/admin/views/pages/design/module/image401.blade.php @@ -60,52 +60,54 @@ Vue.component('module-editor-image401', { }, } }); - -setTimeout(() => { - const make = { - style: { - background_color: '' - }, - floor: languagesFill(''), - images: [ - { - image: languagesFill('catalog/demo/image_plus_1-en.png'), - show: true, - link: { - type: 'product', - value:'' - } - }, - { - image: languagesFill('catalog/demo/image_plus_2-en.png'), - show: false, - link: { - type: 'product', - value:'' - } - }, - { - image: languagesFill('catalog/demo/image_plus_3-en.png'), - show: false, - link: { - type: 'product', - value:'' - } - }, - { - image: languagesFill('catalog/demo/image_plus_4-en.png'), - show: false, - link: { - type: 'product', - value:'' - } - } - ] - } - - let register = @json($register); - - register.make = make; - app.source.modules.push(register) -}, 100) + +@push('add-script') + +@endpush \ No newline at end of file diff --git a/resources/beike/admin/views/pages/design/module/product.blade.php b/resources/beike/admin/views/pages/design/module/product.blade.php index 6321f9a5..8ad06e00 100644 --- a/resources/beike/admin/views/pages/design/module/product.blade.php +++ b/resources/beike/admin/views/pages/design/module/product.blade.php @@ -119,20 +119,21 @@ Vue.component('module-editor-product', { }, } }); - -setTimeout(() => { - const make = { - style: { - background_color: '' - }, - floor: languagesFill(''), - products: [], - title: languagesFill('{{ __('admin/builder.text_module_title') }}'), - } - - let register = @json($register); - - register.make = make; - app.source.modules.push(register) -}, 100) + +@push('add-script') + +@endpush diff --git a/resources/beike/admin/views/pages/design/module/rich_text.blade.php b/resources/beike/admin/views/pages/design/module/rich_text.blade.php index db2e0890..0c81e6f2 100644 --- a/resources/beike/admin/views/pages/design/module/rich_text.blade.php +++ b/resources/beike/admin/views/pages/design/module/rich_text.blade.php @@ -37,19 +37,21 @@ Vue.component('module-editor-rich-text', { } }); - -setTimeout(() => { - const make = { - style: { - background_color: '' - }, - floor: languagesFill(''), - text: {} - } - - let register = @json($register); - - register.make = make; - app.source.modules.push(register) -}, 100) + +@push('add-script') + +@endpush diff --git a/resources/beike/admin/views/pages/design/module/slideshow.blade.php b/resources/beike/admin/views/pages/design/module/slideshow.blade.php index ef439cc0..812eac69 100644 --- a/resources/beike/admin/views/pages/design/module/slideshow.blade.php +++ b/resources/beike/admin/views/pages/design/module/slideshow.blade.php @@ -93,36 +93,39 @@ Vue.component('module-editor-slideshow', { } }); -setTimeout(() => { - const make = { - style: { - background_color: '' - }, - full: true, - floor: languagesFill(''), - images: [ - { - image: languagesFill('catalog/demo/banner/banner-4-en.jpg'), - show: true, - link: { - type: 'product', - value:'' - } - }, - { - image: languagesFill('catalog/demo/banner/banner-3-en.jpg'), - show: false, - link: { - type: 'product', - value:'' - } - } - ] - } - - let register = @json($register); - - register.make = make; - app.source.modules.push(register) -}, 100) + +@push('add-script') + +@endpush \ No newline at end of file diff --git a/resources/beike/admin/views/pages/design/module/tab_product.blade.php b/resources/beike/admin/views/pages/design/module/tab_product.blade.php index dcdb5873..209412d1 100644 --- a/resources/beike/admin/views/pages/design/module/tab_product.blade.php +++ b/resources/beike/admin/views/pages/design/module/tab_product.blade.php @@ -157,20 +157,22 @@ Vue.component('module-editor-tab-product', { } } }); - -setTimeout(() => { - const make = { - style: { - background_color: '' - }, - floor: languagesFill(''), - tabs: [{title: languagesFill('Tab 1'), products: []}], - title: languagesFill('{{ __('admin/builder.text_module_title') }}'), - } - - let register = @json($register); - - register.make = make; - app.source.modules.push(register) -}, 100) + +@push('add-script') + +@endpush diff --git a/resources/lang/de/admin/plugin.php b/resources/lang/de/admin/plugin.php index 687640ad..7e6d5cd0 100644 --- a/resources/lang/de/admin/plugin.php +++ b/resources/lang/de/admin/plugin.php @@ -29,4 +29,6 @@ return [ 'total' => 'Auftragsberechnung', 'social' => 'Social', 'feature' => 'Feature', + 'language' => 'Language', + 'theme' => 'Theme', ]; diff --git a/resources/lang/en/admin/plugin.php b/resources/lang/en/admin/plugin.php index e8615436..e29e82bc 100644 --- a/resources/lang/en/admin/plugin.php +++ b/resources/lang/en/admin/plugin.php @@ -29,4 +29,6 @@ return [ 'social' => 'Social', 'total' => 'Total', 'feature' => 'Feature', + 'language' => 'Language', + 'theme' => 'Theme', ]; diff --git a/resources/lang/es/admin/plugin.php b/resources/lang/es/admin/plugin.php index d13e6485..fb1fd529 100644 --- a/resources/lang/es/admin/plugin.php +++ b/resources/lang/es/admin/plugin.php @@ -29,4 +29,6 @@ return [ 'total' => 'Cálculo de pedidos', 'social' => 'Social', 'feature' => 'Feature', + 'language' => 'Language', + 'theme' => 'Theme', ]; diff --git a/resources/lang/fr/admin/plugin.php b/resources/lang/fr/admin/plugin.php index 66b756ed..bd9a876a 100644 --- a/resources/lang/fr/admin/plugin.php +++ b/resources/lang/fr/admin/plugin.php @@ -29,4 +29,6 @@ return [ 'total' => 'Calcul de la commande', 'social' => 'Social', 'feature' => 'Feature', + 'language' => 'Language', + 'theme' => 'Theme', ]; diff --git a/resources/lang/it/admin/plugin.php b/resources/lang/it/admin/plugin.php index 8fc81af4..368be125 100644 --- a/resources/lang/it/admin/plugin.php +++ b/resources/lang/it/admin/plugin.php @@ -29,4 +29,6 @@ return [ 'total' => 'Calcolo dell\'ordine', 'social' => 'Social', 'feature' => 'Feature', + 'language' => 'Language', + 'theme' => 'Theme', ]; diff --git a/resources/lang/ja/admin/plugin.php b/resources/lang/ja/admin/plugin.php index daa2aafb..68548ca9 100644 --- a/resources/lang/ja/admin/plugin.php +++ b/resources/lang/ja/admin/plugin.php @@ -29,4 +29,6 @@ return [ 'total' => '注文計算', 'social' => 'Social', 'feature' => 'Feature', + 'language' => 'Language', + 'theme' => 'Theme', ]; diff --git a/resources/lang/ru/admin/plugin.php b/resources/lang/ru/admin/plugin.php index c2f6a7ad..b9a14a99 100644 --- a/resources/lang/ru/admin/plugin.php +++ b/resources/lang/ru/admin/plugin.php @@ -29,4 +29,6 @@ return [ 'total' => 'Расчет заказа', 'social' => 'Social', 'feature' => 'Feature', + 'language' => 'Language', + 'theme' => 'Theme', ]; diff --git a/resources/lang/zh_cn/admin/plugin.php b/resources/lang/zh_cn/admin/plugin.php index c1df128d..0f088a93 100644 --- a/resources/lang/zh_cn/admin/plugin.php +++ b/resources/lang/zh_cn/admin/plugin.php @@ -29,4 +29,6 @@ return [ 'social' => '社交网络', 'total' => '订单计算', 'feature' => '功能模块', + 'language' => '语言翻译', + 'theme' => '主题模板', ]; diff --git a/resources/lang/zh_hk/admin/plugin.php b/resources/lang/zh_hk/admin/plugin.php index 086126c5..06343b5c 100644 --- a/resources/lang/zh_hk/admin/plugin.php +++ b/resources/lang/zh_hk/admin/plugin.php @@ -29,4 +29,6 @@ return [ 'social' => '社交網絡', 'total' => '訂單計算', 'feature' => '功能模塊', + 'language' => '语言翻译', + 'theme' => '主题模板', ]; diff --git a/themes/default/design/product.blade.php b/themes/default/design/product.blade.php index d78ae709..22c1e753 100644 --- a/themes/default/design/product.blade.php +++ b/themes/default/design/product.blade.php @@ -38,15 +38,16 @@