小程序开发wx.removeSavedFile删除本地存储的文件
2017-12-11
导读:删除本地存储的文件 OBJECT参数说明: 参数 类型 必填 说明 filePath String 是 需要删除的文件路径 success Function 否 接口调用成功的回调函数 fail Function 否 接口调用失败的回调函数 complet...
删除本地存储的文件
OBJECT参数说明:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| filePath | String | 是 | 需要删除的文件路径 |
| success | Function | 否 | 接口调用成功的回调函数 |
| fail | Function | 否 | 接口调用失败的回调函数 |
| complete | Function | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
示例代码:
wx.getSavedFileList({
success: function(res) {
if (res.fileList.length > 0){
wx.removeSavedFile({
filePath: res.fileList[0].filePath,
complete: function(res) {
console.log(res)
}
})
}
}
})
第二部分:如何开通一个小商店

立即扫码关注

多门店/直营/加盟连锁管理系统