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) } }) }