diff --git a/public/build/beike/shop/default/js/app.js b/public/build/beike/shop/default/js/app.js index 6a097c50..599dbf23 100644 --- a/public/build/beike/shop/default/js/app.js +++ b/public/build/beike/shop/default/js/app.js @@ -2165,8 +2165,9 @@ __webpack_require__.r(__webpack_exports__); }).then(function (res) { layer.msg(res.message); $btn.attr('data-in-wishlist', res.data.id); - })["finally"](function (e) { $btn.html(btnHtml).prop('disabled', false).find('i.bi').prop('class', 'bi bi-heart-fill'); + })["catch"](function (e) { + $btn.html(btnHtml).prop('disabled', false); }); } }, diff --git a/resources/beike/shop/default/js/common.js b/resources/beike/shop/default/js/common.js index d85d019f..6203a95c 100644 --- a/resources/beike/shop/default/js/common.js +++ b/resources/beike/shop/default/js/common.js @@ -78,8 +78,9 @@ export default { $http.post('account/wishlist', {product_id: id}, {hload: true}).then((res) => { layer.msg(res.message) $btn.attr('data-in-wishlist', res.data.id); - }).finally((e) => { $btn.html(btnHtml).prop('disabled', false).find('i.bi').prop('class', 'bi bi-heart-fill') + }).catch((e) => { + $btn.html(btnHtml).prop('disabled', false) }) } }, diff --git a/themes/default/account/account.blade.php b/themes/default/account/account.blade.php index 00f07d2c..fb065c3e 100644 --- a/themes/default/account/account.blade.php +++ b/themes/default/account/account.blade.php @@ -13,12 +13,14 @@
- +
@if (\Session::has('success'))
-
  • {!! \Session::get('success') !!}
+
    +
  • {!! \Session::get('success') !!}
  • +
@endif
-
-
-
您还没有订单!去下单
-
-
+ @if (!$latest_orders) +
+
+
您还没有订单!去下单
+
+ @else + {{--

近期订单

--}} +
    + + + @foreach ($latest_orders as $order) + + + + + - @foreach ($latest_orders as $order) - - - - - - @foreach ($order->orderProducts as $product) - - - @if ($loop->first) - - - - @endif + - @endforeach - - @endforeach + @endforeach + +
    +
    + @foreach ($order->orderProducts as $product) + + @endforeach +
    +
    +
    订单号:{{ $order->number }} 共 {{ count($order->orderProducts) }} 件商品
    +
    下单时间:{{ $order->created_at }}
    +
    + 状态:{{ $order->status }} + + 金额:{{ $order->total }} +
    - {{ $order->created_at }} - 订单号:{{ $order->number }} -
    -
    -
    -
    - {{ $product->name }} -
    -
    {{ $product->quantity }}
    -
    -
    {{ $order->total }}{{ $order->status }} - 查看 - + 查看详情 +
    + {{-- @foreach ($latest_orders as $order) +
    +
    +
    + @foreach ($order->orderProducts as $product) + + @endforeach +
    +
    +
    + 订单号:{{ $order->number }} + 状态:{{ $order->status }} + 金额:{{ $order->total }} +
    +
    下单时间:{{ $order->created_at }}
    +
    +
    + 查看详情 +
    + @endforeach --}} +
+ @endif +
diff --git a/themes/default/layout/master.blade.php b/themes/default/layout/master.blade.php index c013ab49..157945a1 100644 --- a/themes/default/layout/master.blade.php +++ b/themes/default/layout/master.blade.php @@ -25,6 +25,10 @@ @include('layout.footer') + + @stack('add-scripts')