diff --git a/beike/Admin/Http/Controllers/DesignFooterController.php b/beike/Admin/Http/Controllers/DesignFooterController.php new file mode 100644 index 00000000..08c7d3c5 --- /dev/null +++ b/beike/Admin/Http/Controllers/DesignFooterController.php @@ -0,0 +1,77 @@ + LanguageRepo::all(), + 'design_settings' => system_setting('base.design_setting'), + ]; + return view('admin::pages.design.builder.footer', $data); + } + + + /** + * 预览模块显示结果 + * + * @param Request $request + * @return View + * @throws \Exception + */ + public function preview(Request $request): View + { + $module = json_decode($request->getContent(), true); + $moduleId = $module['module_id'] ?? ''; + $moduleCode = $module['code'] ?? ''; + $content = $module['content'] ?? ''; + $viewPath = "design.{$moduleCode}"; + + $viewData = [ + 'code' => $moduleCode, + 'module_id' => $moduleId, + 'view_path' => $viewPath, + 'content' => DesignService::handleModuleContent($moduleCode, $content), + 'design' => (bool)$request->get('design') + ]; + + return view($viewPath, $viewData); + } + + + /** + * 更新所有数据 + * + * @param Request $request + * @return array + * @throws \Throwable + */ + public function update(Request $request): array + { + $content = json_decode($request->getContent(), true); + $moduleData = DesignService::handleRequestModules($content); + $data = [ + 'type' => 'system', + 'space' => 'base', + 'name' => 'design_setting', + 'value' => json_encode($moduleData), + 'json' => 1 + ]; + SettingRepo::createOrUpdate($data); + return json_success("保存成功"); + } +} diff --git a/beike/Admin/Repositories/PermissionRepo.php b/beike/Admin/Repositories/PermissionRepo.php index c6743875..b3257f6f 100644 --- a/beike/Admin/Repositories/PermissionRepo.php +++ b/beike/Admin/Repositories/PermissionRepo.php @@ -145,7 +145,7 @@ class PermissionRepo */ private function getSettingPermissions(): array { - $routes = ['settings_index', 'design_index']; + $routes = ['settings_index', 'design_index', 'design_footer_index']; $items = $this->getPermissionList('setting', $routes); return hook_filter('role.setting_permissions', $items); } diff --git a/beike/Admin/Routes/admin.php b/beike/Admin/Routes/admin.php index 9afb7086..58676895 100644 --- a/beike/Admin/Routes/admin.php +++ b/beike/Admin/Routes/admin.php @@ -42,6 +42,8 @@ Route::prefix($adminName) Route::put('design/builder', [Controllers\DesignController::class, 'update'])->name('design.update'); Route::post('design/builder/preview', [Controllers\DesignController::class, 'preview'])->name('design.module.preview'); + Route::get('design_footer/builder', [Controllers\DesignFooterController::class, 'index'])->name('design_footer.index'); + Route::put('edit', [Controllers\EditController::class, 'update'])->name('edit'); Route::get('edit/locale', [Controllers\EditController::class, 'locale'])->name('edit.locale'); diff --git a/beike/Admin/View/Components/Sidebar.php b/beike/Admin/View/Components/Sidebar.php index e464d1c8..fd481836 100644 --- a/beike/Admin/View/Components/Sidebar.php +++ b/beike/Admin/View/Components/Sidebar.php @@ -175,8 +175,9 @@ class Sidebar extends Component ['route' => 'tax_rates.index', 'icon' => 'fa fa-tachometer-alt'], ['route' => 'tax_classes.index', 'icon' => 'fa fa-tachometer-alt'], ['route' => 'currencies.index', 'icon' => 'fa fa-tachometer-alt'], - ['route' => 'design.index', 'icon' => 'fa fa-tachometer-alt', 'blank' => true], ['route' => 'languages.index', 'icon' => 'fa fa-tachometer-alt'], + ['route' => 'design.index', 'icon' => 'fa fa-tachometer-alt', 'blank' => true], + ['route' => 'design_footer.index', 'icon' => 'fa fa-tachometer-alt', 'blank' => true], ]; return hook_filter('sidebar.setting_routes', $routes); } diff --git a/plugins/Stripe/Static/image/pay-image.png b/plugins/Stripe/Static/image/pay-image.png new file mode 100644 index 00000000..3946bfec Binary files /dev/null and b/plugins/Stripe/Static/image/pay-image.png differ diff --git a/plugins/Stripe/Views/checkout/payment.blade.php b/plugins/Stripe/Views/checkout/payment.blade.php index 7d182698..8f7fa1f5 100644 --- a/plugins/Stripe/Views/checkout/payment.blade.php +++ b/plugins/Stripe/Views/checkout/payment.blade.php @@ -5,106 +5,109 @@ -
-
-
-
卡信息
-
-
- @for ($i = 1; $i <= 5; $i++) - - @endfor -
- - - - - -
- - - - - - - - -
-
- - - - - 記住這張卡以備將來使用 - -
-
+
+
+
+
+
卡信息
+
+
+ +
+ + + + + +
+ + + + + + + + +
+
+ + + + + 記住這張卡以備將來使用 + + + + +
+
+
diff --git a/public/build/beike/shop/default/css/app.css b/public/build/beike/shop/default/css/app.css index f4356cee..29eadb15 100644 --- a/public/build/beike/shop/default/css/app.css +++ b/public/build/beike/shop/default/css/app.css @@ -168,6 +168,86 @@ body[class^=page-account-] { min-height: 1000px; } +.h-min-100 { + min-width: 100px; +} + +.h-min-200 { + min-width: 200px; +} + +.h-min-300 { + min-width: 300px; +} + +.h-min-400 { + min-width: 400px; +} + +.h-min-500 { + min-width: 500px; +} + +.h-min-600 { + min-width: 600px; +} + +.h-min-700 { + min-width: 700px; +} + +.h-min-800 { + min-width: 800px; +} + +.h-min-900 { + min-width: 900px; +} + +.h-min-1000 { + min-width: 1000px; +} + +.w-max-100 { + max-width: 100px; +} + +.w-max-200 { + max-width: 200px; +} + +.w-max-300 { + max-width: 300px; +} + +.w-max-400 { + max-width: 400px; +} + +.w-max-500 { + max-width: 500px; +} + +.w-max-600 { + max-width: 600px; +} + +.w-max-700 { + max-width: 700px; +} + +.w-max-800 { + max-width: 800px; +} + +.w-max-900 { + max-width: 900px; +} + +.w-max-1000 { + max-width: 1000px; +} + .hp-100 { height: 100px; } diff --git a/resources/beike/admin/views/pages/design/builder/footer.blade.php b/resources/beike/admin/views/pages/design/builder/footer.blade.php new file mode 100644 index 00000000..8b264851 --- /dev/null +++ b/resources/beike/admin/views/pages/design/builder/footer.blade.php @@ -0,0 +1,258 @@ + + + + + + + + + + + 首页编辑器 + + + + + + + + + + @stack('header') + + + +
+ +
+ +
+
+ + + + + @include('admin::pages.design.builder.component.image_selector') + @include('admin::pages.design.builder.component.link_selector') + @include('admin::pages.design.builder.component.text_i18n') + + + + 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 940c5585..d220b325 100644 --- a/resources/beike/admin/views/pages/design/module/slideshow.blade.php +++ b/resources/beike/admin/views/pages/design/module/slideshow.blade.php @@ -12,7 +12,7 @@
diff --git a/resources/beike/shop/default/css/global.scss b/resources/beike/shop/default/css/global.scss index 49a8b5f6..54088030 100644 --- a/resources/beike/shop/default/css/global.scss +++ b/resources/beike/shop/default/css/global.scss @@ -38,6 +38,20 @@ body[class^="page-account-"] { } } +// 生成 100 200 300 ... 1000 的最小宽度 +@for $i from 1 through 10 { + .h-min-#{$i}00 { + min-width: #{$i}00px; + } +} + +// 生成 100 200 300 ... 1000 的最大宽度 +@for $i from 1 through 10 { + .w-max-#{$i}00 { + max-width: #{$i}00px; + } +} + // 生成 100 200 300 ... 1000 的高度 @for $i from 1 through 10 { .hp-#{$i}00 { diff --git a/resources/lang/zh_cn/admin/common.php b/resources/lang/zh_cn/admin/common.php index 49826060..72e97704 100644 --- a/resources/lang/zh_cn/admin/common.php +++ b/resources/lang/zh_cn/admin/common.php @@ -39,6 +39,7 @@ return [ 'currencies_index' => '货币管理', 'languages_index' => '语言管理', 'design_index' => '首页装修', + 'design_footer_index' => '页尾装修', 'categories_index' => '产品分类', 'products_index' => '商品管理', 'products_trashed' => '回收站', diff --git a/resources/lang/zh_cn/admin/setting.php b/resources/lang/zh_cn/admin/setting.php index d3704d3e..0983aee0 100644 --- a/resources/lang/zh_cn/admin/setting.php +++ b/resources/lang/zh_cn/admin/setting.php @@ -12,4 +12,5 @@ return [ 'settings_index' => '系统设置', 'design_index' => '首页编辑器', + 'design_footer_index' => '页尾编辑器', ]; diff --git a/themes/default/checkout/payment.blade.php b/themes/default/checkout/payment.blade.php index fcb929f4..2a30fc1a 100644 --- a/themes/default/checkout/payment.blade.php +++ b/themes/default/checkout/payment.blade.php @@ -3,31 +3,24 @@ @section('body-class', 'page-bk-stripe') @section('content') -
-
-
@include('shared.steps', ['steps' => 4])
-
- - -
-
-
-
订单结账
- -
-
-
    -
  • 订单号@{{ source.order.number }}
  • -
  • 运费15
  • -
  • 应付总金额
  • -
-
- -
-
-
-
- - {!! $payment !!} +
+
+
@include('shared.steps', ['steps' => 4])
+ + +
+
+
订单结账
+
+
    +
  • 订单号{{ $order->number }}
  • +
  • 应付总金额{{ $order->total }}
  • +
+ + {!! $payment !!} +
+
+
+
@endsection