移动 App 方案:原生壳(WebView)+ 原生登录页,登录走 platform 自有接口 (/api/login/token → /api/login/external-login,实测打通,后者服务端换 zcbot JWT)。 顶层 WebView 无父窗口,iframe 的 postMessage 协议失效,泛化企微免登为 app 变体: ?embed=1&relogin_url=<绝对地址>#token=..&user_id=.. —— fragment 注入读完即清, 401/logout 时 location.replace(relogin_url),原生壳拦自定义 scheme 换新 token 重进。 - state.js: EMBED_RELOGIN_URL 解析+消毒(拦 javascript:/data: 等可执行 scheme) - embed.js: 抽共用 readFragmentToken/gotoInitialTask,加 embedAppInit/embedAppRelogin - auth.js: logout 分支序 wecom → app → iframe - APP.md 新增(进入契约 + platform 登录链路 + 原生壳杂活清单 + H5 备选) - EMBED.md 精简 243→约 120 行,指向 APP.md Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| js | ||
| vendor | ||
| admin.html | ||
| dev.html | ||
| wechat_bind.html | ||