diff --git a/.gitignore b/.gitignore index b301a2af..f9ca9812 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ /node_modules /public/hot /public/storage +/public/upload/avatar /storage/*.key /vendor .env diff --git a/beike/Shop/Http/Controllers/Account/EditController.php b/beike/Shop/Http/Controllers/Account/EditController.php index e3babed9..986b8a75 100644 --- a/beike/Shop/Http/Controllers/Account/EditController.php +++ b/beike/Shop/Http/Controllers/Account/EditController.php @@ -1,11 +1,4 @@ - * @Date 2022-08-10 15:05:22 - * @LastEditTime 2022-08-10 15:17:43 - */ /** * AccountController.php * diff --git a/beike/Shop/Http/Requests/EditRequest.php b/beike/Shop/Http/Requests/EditRequest.php index 9ff6810d..de57ced6 100644 --- a/beike/Shop/Http/Requests/EditRequest.php +++ b/beike/Shop/Http/Requests/EditRequest.php @@ -25,7 +25,7 @@ class EditRequest extends FormRequest { return [ 'name' => 'required', - 'email' => 'required|email:rfc,dns|unique:customers,email', + // 'email' => 'required|email:rfc,dns|unique:customers,email', ]; } diff --git a/beike/Shop/Providers/ShopServiceProvider.php b/beike/Shop/Providers/ShopServiceProvider.php index f9212877..aeec445f 100644 --- a/beike/Shop/Providers/ShopServiceProvider.php +++ b/beike/Shop/Providers/ShopServiceProvider.php @@ -12,6 +12,7 @@ use Illuminate\Support\Facades\View; use Illuminate\Support\Facades\Config; use Illuminate\Support\ServiceProvider; use Beike\Shop\View\Components\AccountSidebar; +use Beike\Shop\View\Components\Alert; class ShopServiceProvider extends ServiceProvider { @@ -83,6 +84,7 @@ class ShopServiceProvider extends ServiceProvider { $this->loadViewComponentsAs('shop', [ 'sidebar' => AccountSidebar::class, + 'alert' => Alert::class, ]); } } diff --git a/beike/Shop/View/Components/alert.php b/beike/Shop/View/Components/alert.php new file mode 100644 index 00000000..be6c2454 --- /dev/null +++ b/beike/Shop/View/Components/alert.php @@ -0,0 +1,22 @@ +type = $type; + $this->msg = $msg; + } + + public function render() + { + return view('components.alert'); + } +} diff --git a/public/build/beike/shop/default/css/app.css b/public/build/beike/shop/default/css/app.css index 106fedf5..6f0b511a 100644 --- a/public/build/beike/shop/default/css/app.css +++ b/public/build/beike/shop/default/css/app.css @@ -618,11 +618,6 @@ footer .footer-content a { footer .footer-content a:hover { color: #fd560f; } -@media (min-width: 768px) { - footer .footer-content .footer-content-left { - width: 76%; - } -} footer .footer-content .logo { max-width: 150px; margin-bottom: 20px; diff --git a/resources/beike/admin/views/pages/design/builder/footer.blade.php b/resources/beike/admin/views/pages/design/builder/footer.blade.php index 97dd1efe..f2724a6a 100644 --- a/resources/beike/admin/views/pages/design/builder/footer.blade.php +++ b/resources/beike/admin/views/pages/design/builder/footer.blade.php @@ -81,7 +81,7 @@ @for ($i = 1; $i <= 3; $i++) - +
配置标题
@@ -97,7 +97,7 @@ - +
@@ -106,7 +106,7 @@
@endfor - +
联系电话
@@ -121,7 +121,7 @@
- +
版权设置
diff --git a/resources/beike/shop/default/css/footer.scss b/resources/beike/shop/default/css/footer.scss index f46096c3..ca666fea 100644 --- a/resources/beike/shop/default/css/footer.scss +++ b/resources/beike/shop/default/css/footer.scss @@ -50,12 +50,6 @@ footer { } } - .footer-content-left { - @media (min-width: 768px) { - width: 76%; - } - } - .logo { max-width: 150px; margin-bottom: 20px; diff --git a/themes/default/account/edit.blade.php b/themes/default/account/edit.blade.php index 22886171..0d577e39 100644 --- a/themes/default/account/edit.blade.php +++ b/themes/default/account/edit.blade.php @@ -31,7 +31,7 @@ {{ method_field('put') }} @if (session('success')) - @include('shared.form-msg', ['msg' => session('success')]) + @endif
@@ -40,7 +40,8 @@
上传JPG或PNG图片。建议300 x 300。
@@ -49,16 +50,18 @@
- + + @if ($errors->has('name')) + {{ $errors->first('name') }} + @endif
- + + @if ($errors->has('email')) + {{ $errors->first('email') }} + @endif
- {{--
- - -
--}}
@@ -148,14 +151,15 @@ height: 200, }); initialAvatarURL = avatar.src; - avatar.src = canvas.toDataURL(); + // avatar.src = canvas.toDataURL(); canvas.toBlob(function (blob) { var formData = new FormData(); formData.append('file', blob, 'avatar.png'); formData.append('type', 'avatar'); $http.post('{{ shop_route('file.store') }}', formData).then(res => { - console.log(res); + $('#avatar').attr('src', res.data.url); + $('#avatar-input').val(res.data.value) }) }); } diff --git a/themes/default/components/alert.blade.php b/themes/default/components/alert.blade.php new file mode 100644 index 00000000..9ab92d72 --- /dev/null +++ b/themes/default/components/alert.blade.php @@ -0,0 +1,5 @@ +
+ + {{ $msg }} + +
\ No newline at end of file diff --git a/themes/default/layout/footer.blade.php b/themes/default/layout/footer.blade.php index 7e4e6d36..60f45f4f 100644 --- a/themes/default/layout/footer.blade.php +++ b/themes/default/layout/footer.blade.php @@ -22,44 +22,41 @@