first commit

This commit is contained in:
Mrx
2026-05-16 15:47:07 +08:00
commit 03de10f800
146 changed files with 33663 additions and 0 deletions

16
src/utils/session.js Normal file
View File

@@ -0,0 +1,16 @@
/** 对齐 tyc-webview-v2 登录成功后的本地存储字段 */
export function saveAuthSession(payload) {
uni.setStorageSync('token', payload.accessToken)
uni.setStorageSync('refreshAfter', String(payload.refreshAfter))
uni.setStorageSync('accessExpire', String(payload.accessExpire))
}
export function hasToken() {
try {
const t = uni.getStorageSync('token')
return typeof t === 'string' && t.length > 0
}
catch {
return false
}
}