这个函数不知道怎么死活没有反应
// wx.getFileInfo({
// filePath: filePath,
// success(res) {
// console.log('get: ’ + res.size)
// console.log(res.digest)
// },
// fail: function (res) {
// console.log(‘fail:’ + res)
// }
// });
你好,我是在pc开发工具iphone6测试:源码
//保存文件api演示函数
saveApi: function () {
var that = this;
wx.chooseImage({
success: function (res) {
var tempFilePaths = res.tempFilePaths
that[‘chooseFile’] = tempFilePaths;
console.log(‘tempFilePaths’ + tempFilePaths);
wx.saveFile({
tempFilePath: tempFilePaths[0],
success: function (res) {
var savedFilePath = res.savedFilePath
console.log(‘savedFilePath’ + savedFilePath);
t__hat[‘tempFilePath’] = savedFilePath;__
}
})
}
});
},
getFileApi: function () {
var that = this;
// var filePath = that[‘tempFilePath’] ;
// wx.getFileInfo({
// filePath: filePath,
// success(res) {
// console.log('get: ’ + res.size)
// console.log(res.digest)
// },
// fail: function (res) {
// console.log(‘fail:’ + res)
// }
// });
wx.getSavedFileList({
success: function (res) {
console.log(res.fileList)
that.setData({ images: res.fileList })
}
})
}