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 {
left: 0;
display: flex;
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-size: cover;
}
......
......@@ -66,7 +66,6 @@ export default {
const addressList = { ...e, noAddr: true };
localStorage.set('addressList', addressList);
this.$router.go(-1); // 返回上一页
// this.$router.push({ name: 'createOrder' });
},
toAdd() {
this.$router.push({ name: 'addressManage' });
......
......@@ -279,7 +279,7 @@ export default {
localStorage.remove('orderData');
localStorage.set('templateId', this.detailParam.templateId); // 设置活动模板id,用于下单
if (this.detailParam.groupBuyGroupId) {
localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单
// localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单
this.groupId = +this.detailParam.groupBuyGroupId;
} else {
localStorage.remove('groupBuyGroupId');
......@@ -369,7 +369,7 @@ export default {
sku_no: this.detailInfo.skuNo,
buttons_name: buttonNameMap[res]
});
this.toOrder();
this.toOrder(res);
},
setStartStatus(data) {
const currentTime = new Date(data.currentTime.replace(/\-/g, '/')).getTime();
......@@ -403,7 +403,7 @@ export default {
// canJoinGroupBuyAgain groupStatus
try {
if (res.groupBuyInfo?.groupId) {
localStorage.set('groupBuyGroupId', res.groupBuyInfo.groupId || ''); // 设置groupBuyGroupId,用于下单
// localStorage.set('groupBuyGroupId', res.groupBuyInfo.groupId || ''); // 设置groupBuyGroupId,用于下单
this.groupId = +res.groupBuyInfo.groupId || 0;
}
if (res.groupBuyInfo?.joinGroup) {
......@@ -494,7 +494,7 @@ export default {
this.show = false;
this.$router.push({ name: 'addressManage' });
},
toOrder() {
toOrder(type) {
if (!this.hasLogin) {
this.checkLogin();
return;
......@@ -518,7 +518,18 @@ export default {
};
localStorage.set('orderData', order);
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) {
// 选取规格需要清空,init会重新赋值
......
......@@ -165,7 +165,7 @@ export default {
this.detailParam = { ...this.$route.query };
localStorage.set('templateId', this.detailParam.templateId); // 设置活动模板id,用于下单
if (this.detailParam.groupBuyGroupId) {
localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单
// localStorage.set('groupBuyGroupId', this.detailParam.groupBuyGroupId); // 设置groupBuyGroupId,用于下单
this.groupId = +this.detailParam.groupBuyGroupId;
} else {
localStorage.remove('groupBuyGroupId');
......@@ -211,7 +211,7 @@ export default {
async init(detailParam) {
const [res] = await goods.detailInfo(detailParam);
if (res.groupBuyInfo.groupId) {
localStorage.set('groupBuyGroupId', res.groupBuyInfo.groupId || ''); // 设置groupBuyGroupId,用于下单
// localStorage.set('groupBuyGroupId', res.groupBuyInfo.groupId || ''); // 设置groupBuyGroupId,用于下单
this.groupId = +res.groupBuyInfo.groupId || '';
}
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