|
@@ -68,18 +68,15 @@ router.beforeEach(async (to, from, next) => {
|
|
|
next(`/mplogin?redirect=${redirect}`); // 否则全部重定向到登录页
|
|
|
NProgress.done();
|
|
|
}
|
|
|
- /*
|
|
|
else if (/(wxworklocal)/i.test(navigator.userAgent)) {
|
|
|
- let state_json = {
|
|
|
- "redirect_url": to.fullPath || '/',
|
|
|
- "rnd": Math.floor(Math.random() * 1000000)
|
|
|
- };
|
|
|
- const state = JSON.stringify(state_json);
|
|
|
- let redirect_uri = encodeURIComponent(window.location.protocol + "//" + window.location.host + "/yjxp/#/yzy/callback")
|
|
|
- let next_url = `https://open.weixin.qq.com/connect/Oauth2/authorize?appid=wld341060039&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&agentid=1004302&state=${state}#wechat_redirect`;
|
|
|
+
|
|
|
+ const rnd = Math.floor(Math.random() * 900000) + 100000;
|
|
|
+ const state = `F${rnd}`;
|
|
|
+ const redirect_uri = encodeURIComponent(window.location.protocol + "//" + window.location.host + "/api/yzy/callback.html")
|
|
|
+ let next_url = `https://open.weixin.qq.com/connect/Oauth2/authorize?appid=wl2bee594e73&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&agentid=1004000&state=${state}#wechat_redirect`;
|
|
|
+ sessionStorage.setItem(state, to.fullPath || '/');
|
|
|
window.location.href = next_url; // 粤政易自动登录
|
|
|
}
|
|
|
- */
|
|
|
else {
|
|
|
const redirect = encodeURIComponent(to.fullPath || '/');
|
|
|
next(`/login?redirect=${redirect}`); // 否则全部重定向到登录页
|