Commit 2f9fa999 authored by youjie's avatar youjie

no message

parent 06b394af
......@@ -215,20 +215,18 @@
},
saveFileToPhone(tempFilePath) {
const platform = uni.getSystemInfoSync().platform;
if (platform === 'mp-weixin'||platform === 'devtools') {
// 微信小程序:使用 wx.saveImageToPhotosAlbum
wx.saveImageToPhotosAlbum({
filePath: tempFilePath,
success: (saveRes) => {
uni.showToast({ title: '保存成功'});
console.log(saveRes,'----文件地址');
},
fail: (err) => {
uni.showToast({ title: '保存失败', icon: 'none' });
console.error('保存错误', err);
}
});
}
// 微信小程序:使用 wx.saveImageToPhotosAlbum
wx.saveImageToPhotosAlbum({
filePath: tempFilePath,
success: (saveRes) => {
uni.showToast({ title: '保存成功'});
console.log(saveRes,'----文件地址');
},
fail: (err) => {
uni.showToast({ title: '保存失败', icon: 'none' });
console.error('保存错误', err);
}
});
// uni.saveFile({
// tempFilePath: tempFilePath,
// success: (saveRes) => {
......
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