This commit is contained in:
Your Name
2026-04-07 18:13:03 +08:00
parent a780356908
commit fdf714f833
397 changed files with 15086 additions and 1043 deletions
+10
View File
@@ -0,0 +1,10 @@
/**
* 判断浏览器地址栏是否处于「企微绑定页 OAuth 回调」(带 code)。
* 用于避免 axios 在 router.currentRoute 尚未同步完成时执行 router.replace('/bind-work-wechat') 把 query 整段清掉。
*/
export function isBrowserOnWecomBindOAuthLanding(): boolean {
if (typeof window === 'undefined') return false
const { pathname, search } = window.location
if (!pathname.includes('bind-work-wechat')) return false
return /(?:^|[?&])code=/.test(search)
}