Commit cd18a063 authored by Xuguangxing's avatar Xuguangxing

feat: 确认订单连点

parent ee40dfe8
......@@ -42,7 +42,6 @@ export default {
},
orderSubmit(data) {
console.log(encryption(data), JSON.stringify(encryption(data)));
return http.post(`${talosHost}/api/kdsp/order-info/e/hundredGroupSubmit`, encryption(data));
},
// 物流公司列表
......
......@@ -192,7 +192,8 @@ export default {
},
// 点击立即下单
async handleBuy() {
handleBuy() {
this.$store.dispatch('change_loading', true);
if (!this.orderInfo.addrReceiverInfo?.addrReceiverId) {
this.$dialog({
closeOnClickOverlay: true,
......@@ -203,28 +204,33 @@ export default {
this.handleToAddress();
}
});
this.$store.dispatch('change_loading', false);
return;
}
saTrackEvent('H5_UserClickOrderConfirmPageSubmitOrderBtnClick', {
order_type: '0元购'
});
const {
addrReceiverInfo: { addrReceiverId: receiverId },
calcFeeInfo: { totalFreightFee, totalPayFee: totalFee },
shopSkuList
} = this.orderInfo;
const params = {
receiverId,
totalFreightFee,
totalFee,
activityId: localStorage.get('templateId') || '',
activityHundredGroupId: localStorage.get('groupBuyGroupId') || '',
skuList: shopSkuList.map(item => {
const { skuId: skuNo, count } = item;
return { skuNo, count };
})
};
this.orderSubmit(params);
try {
const {
addrReceiverInfo: { addrReceiverId: receiverId },
calcFeeInfo: { totalFreightFee, totalPayFee: totalFee },
shopSkuList
} = this.orderInfo;
const params = {
receiverId,
totalFreightFee,
totalFee,
activityId: localStorage.get('templateId') || '',
activityHundredGroupId: localStorage.get('groupBuyGroupId') || '',
skuList: shopSkuList.map(item => {
const { skuId: skuNo, count } = item;
return { skuNo, count };
})
};
this.orderSubmit(params);
} catch (e) {
this.$store.dispatch('change_loading', false);
}
},
async orderSubmit(params) {
console.log(params);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment