This commit is contained in:
pushuo 2022-07-05 10:29:09 +08:00
parent b68c1e91c5
commit ea53ca1810
4 changed files with 17 additions and 3 deletions

View File

@ -644,10 +644,14 @@ body.page-checkout .radio-line-wrap .radio-line-item {
display: flex;
align-items: center;
cursor: pointer;
padding: 20px;
}
body.page-checkout .radio-line-wrap .radio-line-item:not(:last-of-type) {
margin-bottom: 1rem;
}
body.page-checkout .radio-line-wrap .radio-line-item.active {
border: 1px solid #e5e5e5;
}
body.page-checkout .radio-line-wrap .radio-line-item .left {
margin-right: 10px;
display: flex;

View File

@ -201,10 +201,20 @@ body.page-checkout {
display: flex;
align-items: center;
cursor: pointer;
padding: 20px;
&:not(:last-of-type) {
margin-bottom: 1rem;
}
&:hover {
}
&.active {
border: 1px solid #e5e5e5;
}
.left {
margin-right: 10px;
display: flex;

View File

@ -144,7 +144,7 @@
}
$http.post(url, _data).then((res) => {
this.$message.success(res.data.message);
this.$message.success(res.message);
location = "{{ shop_route('account.index') }}"
})
});

View File

@ -51,7 +51,7 @@
<div class="checkout-black">
<h5 class="checkout-title">支付方式</h5>
<div class="radio-line-wrap">
<div class="radio-line-item" v-for="payment, index in source.payment_methods" :key="index" @click="updateCheckout(payment.code, 'payment_method_code')">
<div :class="['radio-line-item', payment.code == form.payment_method_code ? 'active' : '']" v-for="payment, index in source.payment_methods" :key="index" @click="updateCheckout(payment.code, 'payment_method_code')">
<div class="left">
<input name="payment" type="radio" v-model="form.payment_method_code" :value="payment.code" :id="'payment-method-' + index" class="form-check-input">
<img :src="payment.icon" class="img-fluid">
@ -67,7 +67,7 @@
<div class="checkout-black">
<h5 class="checkout-title">配送方式</h5>
<div class="radio-line-wrap">
<div class="radio-line-item" v-for="shipping, index in source.shipping_methods" :key="index" @click="updateCheckout(shipping.code, 'shipping_method_code')">
<div :class="['radio-line-item', shipping.code == form.shipping_method_code ? 'active' : '']" v-for="shipping, index in source.shipping_methods" :key="index" @click="updateCheckout(shipping.code, 'shipping_method_code')">
<div class="left">
<input name="shipping" type="radio" v-model="form.shipping_method_code" :value="shipping.code" :id="'shipping-method-' + index" class="form-check-input">
<img :src="shipping.icon" class="img-fluid">