Commit c331fa5f by 李伟康

退出清空文件缓存

1 parent f1884fdc
...@@ -33,6 +33,20 @@ Page({ ...@@ -33,6 +33,20 @@ Page({
// _this.showLoading() // _this.showLoading()
wx.$api.showLoading() wx.$api.showLoading()
USERAPI.logout().then(_res_ => { USERAPI.logout().then(_res_ => {
const fn = wx.getFileSystemManager()
fn.readdir({
dirPath: wx.env.USER_DATA_PATH,
success({
files
}) {
files.length && files.map(e => {
fn.unlink({
filePath: `${wx.env.USER_DATA_PATH}/${e}`
})
})
}
})
wx.$storage.rm('fileList')
wx.$storage.rm('sessionId') wx.$storage.rm('sessionId')
wx.$storage.rm('auto_login_object') wx.$storage.rm('auto_login_object')
wx.$storage.rm('userInfo') wx.$storage.rm('userInfo')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!