优化 chekcout 数据更新
This commit is contained in:
parent
42b86f3cec
commit
126755cf89
|
|
@ -171,9 +171,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="totals">
|
<ul class="totals">
|
||||||
@foreach ($totals as $total)
|
<li v-for="total, index in source.totals" :key="index"><span>@{{ total.title }}</span><span>@{{ total.amount_format }}</span></li>
|
||||||
<li><span>{{ $total['title'] }}</span><span>{{ $total['amount_format'] }}</span></li>
|
|
||||||
@endforeach
|
|
||||||
</ul>
|
</ul>
|
||||||
<div class="d-grid gap-2 mt-3">
|
<div class="d-grid gap-2 mt-3">
|
||||||
<button class="btn btn-primary" type="button" :disabled="!isSubmit"
|
<button class="btn btn-primary" type="button" :disabled="!isSubmit"
|
||||||
|
|
@ -211,6 +209,7 @@
|
||||||
shipping_methods: @json($shipping_methods ?? []),
|
shipping_methods: @json($shipping_methods ?? []),
|
||||||
payment_methods: @json($payment_methods ?? []),
|
payment_methods: @json($payment_methods ?? []),
|
||||||
carts: @json($carts ?? null),
|
carts: @json($carts ?? null),
|
||||||
|
totals: @json($totals ?? []),
|
||||||
zones: []
|
zones: []
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -373,6 +372,8 @@
|
||||||
|
|
||||||
$http.put('/checkout', this.form).then((res) => {
|
$http.put('/checkout', this.form).then((res) => {
|
||||||
this.form = res.current
|
this.form = res.current
|
||||||
|
this.source.totals = res.totals
|
||||||
|
|
||||||
this.isAllAddress = false
|
this.isAllAddress = false
|
||||||
this.isAllAddressPayment = false
|
this.isAllAddressPayment = false
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue