|
@@ -208,7 +208,9 @@ const getWeChatAuth = async () => {
|
|
sessionStorage.setItem("paymentSettingId", paymentSettingId);
|
|
sessionStorage.setItem("paymentSettingId", paymentSettingId);
|
|
//跳转微信授权
|
|
//跳转微信授权
|
|
|
|
|
|
- const redirectUri = encodeURIComponent(location.href);
|
|
|
|
|
|
+ const redirectUri = encodeURIComponent(
|
|
|
|
+ `${location.origin}${location.pathname}?promotionGoodsId=${route.query.promotionGoodsId}&promotionSiteId=${route.query.promotionSiteId}`
|
|
|
|
+ );
|
|
location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirectUri}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`;
|
|
location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirectUri}&response_type=code&scope=snsapi_base&state=123#wechat_redirect`;
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -249,7 +251,7 @@ const init = async () => {
|
|
if (!code || !paymentSettingId) {
|
|
if (!code || !paymentSettingId) {
|
|
return getWeChatAuth();
|
|
return getWeChatAuth();
|
|
}
|
|
}
|
|
- getOpenId()
|
|
|
|
|
|
+ getOpenId();
|
|
// wxConfig();
|
|
// wxConfig();
|
|
};
|
|
};
|
|
onMounted(() => init());
|
|
onMounted(() => init());
|