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)
-