存档点

This commit is contained in:
2026-01-14 18:17:16 +08:00
parent 39ea6f2fb1
commit cdc5dff129
8 changed files with 408 additions and 117 deletions

View File

@@ -1,4 +1,5 @@
const TOKEN_KEY = 'access_token'
const REFRESH_TOKEN_KEY = 'refresh_token'
const USER_INFO_KEY = 'user_info'
const QUESTION_KEY = 'question'
const ANSWERED_QUESTIONS_KEY = 'answered_questions'
@@ -16,6 +17,18 @@ const storage = {
uni.removeStorageSync(TOKEN_KEY)
},
setRefreshToken(token) {
uni.setStorageSync(REFRESH_TOKEN_KEY, token)
},
getRefreshToken() {
return uni.getStorageSync(REFRESH_TOKEN_KEY) || ''
},
removeRefreshToken() {
uni.removeStorageSync(REFRESH_TOKEN_KEY)
},
setUserInfo(userInfo) {
uni.setStorageSync(USER_INFO_KEY, userInfo)
},