login-gate.js:非 mp 域名查 mp 绝对地址的 auth/status
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -56,7 +56,9 @@
|
||||
|
||||
/* 和服务器对一次(在别的应用重新登录过 / 在别处退出过,本机标记会过期) */
|
||||
if (O) {
|
||||
fetch('/api/mp/public/auth/status?openid=' + encodeURIComponent(O)) /* 只读,查不到不建记录 */
|
||||
/* 11-07 从 taidong.douba.top 进来时那边没有 auth/status(404)→ 非 mp 域名改查 mp 绝对地址(mp 已允许跨域 *,体重会话 0c1f342e 提) */
|
||||
var ST = location.hostname === 'mp.yizhezhe.com' ? '' : 'https://mp.yizhezhe.com';
|
||||
fetch(ST + '/api/mp/public/auth/status?openid=' + encodeURIComponent(O)) /* 只读,查不到不建记录 */
|
||||
.then(function (r) { return r.ok ? r.json() : null; })
|
||||
.then(function (j) {
|
||||
if (!j || j.code !== 200 || !j.result) return;
|
||||
|
||||
Reference in New Issue
Block a user