diff --git a/beike/Shop/Http/Resources/ProductSimple.php b/beike/Shop/Http/Resources/ProductSimple.php
index 841e6958..02cca8b0 100644
--- a/beike/Shop/Http/Resources/ProductSimple.php
+++ b/beike/Shop/Http/Resources/ProductSimple.php
@@ -41,7 +41,7 @@ class ProductSimple extends JsonResource
'id' => $this->id,
'sku_id' => $masterSku->id,
'name' => $name,
- 'name_format' => sub_string($name, 36),
+ 'name_format' => $name,
'url' => shop_route('products.show', ['product' => $this]),
'price' => $masterSku->price,
'origin_price' => $masterSku->origin_price,
diff --git a/resources/beike/admin/views/pages/orders/form.blade.php b/resources/beike/admin/views/pages/orders/form.blade.php
index e8bdf01c..645ab940 100644
--- a/resources/beike/admin/views/pages/orders/form.blade.php
+++ b/resources/beike/admin/views/pages/orders/form.blade.php
@@ -89,6 +89,10 @@
+ @foreach ($html_items as $item)
+ {!! $item !!}
+ @endforeach
+
@can('orders_update_status')
diff --git a/resources/beike/shop/default/css/page-checkout.scss b/resources/beike/shop/default/css/page-checkout.scss
index e2a25867..aabf99f4 100644
--- a/resources/beike/shop/default/css/page-checkout.scss
+++ b/resources/beike/shop/default/css/page-checkout.scss
@@ -15,17 +15,45 @@ body.page-checkout {
align-items: center;
cursor: pointer;
padding: 20px;
+ border: 1px solid transparent;
&:not(:last-of-type) {
margin-bottom: 1rem;
}
&:hover {
+ border-color: #e5e5e5;
+ }
+ &:active {
+ background-color: #f7f7f7;
}
&.active {
- border: 1px solid #e5e5e5;
+ border-color: #e5e5e5;
+
+ .radio {
+ border-color: $primary;
+
+ &:before {
+ content: '';
+ position: absolute;
+ width: 12px;
+ height: 12px;
+ background-color: $primary;
+ left: 2px;
+ top: 2px;
+ border-radius: 50%;
+ }
+ }
+ }
+
+ .radio {
+ position: relative;
+ width: 18px;
+ height: 18px;
+ border: 1px solid #d4d4d4;
+ border-radius: 50%;
}
.left {
diff --git a/resources/beike/shop/default/css/product-style.scss b/resources/beike/shop/default/css/product-style.scss
index a8400325..78a81130 100644
--- a/resources/beike/shop/default/css/product-style.scss
+++ b/resources/beike/shop/default/css/product-style.scss
@@ -51,10 +51,12 @@
}
.product-name {
- margin-bottom: 6px;
+ height: 39px;
+ margin-bottom: 10px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
+ color: #3d3d3d;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
@@ -62,6 +64,7 @@
.product-price {
.price-new {
color: $primary;
+ font-size: 1.1rem;
font-weight: bold;
}
diff --git a/themes/default/account/address.blade.php b/themes/default/account/address.blade.php
index b23d98ed..1a77b6bd 100644
--- a/themes/default/account/address.blade.php
+++ b/themes/default/account/address.blade.php
@@ -40,7 +40,7 @@
v-if="address.default">{{ __('shop/account.addresses.default_address') }}
@@ -57,88 +57,35 @@
- @include('shared.address-form', [
- 'address_form_key' => 'form',
- 'address_form_show' => 'editShow',
- 'address_form_rules' => 'rules',
- ])
+
@endsection
@push('add-scripts')
+ @include('shared.address-form')
+
+ $http.post('/checkout/confirm').then((res) => {
+ location = 'orders/' + res.number + '/success?type=create'
+ })
+ });
+ });
+
+ var app = new Vue({
+ el: '#checkout-app',
+
+ data: {
+ form: {
+ shipping_address_id: @json($current['shipping_address_id']),
+ payment_address_id: @json($current['payment_address_id']),
+ },
+
+ isAllAddress: false,
+ isAllAddressPayment: false,
+
+ source: {
+ addresses: @json($addresses ?? []),
+ },
+
+ dialogAddress: {
+ index: null,
+ type: 'shipping_address_id',
+ },
+ },
+
+ computed: {
+ same_as_shipping_address: {
+ get() {
+ return this.form.shipping_address_id == this.form.payment_address_id
+ },
+
+ set(e) {
+ if (e) {
+ this.form.payment_address_id = this.form.shipping_address_id
+ this.updateCheckout(this.form.payment_address_id, 'same_as_shipping_address')
+ } else {
+ this.form.payment_address_id = '';
+ }
+ }
+ },
+ },
+
+ methods: {
+ editAddress(index, type) {
+ let addresses = null
+
+ if (typeof index == 'number') {
+ this.dialogAddress.index = index;
+
+ addresses = JSON.parse(JSON.stringify(this.source.addresses[index]))
+ }
+
+ this.dialogAddress.type = type
+ this.$refs['address-dialog'].editAddress(addresses)
+ },
+
+ onAddressDialogChange(form) {
+ if (this.source.addresses.find(e => e.id == form.id)) {
+ this.source.addresses[this.dialogAddress.index] = form
+ } else {
+ this.source.addresses.push(form)
+ this.updateCheckout(form.id, this.dialogAddress.type)
+ this.form[this.dialogAddress.type] = form.id
+ }
+
+ this.dialogAddress.index = null;
+ this.$forceUpdate()
+ },
+
+ updateCheckout(id, key) {
+ if (this.form[key] === id && key != 'same_as_shipping_address') {
+ return
+ }
+
+ if (key == 'shipping_address_id' && this.same_as_shipping_address) {
+ this.form.payment_address_id = id
+ }
+
+ this.form[key] = id
+
+ $http.put('/checkout', this.form).then((res) => {
+ this.form = res.current
+ this.source.totals = res.totals
+
+ this.isAllAddress = false
+ this.isAllAddressPayment = false
+ })
+ },
+ }
+ })
+
@endpush
diff --git a/themes/default/layout/header.blade.php b/themes/default/layout/header.blade.php
index 3d2304fd..b833589f 100644
--- a/themes/default/layout/header.blade.php
+++ b/themes/default/layout/header.blade.php
@@ -81,7 +81,7 @@
{{ current_customer()->name }}
-
+
{{ __('shop/account.index') }}
@@ -90,7 +90,7 @@
{{ __('shop/account.wishlist.index') }}
-
+
{{ __('common.sign_out') }}
diff --git a/themes/default/shared/address-form.blade.php b/themes/default/shared/address-form.blade.php
index 6f95bef4..e37c101e 100644
--- a/themes/default/shared/address-form.blade.php
+++ b/themes/default/shared/address-form.blade.php
@@ -1,62 +1,183 @@
-@php
- $address_form_show = $address_form_show ?? 'dialogAddress.show';
- $address_form_key = $address_form_key ?? 'dialogAddress.form';
- $address_form_rules = $address_form_rules ?? 'addressRules';
-@endphp
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ __('common.save') }}
+ {{ __('common.cancel') }}
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ __('common.save') }}
- {{ __('common.cancel') }}
-
-
-
\ No newline at end of file
+
\ No newline at end of file