|
@@ -32,6 +32,7 @@ import PromotionsDetails from "./PromotionsDetails";
|
|
|
import CheckoutVipPlus from "./VipPlus/CheckoutVipPlus";
|
|
import CheckoutVipPlus from "./VipPlus/CheckoutVipPlus";
|
|
|
import CheckoutProducts from "./CheckoutProducts/CheckoutProducts";
|
|
import CheckoutProducts from "./CheckoutProducts/CheckoutProducts";
|
|
|
import CheckoutCoupon from "./CheckoutCoupon/CheckoutCoupon";
|
|
import CheckoutCoupon from "./CheckoutCoupon/CheckoutCoupon";
|
|
|
|
|
+import LostInsurance from "./LostInsurance/LostInsurance";
|
|
|
/***
|
|
/***
|
|
|
* 保存完地址之后要重新获取运输方式和支付方式
|
|
* 保存完地址之后要重新获取运输方式和支付方式
|
|
|
* 变更运输方式后重新获取支付方式
|
|
* 变更运输方式后重新获取支付方式
|
|
@@ -127,11 +128,11 @@ export default function CheckoutWrapper({
|
|
|
|
|
|
|
|
overlayLoading.start();
|
|
overlayLoading.start();
|
|
|
const saveRes = await saveCheckoutCart({
|
|
const saveRes = await saveCheckoutCart({
|
|
|
- shippingMethod: '-1',
|
|
|
|
|
|
|
+ // shippingMethod: '-1',
|
|
|
paymentMethod: method,
|
|
paymentMethod: method,
|
|
|
- couponCode: '-1',
|
|
|
|
|
- giftCardNumber: '-1',
|
|
|
|
|
- memberDiscount: '-1'
|
|
|
|
|
|
|
+ // couponCode: '-1',
|
|
|
|
|
+ // giftCardNumber: '-1',
|
|
|
|
|
+ // memberDiscount: '-1'
|
|
|
});
|
|
});
|
|
|
overlayLoading.stop();
|
|
overlayLoading.stop();
|
|
|
if(!saveRes.error) {
|
|
if(!saveRes.error) {
|
|
@@ -151,10 +152,10 @@ export default function CheckoutWrapper({
|
|
|
overlayLoading.start();
|
|
overlayLoading.start();
|
|
|
const saveRes = await saveCheckoutCart({
|
|
const saveRes = await saveCheckoutCart({
|
|
|
shippingMethod: method,
|
|
shippingMethod: method,
|
|
|
- paymentMethod: '-1',
|
|
|
|
|
- couponCode: '-1',
|
|
|
|
|
- giftCardNumber: '-1',
|
|
|
|
|
- memberDiscount: '-1'
|
|
|
|
|
|
|
+ // paymentMethod: '-1',
|
|
|
|
|
+ // couponCode: '-1',
|
|
|
|
|
+ // giftCardNumber: '-1',
|
|
|
|
|
+ // memberDiscount: '-1'
|
|
|
});
|
|
});
|
|
|
overlayLoading.stop();
|
|
overlayLoading.stop();
|
|
|
if(!saveRes.error) {
|
|
if(!saveRes.error) {
|
|
@@ -224,11 +225,11 @@ export default function CheckoutWrapper({
|
|
|
if(cartData.paymentMethod === null) {
|
|
if(cartData.paymentMethod === null) {
|
|
|
const pmethod = methodPaymentRef.current.getSelectPaymentMethod();
|
|
const pmethod = methodPaymentRef.current.getSelectPaymentMethod();
|
|
|
const saveRes = await saveCheckoutCart({
|
|
const saveRes = await saveCheckoutCart({
|
|
|
- shippingMethod: '-1',
|
|
|
|
|
|
|
+ // shippingMethod: '-1',
|
|
|
paymentMethod: pmethod,
|
|
paymentMethod: pmethod,
|
|
|
- couponCode: '-1',
|
|
|
|
|
- giftCardNumber: '-1',
|
|
|
|
|
- memberDiscount: '-1'
|
|
|
|
|
|
|
+ // couponCode: '-1',
|
|
|
|
|
+ // giftCardNumber: '-1',
|
|
|
|
|
+ // memberDiscount: '-1'
|
|
|
});
|
|
});
|
|
|
if(!saveRes.error) {
|
|
if(!saveRes.error) {
|
|
|
if(saveRes.data) {
|
|
if(saveRes.data) {
|
|
@@ -354,6 +355,14 @@ export default function CheckoutWrapper({
|
|
|
onShipMethodChange={handleShippingMethodChange}
|
|
onShipMethodChange={handleShippingMethodChange}
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ {cartData.shippingInsuranceEnabled &&
|
|
|
|
|
+ <div className="mt-3 box-border px-4">
|
|
|
|
|
+ <LostInsurance
|
|
|
|
|
+ cartData={cartData}
|
|
|
|
|
+ onSwitchInsurance={onCartDataChange}
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ }
|
|
|
<div className="mt-6 box-border px-4">
|
|
<div className="mt-6 box-border px-4">
|
|
|
<CheckoutCoupon
|
|
<CheckoutCoupon
|
|
|
couponCode={cartData.couponCode || ''}
|
|
couponCode={cartData.couponCode || ''}
|