bug修复
This commit is contained in:
parent
3945b36b0a
commit
4d7f73aedf
@ -107,6 +107,15 @@ export default {
|
|||||||
}, 500);
|
}, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//原先商品团购
|
||||||
|
if(options?.query.couponsId) {
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: 'pages/common/groupbuy/index?id=' + options?.query.couponsId
|
||||||
|
});
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.info(`App Launch options ${env}: { companyId: `, getCompanyId() + ', storeId: ' + getRegisterStoreId() + ' }');
|
logger.info(`App Launch options ${env}: { companyId: `, getCompanyId() + ', storeId: ' + getRegisterStoreId() + ' }');
|
||||||
|
@ -174,12 +174,18 @@ onLoad(async (e: any) => {
|
|||||||
if(isLogin()) {
|
if(isLogin()) {
|
||||||
await uni.showLoading();
|
await uni.showLoading();
|
||||||
groupBuyBean.value = await getGroupBuyDetail(e.id);
|
groupBuyBean.value = await getGroupBuyDetail(e.id);
|
||||||
groupBuyBean.value.goods.price = groupBuyBean.value.price;
|
// setCompanyId('1512403904150138881');
|
||||||
bannerList.value = JSON.parse(groupBuyBean.value.content).filter((item: any) => item.type === 2).map((item: any) => item.images);
|
// groupBuyBean.value = await getGroupBuyDetail('1740922051118063618');
|
||||||
countdown();
|
if(groupBuyBean.value) {
|
||||||
await fetchRecommendList();
|
groupBuyBean.value.goods.price = groupBuyBean.value.price;
|
||||||
await fetchBuyRecordList();
|
bannerList.value = JSON.parse(groupBuyBean.value.content).filter((item: any) => item.type === 2).map((item: any) => item.images);
|
||||||
|
countdown();
|
||||||
|
await fetchRecommendList();
|
||||||
|
await fetchBuyRecordList();
|
||||||
|
}
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
} else {
|
||||||
|
goPath('/pages/common/login/index');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ const useUserStore = defineStore('user', {
|
|||||||
getApp().globalData?.logger.info('login result: ', res);
|
getApp().globalData?.logger.info('login result: ', res);
|
||||||
setToken(res.token);
|
setToken(res.token);
|
||||||
setSessionKey(res.sessionKey);
|
setSessionKey(res.sessionKey);
|
||||||
setOpenId(res.maOpenId)
|
setOpenId(res.maOpenId);
|
||||||
await this.setUserInfo(res.user);
|
await this.setUserInfo(res.user);
|
||||||
// }
|
// }
|
||||||
resolve(res);
|
resolve(res);
|
||||||
@ -148,6 +148,7 @@ const useUserStore = defineStore('user', {
|
|||||||
if(this.userInfo) {
|
if(this.userInfo) {
|
||||||
this.userInfo.userDiscount = this.getUserDiscount;
|
this.userInfo.userDiscount = this.getUserDiscount;
|
||||||
await setCompanyId(this.userInfo.companyId);
|
await setCompanyId(this.userInfo.companyId);
|
||||||
|
getApp().globalData!.companyId = this.userInfo.companyId;
|
||||||
} else {
|
} else {
|
||||||
await clearToken();
|
await clearToken();
|
||||||
}
|
}
|
||||||
@ -157,6 +158,7 @@ const useUserStore = defineStore('user', {
|
|||||||
|
|
||||||
setCompanyInfo(partial: Partial<any>) {
|
setCompanyInfo(partial: Partial<any>) {
|
||||||
this.companyInfo = partial as any;
|
this.companyInfo = partial as any;
|
||||||
|
getApp().globalData!.companyId = this.companyInfo.id;
|
||||||
},
|
},
|
||||||
|
|
||||||
setDeliveryAddress(partial: Partial<any>) {
|
setDeliveryAddress(partial: Partial<any>) {
|
||||||
|
@ -41,6 +41,7 @@ function getCompanyId() {
|
|||||||
|
|
||||||
function setCompanyId(companyId: string) {
|
function setCompanyId(companyId: string) {
|
||||||
uni.setStorageSync(CompanyIdKey, companyId);
|
uni.setStorageSync(CompanyIdKey, companyId);
|
||||||
|
getApp().globalData!.companyId = companyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getReferrerUserId() {
|
function getReferrerUserId() {
|
||||||
|
Loading…
Reference in New Issue
Block a user