修改 增加微信授权代码
This commit is contained in:
1
MP_verify_SorHpSKNT1SolXOr.txt
Normal file
1
MP_verify_SorHpSKNT1SolXOr.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
SorHpSKNT1SolXOr
|
||||||
18
index.html
18
index.html
@@ -1224,6 +1224,24 @@
|
|||||||
if (parts.length === 2) return parts.pop().split(';').shift();
|
if (parts.length === 2) return parts.pop().split(';').shift();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
function gotoWeiXin() {
|
||||||
|
const appid = "wx549f4ae0f85eb3ea";
|
||||||
|
|
||||||
|
// 回调地址(必须和公众号后台配置的网页授权域名一致)
|
||||||
|
const redirect_uri = encodeURIComponent("http://ai.satabot.com/");
|
||||||
|
|
||||||
|
// 授权方式:snsapi_base(静默) 或 snsapi_userinfo(需要用户确认)
|
||||||
|
const scope = "snsapi_userinfo";
|
||||||
|
|
||||||
|
// 自定义参数,授权后会原样返回
|
||||||
|
const state = "123";
|
||||||
|
|
||||||
|
// 拼接完整的授权链接
|
||||||
|
const authUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${redirect_uri}&response_type=code&scope=${scope}&state=${state}#wechat_redirect`;
|
||||||
|
|
||||||
|
// 跳转到微信授权
|
||||||
|
window.location.href = authUrl;
|
||||||
|
}
|
||||||
|
|
||||||
getSessionList();
|
getSessionList();
|
||||||
function getSessionList() {
|
function getSessionList() {
|
||||||
|
|||||||
Reference in New Issue
Block a user