|
|
@@ -60,7 +60,6 @@ export const initGuidInfo = (): void => {
|
|
|
// 无缓存-存储
|
|
|
window.localStorage.setItem('guidInfo', JSON.stringify(newGuidInfo));
|
|
|
}
|
|
|
- console.log("guidInfo=", window.localStorage.getItem('guidInfo'))
|
|
|
};
|
|
|
/**
|
|
|
* 企业微信登录核心流程(获取 code → 兑换 AIToken)
|
|
|
@@ -91,8 +90,9 @@ export const doWecomLogin = async (code: string): Promise<void> => {
|
|
|
// 登录成功:存储 AIToken
|
|
|
window.localStorage.setItem('AIToken', res.Data.token);
|
|
|
isLogging = false;
|
|
|
+ // console.log("router.currentRoute.fullPath=",router.currentRoute.fullPath)
|
|
|
// 重新跳转目标页面(此时登录状态已满足)
|
|
|
- router.push(router.currentRoute.fullPath);
|
|
|
+ // router.push(router.currentRoute.fullPath);
|
|
|
} else if (res.StatusCode === 403) {
|
|
|
// 无权限 → 跳错误页
|
|
|
isLogging = false;
|
|
|
@@ -124,9 +124,10 @@ export const getGuid = () => {
|
|
|
}
|
|
|
export const getQyCode = () => {
|
|
|
let url, appid, agentid;
|
|
|
- url = encodeURIComponent(process.env.VUE_APP_AUTHURL);
|
|
|
+ // url = encodeURIComponent(process.env.VUE_APP_AUTHURL);
|
|
|
+ url = encodeURIComponent(window.location.href);
|
|
|
appid = process.env.VUE_APP_APPID;
|
|
|
agentid = process.env.VUE_APP_AGENTID;
|
|
|
-
|
|
|
+
|
|
|
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${url}&response_type=code&scope=snsapi_base&state=&agentid=${agentid}&t=${new Date().getTime()}#wechat_redirect`;
|
|
|
}
|