You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

20 lines
341 B

const TOKEN_KEY = 'token';
export function setToken(tokenVal) {
wx.setStorage({
key: TOKEN_KEY,
data: tokenVal
})
}
export function getToken() {
return wx.getStorageSync(TOKEN_KEY)
}
export function removeToken() {
wx.removeStorage({
key: TOKEN_KEY,
success (res) {
console.log(res)
}
})
}