跳转
This commit is contained in:
1 parent
8fc5b51705
commit
e1365d6850
2 files changed
+83
-16
No files matched your search
@@ -374,6 +374,18 @@ async function loginBySh(): Promise<boolean> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 门户扫一扫等:有有效 token 直接过;否则按环境自动登录(诗画/浙政钉)。
|
||||
* 与「我的」里先登录再扫码一致,保证后续支付接口带用户身份。
|
||||
*/
|
||||
export async function ensureBizLogin(): Promise<boolean> {
|
||||
const tokenStorage = uni.getStorageSync(TOKEN_KEY)
|
||||
if (!isEmpty(tokenStorage) && !isTokenExpires(tokenStorage) && getTokenValue(tokenStorage)) {
|
||||
return true
|
||||
}
|
||||
return await autoLogin()
|
||||
}
|
||||
|
||||
// 请求函数
|
||||
const request = (config: any) => {
|
||||
return https.middleware(config)
|
||||
|
||||
Reference in new issue
Block a user