diff --git a/beike/Admin/Http/Controllers/CustomerController.php b/beike/Admin/Http/Controllers/CustomerController.php index d1434f86..c93a4dbd 100644 --- a/beike/Admin/Http/Controllers/CustomerController.php +++ b/beike/Admin/Http/Controllers/CustomerController.php @@ -35,6 +35,10 @@ class CustomerController extends Controller 'customer_groups' => CustomerGroupDetail::collection(CustomerGroupRepo::list())->jsonSerialize(), ]; + if ($request->expectsJson()) { + return json_success('成功', $data); + } + return view('admin::pages.customers.index', $data); } diff --git a/beike/Admin/View/Components/Form/Image.php b/beike/Admin/View/Components/Form/Image.php index 122a4eda..dd51eba6 100644 --- a/beike/Admin/View/Components/Form/Image.php +++ b/beike/Admin/View/Components/Form/Image.php @@ -7,13 +7,13 @@ use Illuminate\View\Component; class Image extends Component { public string $name; - public string $image; + public string $title; public string $value; - public function __construct(string $name, ?string $image, ?string $value) + public function __construct(string $name, ?string $title, ?string $value) { $this->name = $name; - $this->image = $image ?? ''; + $this->title = $title ?? ''; $this->value = $value ?? ''; } diff --git a/public/build/beike/admin/js/app.js b/public/build/beike/admin/js/app.js index ec9a70af..40e01bd5 100644 --- a/public/build/beike/admin/js/app.js +++ b/public/build/beike/admin/js/app.js @@ -2075,7 +2075,19 @@ var base = document.querySelector('base').href; var asset = document.querySelector('meta[name="asset"]').content; var editor_language = ((_document$querySelect = document.querySelector('meta[name="editor_language"]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.content) || 'zh_cn'; $(document).on('click', '.open-file-manager', function (event) { - bk.fileManagerIframe(); + var _this = this; + + bk.fileManagerIframe(function (images) { + if (!$(_this).find('img').length) { + $(_this).append(''); + $(_this).find('i').remove(); + } else { + $(_this).find('img').prop('src', images[0].url); + } + + $(_this).next('input').val(images[0].path); + $(_this).next('input')[0].dispatchEvent(new Event('input')); + }); }); if (typeof Vue != 'undefined') { @@ -2117,7 +2129,7 @@ var tinymceInit = function tinymceInit() { height: 400, plugins: "link lists fullscreen table hr wordcount image imagetools code", menubar: "", - toolbar: "undo redo | toolbarImageButton | bold italic underline strikethrough | forecolor backcolor | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | formatpainter removeformat | charmap emoticons | preview | template link anchor table toolbarImageUrlButton | fullscreen code", + toolbar: "undo redo | toolbarImageButton | lineheight | bold italic underline strikethrough | forecolor backcolor | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | formatpainter removeformat | charmap emoticons | preview | template link anchor table toolbarImageUrlButton | fullscreen code", // contextmenu: "link image imagetools table", toolbar_items_size: 'small', image_caption: true, @@ -2166,7 +2178,6 @@ __webpack_require__.r(__webpack_exports__); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ fileManagerIframe: function fileManagerIframe(callback) { var base = document.querySelector('base').href; - var $this = $(this); layer.open({ type: 2, title: '图片管理器', @@ -2180,10 +2191,7 @@ __webpack_require__.r(__webpack_exports__); var iframeWindow = window[layerInstance.find("iframe")[0]["name"]]; iframeWindow.callback = function (images) { - if (callback && typeof callback === "function") return callback(images); - $this.find('img').prop('src', images[0].url); - $this.next('input').val(images[0].path); - $this.next('input')[0].dispatchEvent(new Event('input')); + callback(images); }; } }); diff --git a/public/build/beike/shop/default/css/app.css b/public/build/beike/shop/default/css/app.css index e5d1b1fb..ef5c4131 100644 --- a/public/build/beike/shop/default/css/app.css +++ b/public/build/beike/shop/default/css/app.css @@ -365,6 +365,10 @@ body[class^=page-account-] { background: #FD560F; } +.tinymce-format-p p { + margin-bottom: 0.5rem; +} + .steps-wrap { display: flex; justify-content: space-around; @@ -525,8 +529,8 @@ header .header-content .menu-wrap .nav-link { padding-right: 1rem; } header .header-content .logo img { - max-width: 140px; - max-height: 30px; + max-width: 180px; + max-height: 50px; } header .header-content .right-btn .nav-link { color: #333; @@ -634,13 +638,7 @@ footer .footer-content .text { color: #666666; } footer .footer-content h6 { - font-weight: bold; -} -footer .footer-content .list-unstyled { - margin-bottom: 0; -} -footer .footer-content .list-unstyled li { - line-height: 26px; + font-size: 14px; } footer .footer-bottom { height: 60px; diff --git a/public/catalog/favicon.png b/public/catalog/favicon.png new file mode 100644 index 00000000..08b4a455 Binary files /dev/null and b/public/catalog/favicon.png differ diff --git a/resources/beike/admin/js/app.js b/resources/beike/admin/js/app.js index 4c0255c5..6a520789 100644 --- a/resources/beike/admin/js/app.js +++ b/resources/beike/admin/js/app.js @@ -9,7 +9,16 @@ const asset = document.querySelector('meta[name="asset"]').content; const editor_language = document.querySelector('meta[name="editor_language"]')?.content || 'zh_cn'; $(document).on('click', '.open-file-manager', function(event) { - bk.fileManagerIframe(); + bk.fileManagerIframe(images => { + if (!$(this).find('img').length) { + $(this).append(''); + $(this).find('i').remove() + } else { + $(this).find('img').prop('src', images[0].url); + } + $(this).next('input').val(images[0].path) + $(this).next('input')[0].dispatchEvent(new Event('input')); + }); }); if (typeof Vue != 'undefined') { @@ -50,7 +59,7 @@ const tinymceInit = () => { height: 400, plugins: "link lists fullscreen table hr wordcount image imagetools code", menubar: "", - toolbar: "undo redo | toolbarImageButton | bold italic underline strikethrough | forecolor backcolor | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | formatpainter removeformat | charmap emoticons | preview | template link anchor table toolbarImageUrlButton | fullscreen code", + toolbar: "undo redo | toolbarImageButton | lineheight | bold italic underline strikethrough | forecolor backcolor | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | formatpainter removeformat | charmap emoticons | preview | template link anchor table toolbarImageUrlButton | fullscreen code", // contextmenu: "link image imagetools table", toolbar_items_size: 'small', image_caption: true, diff --git a/resources/beike/admin/js/common.js b/resources/beike/admin/js/common.js index 9cfea54b..de11e6f0 100644 --- a/resources/beike/admin/js/common.js +++ b/resources/beike/admin/js/common.js @@ -1,7 +1,6 @@ export default { fileManagerIframe(callback) { const base = document.querySelector('base').href; - const $this = $(this); layer.open({ type: 2, @@ -15,11 +14,7 @@ export default { success: function(layerInstance, index) { var iframeWindow = window[layerInstance.find("iframe")[0]["name"]]; iframeWindow.callback = function(images) { - if (callback && typeof(callback) === "function") return callback(images); - - $this.find('img').prop('src', images[0].url); - $this.next('input').val(images[0].path) - $this.next('input')[0].dispatchEvent(new Event('input')); + callback(images); } } }); diff --git a/resources/beike/admin/views/components/form/image.blade.php b/resources/beike/admin/views/components/form/image.blade.php index b3162a51..604f0bbc 100644 --- a/resources/beike/admin/views/components/form/image.blade.php +++ b/resources/beike/admin/views/components/form/image.blade.php @@ -1,12 +1,11 @@ -@if (0) -
-
- @if ($image) - + +
+ @if ($value) + @else - + @endif
-
- -@endif \ No newline at end of file + + {{ $slot }} + diff --git a/resources/beike/admin/views/pages/customers/index.blade.php b/resources/beike/admin/views/pages/customers/index.blade.php index 67a6343b..1e618837 100644 --- a/resources/beike/admin/views/pages/customers/index.blade.php +++ b/resources/beike/admin/views/pages/customers/index.blade.php @@ -1,12 +1,12 @@ @extends('admin::layouts.master') -@section('title', '顾客管理') +@section('title', '客户管理') @section('content')
- +
@@ -42,10 +42,11 @@
- {{-- {{ $customers->links('admin::vendor/pagination/bootstrap-4') }} --}} +
- @@ -82,6 +83,7 @@ el: '#customer-app', data: { + page: 1, customers: @json($customers ?? []), source: { @@ -110,11 +112,22 @@ } }, - beforeMount() { - + watch: { + page: function() { + this.loadData(); + }, }, + // mounted: function() { + // }, + methods: { + loadData() { + $http.get(`customers?page=${this.page}`).then((res) => { + this.customers = res.data.customers; + }) + }, + checkedCustomersCreate() { this.dialogCustomers.show = true }, diff --git a/resources/beike/admin/views/pages/design/builder/component/link_selector.blade.php b/resources/beike/admin/views/pages/design/builder/component/link_selector.blade.php index 8170c3d4..81a1f549 100644 --- a/resources/beike/admin/views/pages/design/builder/component/link_selector.blade.php +++ b/resources/beike/admin/views/pages/design/builder/component/link_selector.blade.php @@ -139,6 +139,10 @@ ], static: [ {name: '个人中心', value: 'account.index'}, + {name: '收藏列表', value: 'account.wishlist.index'}, + {name: '历史订单', value: 'account.order.index'}, + // {name: '最新商品', value: 'account.index'}, + {name: '品牌列表', value: 'brands.index'}, ], link: null, keyword: '', diff --git a/resources/beike/admin/views/pages/design/builder/component/rich_text_i18n.blade.php b/resources/beike/admin/views/pages/design/builder/component/rich_text_i18n.blade.php index 243d9d5d..6e87f22f 100644 --- a/resources/beike/admin/views/pages/design/builder/component/rich_text_i18n.blade.php +++ b/resources/beike/admin/views/pages/design/builder/component/rich_text_i18n.blade.php @@ -97,7 +97,7 @@ Vue.component('rich-text-i18n', { height: 300, plugins: "link lists fullscreen table hr wordcount image imagetools code", menubar: "", - toolbar: "undo redo | toolbarImageButton | bold italic underline strikethrough | forecolor backcolor | fontselect fontsizeselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | formatpainter removeformat | charmap emoticons | preview | template link anchor | code", + toolbar: "undo redo | toolbarImageButton | lineheight | bold italic underline strikethrough | forecolor backcolor | fontselect fontsizeselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | formatpainter removeformat | charmap emoticons | preview | template link anchor | code", toolbar_items_size: 'small', image_caption: true, toolbar_mode: 'wrap', 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 ecd834b1..af420a85 100644 --- a/resources/beike/admin/views/pages/design/builder/index.blade.php +++ b/resources/beike/admin/views/pages/design/builder/index.blade.php @@ -186,13 +186,13 @@ watch: {}, // 组件方法 methods: { - moduleUpdated(module) { + moduleUpdated: bk.debounce(function() { const data = this.form.modules[this.design.editingModuleIndex] $http.post('design/builder/preview?design=1', data, {hload: true}).then((res) => { $(previewWindow.document).find('#module-' + data.module_id).replaceWith(res); }) - }, + }, 300), addModuleButtonClicked(code) { const sourceModule = this.source.modules.find(e => e.code == code) diff --git a/resources/beike/admin/views/pages/setting.blade.php b/resources/beike/admin/views/pages/setting.blade.php index f46d03a1..d96cbb93 100644 --- a/resources/beike/admin/views/pages/setting.blade.php +++ b/resources/beike/admin/views/pages/setting.blade.php @@ -5,53 +5,83 @@ @section('content')
-
基础设置
@csrf - -
-
- -
默认国家设置
-
-
- -
默认省份设置
-
+ @if (session('success')) + + @endif + + +
+
+ +
+
+ +
默认国家设置
+
+
+ +
默认省份设置
+
+
+
+ + +
默认语言设置
+
+ + +
默认货币设置
+
+ + +
管理后台目录,默认为admin
+
+ + +
主题模板选择
+
+ + +
是否启用税费计算
+
+ + +
按什么地址计算税费
+
- +
+ +
网站前台显示 380*100
+
- -
默认语言设置
-
- -
默认货币设置
-
+ +
显示在浏览器选项卡上的小图标,必须为PNG格式大小为:32*32
+
- -
管理后台目录,默认为admin
-
+ +
无图片或图片未找到时显示的占位图,建议尺寸:500*500
+
+
+
- -
主题模板选择
-
- - -
是否启用税费计算
-
- - -
按什么地址计算税费
-
diff --git a/resources/beike/shop/default/css/footer.scss b/resources/beike/shop/default/css/footer.scss index ca666fea..6204c013 100644 --- a/resources/beike/shop/default/css/footer.scss +++ b/resources/beike/shop/default/css/footer.scss @@ -60,14 +60,7 @@ footer { } h6 { - font-weight: bold; - } - - .list-unstyled { - margin-bottom: 0; - li { - line-height: 26px; - } + font-size: 14px; } } diff --git a/resources/beike/shop/default/css/global.scss b/resources/beike/shop/default/css/global.scss index e386771e..f0f4799c 100644 --- a/resources/beike/shop/default/css/global.scss +++ b/resources/beike/shop/default/css/global.scss @@ -97,6 +97,12 @@ body[class^="page-account-"] { } } +.tinymce-format-p { + p { + margin-bottom: 0.5rem; + } +} + .steps-wrap { display: flex; justify-content: space-around; diff --git a/resources/beike/shop/default/css/header.scss b/resources/beike/shop/default/css/header.scss index 2102f9aa..298b6810 100644 --- a/resources/beike/shop/default/css/header.scss +++ b/resources/beike/shop/default/css/header.scss @@ -56,8 +56,8 @@ header { .logo { img { - max-width: 140px; - max-height: 30px; + max-width: 180px; + max-height: 50px; } } diff --git a/resources/lang/en/shop/account.php b/resources/lang/en/shop/account.php index e85b4b21..554ace6a 100644 --- a/resources/lang/en/shop/account.php +++ b/resources/lang/en/shop/account.php @@ -13,4 +13,12 @@ return [ 'login' => 'Login', 'new_account' => 'New Account', 'index' => 'Account', + + 'wishlist' => [ + 'index' => 'Wishlist', + ], + + 'order' => [ + 'index' => 'Order List', + ] ]; diff --git a/resources/lang/zh_cn/shop/account.php b/resources/lang/zh_cn/shop/account.php index afd7640e..6af15539 100644 --- a/resources/lang/zh_cn/shop/account.php +++ b/resources/lang/zh_cn/shop/account.php @@ -10,7 +10,14 @@ */ return [ - 'login' => 'Login', - 'new_account' => 'New Account', 'index' => '个人中心', + 'login' => '登录', + + 'wishlist' => [ + 'index' => '收藏列表', + ], + + 'order' => [ + 'index' => '订单列表', + ] ]; diff --git a/resources/lang/zh_cn/shop/brands.php b/resources/lang/zh_cn/shop/brands.php new file mode 100644 index 00000000..c76b760a --- /dev/null +++ b/resources/lang/zh_cn/shop/brands.php @@ -0,0 +1,14 @@ + + * @created 2022-08-04 10:59:15 + * @modified 2022-08-04 10:59:15 + */ + +return [ + 'index' => '品牌列表', +]; diff --git a/themes/default/layout/footer.blade.php b/themes/default/layout/footer.blade.php index 53dfaf60..a5480296 100644 --- a/themes/default/layout/footer.blade.php +++ b/themes/default/layout/footer.blade.php @@ -26,7 +26,7 @@
@@ -38,11 +38,13 @@
{{ $link['title'][$locale] }}
@@ -51,13 +53,13 @@
联系我们
    @if ($footer_content['content']['contact']['email']) -
  • {{ $footer_content['content']['contact']['email'] }}
  • +
  • {{ $footer_content['content']['contact']['email'] }}
  • @endif @if ($footer_content['content']['contact']['telephone']) -
  • {{ $footer_content['content']['contact']['telephone'] }}
  • +
  • {{ $footer_content['content']['contact']['telephone'] }}
  • @endif @if ($footer_content['content']['contact']['address']) -
  • {{ $footer_content['content']['contact']['address'] }}
  • +
  • {{ $footer_content['content']['contact']['address'] }}
  • @endif
diff --git a/themes/default/layout/header.blade.php b/themes/default/layout/header.blade.php index 5f12cc84..43f0afdd 100644 --- a/themes/default/layout/header.blade.php +++ b/themes/default/layout/header.blade.php @@ -44,8 +44,9 @@