Commit ca1e1cac authored by beisir's avatar beisir

Merge branch 'feat/group-buy' of git.quantgroup.cn:ui/group-buy-ui into feat/group-buy

parents 4683e2ec 0fe96356
...@@ -368,7 +368,7 @@ body { ...@@ -368,7 +368,7 @@ body {
left: 0; left: 0;
display: flex; display: flex;
width: 100%; width: 100%;
background-image: #fff url('https://img.lkbang.net/activity/share/default/skuInfoBg.png'); background: #fff url('https://img.lkbang.net/activity/share/default/skuInfoBg.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
} }
......
...@@ -66,7 +66,6 @@ export default { ...@@ -66,7 +66,6 @@ export default {
const addressList = { ...e, noAddr: true }; const addressList = { ...e, noAddr: true };
localStorage.set('addressList', addressList); localStorage.set('addressList', addressList);
this.$router.go(-1); // 返回上一页 this.$router.go(-1); // 返回上一页
// this.$router.push({ name: 'createOrder' });
}, },
toAdd() { toAdd() {
this.$router.push({ name: 'addressManage' }); this.$router.push({ name: 'addressManage' });
......
...@@ -279,7 +279,7 @@ export default { ...@@ -279,7 +279,7 @@ export default {
localStorage.remove('orderData'); localStorage.remove('orderData');
localStorage.set('templateId', this.detailParam.templateId); // 设置活动模板id,用于下单 localStorage.set('templateId', this.detailParam.templateId); // 设置活动模板id,用于下单
if (this.detailParam.groupBuyGroupId) { if (this.detailParam.groupBuyGroupId) {
localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单 // localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单
this.groupId = +this.detailParam.groupBuyGroupId; this.groupId = +this.detailParam.groupBuyGroupId;
} else { } else {
localStorage.remove('groupBuyGroupId'); localStorage.remove('groupBuyGroupId');
...@@ -369,7 +369,7 @@ export default { ...@@ -369,7 +369,7 @@ export default {
sku_no: this.detailInfo.skuNo, sku_no: this.detailInfo.skuNo,
buttons_name: buttonNameMap[res] buttons_name: buttonNameMap[res]
}); });
this.toOrder(); this.toOrder(res);
}, },
setStartStatus(data) { setStartStatus(data) {
const currentTime = new Date(data.currentTime.replace(/\-/g, '/')).getTime(); const currentTime = new Date(data.currentTime.replace(/\-/g, '/')).getTime();
...@@ -403,7 +403,7 @@ export default { ...@@ -403,7 +403,7 @@ export default {
// canJoinGroupBuyAgain groupStatus // canJoinGroupBuyAgain groupStatus
try { try {
if (res.groupBuyInfo?.groupId) { if (res.groupBuyInfo?.groupId) {
localStorage.set('groupBuyGroupId', res.groupBuyInfo.groupId || ''); // 设置groupBuyGroupId,用于下单 // localStorage.set('groupBuyGroupId', res.groupBuyInfo.groupId || ''); // 设置groupBuyGroupId,用于下单
this.groupId = +res.groupBuyInfo.groupId || 0; this.groupId = +res.groupBuyInfo.groupId || 0;
} }
if (res.groupBuyInfo?.joinGroup) { if (res.groupBuyInfo?.joinGroup) {
...@@ -494,7 +494,7 @@ export default { ...@@ -494,7 +494,7 @@ export default {
this.show = false; this.show = false;
this.$router.push({ name: 'addressManage' }); this.$router.push({ name: 'addressManage' });
}, },
toOrder() { toOrder(type) {
if (!this.hasLogin) { if (!this.hasLogin) {
this.checkLogin(); this.checkLogin();
return; return;
...@@ -518,7 +518,18 @@ export default { ...@@ -518,7 +518,18 @@ export default {
}; };
localStorage.set('orderData', order); localStorage.set('orderData', order);
localStorage.remove('addressList'); localStorage.remove('addressList');
this.$router.push({ name: 'createOrder' });
// const buttonNameMap = {
// 3: '立即参团',
// 1: '立即开团',
// 2: '自己做团长'
// };
const query = {};
localStorage.set('groupBuyGroupId', type == 3 ? this.groupId : '');
this.$router.push({
name: 'createOrder',
query
});
}, },
changeAddress(address) { changeAddress(address) {
// 选取规格需要清空,init会重新赋值 // 选取规格需要清空,init会重新赋值
......
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
this.detailParam = { ...this.$route.query }; this.detailParam = { ...this.$route.query };
localStorage.set('templateId', this.detailParam.templateId); // 设置活动模板id,用于下单 localStorage.set('templateId', this.detailParam.templateId); // 设置活动模板id,用于下单
if (this.detailParam.groupBuyGroupId) { if (this.detailParam.groupBuyGroupId) {
localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单 // localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单
this.groupId = +this.detailParam.groupBuyGroupId; this.groupId = +this.detailParam.groupBuyGroupId;
} else { } else {
localStorage.remove('groupBuyGroupId'); localStorage.remove('groupBuyGroupId');
...@@ -211,7 +211,7 @@ export default { ...@@ -211,7 +211,7 @@ export default {
async init(detailParam) { async init(detailParam) {
const [res] = await goods.detailInfo(detailParam); const [res] = await goods.detailInfo(detailParam);
if (res.groupBuyInfo.groupId) { if (res.groupBuyInfo.groupId) {
localStorage.set('groupBuyGroupId', res.groupBuyInfo.groupId || ''); // 设置groupBuyGroupId,用于下单 // localStorage.set('groupBuyGroupId', res.groupBuyInfo.groupId || ''); // 设置groupBuyGroupId,用于下单
this.groupId = +res.groupBuyInfo.groupId || ''; this.groupId = +res.groupBuyInfo.groupId || '';
} }
if (res.saleCount && res.activitySkuTotalCount) { if (res.saleCount && res.activitySkuTotalCount) {
......
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