Commit de15c17f authored by Xuguangxing's avatar Xuguangxing

feat: 点击参团或者开团的时候校验该用户拼团状态

parent 8493259e
......@@ -8,6 +8,9 @@ export default {
detailInfo: params => {
return http.post(`${talosHost}/api/kdsp/activity/activity-goods-special/detail`, { ...params });
},
checkGroupBuyCreateOrder: params => {
return http.post(`${talosHost}/api/kdsp/checkCanOpenJoinGroup`, { ...params });
},
// 详情图片
getDetailPic: url => {
return http.get(url, { strategy: 'default', hideLoading: 1, skip: 1, hideToast: 1 });
......
......@@ -463,7 +463,7 @@ export default {
this.show = false;
this.$router.push({ name: 'addressManage' });
},
toOrder() {
async toOrder() {
if (!this.hasLogin) {
this.checkLogin();
return;
......@@ -472,6 +472,17 @@ export default {
this.$toast('库存不足!');
return;
}
try {
const [checkStatus] = await goods.checkGroupBuyCreateOrder({
activityHundredGroupId: this.groupId || '',
skuNo: this.detailInfo.skuNo
});
if (!checkStatus.verifyResult) {
// 校验是否允许开团或者参团
this.$toast(checkStatus.failedReason);
return;
}
} catch (e) {}
this.show = false;
const order = {
groupId: this.groupId || '', // 唐峰确认订单页加
......
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