uni.canvasToTempFilePath({
canvasId: 'canvas',
fileType:'jpg',
success: res => {
var tempFilePath = res.tempFilePath;
console.log(111111,res.tempFilePath)
uni.saveImageToPhotosAlbum({
filePath: tempFilePath,
success: res => {
uni.hideLoading();
this.form.shareResult.is_success = true;;
this.shareresult(this.form);
let data = {
mId: uni.getStorageSync('mId'),
uId: uni.getStorageSync('uid'),
commonId: this.tabact.packageId,
shareChannel: 2,
type: this.type,
lId:this.lId,
posterUrl:this.posterUrl,
// 3、会员卡 4、储值卡套餐
productName: this.tabact.cardName,
appletUrl: this.type == 3 ?'otherPages/member/index':'otherPages/member/cardDetail'
}
this.$api.adduserShareLog(data).then(res => {})
uni.showToast({
title: "保存成功,请到相册中查看",
duration: 1500,
icon: "none",
});
},
fail: res => {
uni.hideLoading();
uni.showToast({
title: "保存失败,请稍后再试",
duration: 1500,
icon: "none",
});
},
});
},
complete(res){
console.log(res)
},
fail: function(res) {
console.log(res)
},
})
1***@qq.com (作者)
大佬,canvasToTempFilePath这个方法回调不执行success、fail、complete都不执行
2024-07-11 13:40
爱豆豆
回复 1***@qq.com: 你这回复 刚好时隔一年整 哈哈哈
2024-07-11 13:48
爱豆豆
回复 1***@qq.com: 不会是你手机的问题吧?你用其他机型试试 你测试用的什么手机?
2024-07-11 13:49