Commit 808eb958 authored by Damon's avatar Damon

修复删除本地文件问题

parent ced880c6
......@@ -244,21 +244,22 @@
// }
// })
const self = this
uni.getSavedFileList({
success(e) {
const {fileList} = e
// 清除本地照片
fileList.forEach(v => {
uni.removeSavedFile({
filePath: v.filePath
})
})
//清除缓存,重新获取数据
cache.removeCache(self.systemId)
self.isPopShow = false
self.getListData()
}
const photo = getApp().globalData.photo
const data = cache.getCache(self.systemId)
let path = []
data.result.forEach(v => {
v.list.forEach(item => {
if (item.imageList.length > 0) path = path.concat(item.imageList)
})
})
for (let i of path) {
uni.removeSavedFile({
filePath: i
})
}
cache.removeCache(self.systemId)
self.isPopShow = false
self.getListData()
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment