修改一个bug
This commit is contained in:
18
middle.html
18
middle.html
@@ -10,18 +10,26 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<button onclick="handlelogin()">微信登录</button>
|
||||
<script>
|
||||
// 开启 vConsole 调试面板
|
||||
var vConsole = new VConsole();
|
||||
|
||||
// wx364b8ebf17fe45fe wx0eeb7556d60121db
|
||||
console.log("✅ vConsole 已经启动");
|
||||
const url = encodeURIComponent("https://ai.satabot.com?userid=6353rf")
|
||||
function handlelogin() {
|
||||
const APP_ID = 'wx364b8ebf17fe45fe';
|
||||
const REDIRECT_URI = encodeURIComponent("https://ai.satabot.com");
|
||||
const STATE = Math.random().toString(36).substring(2, 12);
|
||||
const SCOPE = 'snsapi_base';
|
||||
// const authUrl = `https://open.weixin.qq.com/connect/qrconnect?appid=${APP_ID}&redirect_uri=${REDIRECT_URI}&response_type=code&scope=${SCOPE}&state=${STATE}#wechat_redirect`;
|
||||
// window.location.href = authUrl; // 跳转后页面刷新,后续代码不执行
|
||||
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${APP_ID}&redirect_uri=${REDIRECT_URI}&response_type=code&scope=${SCOPE}&forcePopup=false&state=${STATE}&connect_redirect=1#wechat_redirect`
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const url = encodeURIComponent(`https://ai.satabot.com?t=${Date.now()}`);
|
||||
const target = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx549f4ae0f85eb3ea&redirect_uri=${url}&response_type=code&scope=snsapi_userinfo&state=123&forcePopup=true#wechat_redirect`
|
||||
location.href = target
|
||||
console.log("跳转了吗")
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user