src/utils/auth/index.js
@@ -1,15 +1,15 @@ const TokenKey = "admin-token" const TokenPrefix = "Bearer " function isLogin() { function isLogin () { return !!uni.getStorageSync(TokenKey) } function getToken() { function getToken () { return uni.getStorageSync(TokenKey) } function setToken(token) { function setToken (token) { uni.setStorageSync(TokenKey, token) } function clearToken() { function clearToken () { uni.removeStorageSync(TokenKey) } export { clearToken, getToken, isLogin, setToken, TokenPrefix }