申请的订阅消息模版也是各种问题被拒,业务影响很大啊
公告说模版消息延迟到4月份的,为什么后台API报错了?{"errcode":46101,"errmsg":"this api have been not supported since 2020-01-11 00:00:00, please use new api(subscribeMessage)! hint: [YP0ina0504shc2]"}
2020-01-13[图片]
onShareAppMessage使用canvas画图显示不出来大神们好,想canvas画图作为onShareAppMessage的imageUrl,但是为啥我的显示不出来呢?帮看看啥问题吧,非常感谢 //调用cropImg这个函数由imgSrc图片生成一个新的图片保存在headShare 全局变量中 cropImg: function(imgSrc) { wx.getImageInfo({ src: imgSrc, success: function(ret) { var orWidth = ret.width var orHeight = ret.height ctx.drawImage(imgSrc, 0, orHeight * 1 / 10, orWidth, orHeight * 8 / 10, 0, 0, 500, 400); ctx.draw(false, function() { wx.canvasToTempFilePath({ canvasId: 'attendCanvasId', fileType: 'jpg', success: function(resl) { wx.saveFile({//把文件保存到本地 tempFilePath: resl.tempFilePath, success: function(res) { headShare = res.savedFilePath console.log(headShare) } }) } }) //wx.canvasToTempFilePath end }) //ctx.draw end } }) }, //调用onShareAppMessage之前已经生成图片文件并保存到headShare变量中 onShareAppMessage: function(res) { console.log(headShare)//可以打印出图片本地路径 return { title: xitieInfo.title, path: '/pages/showxitie/showxitie', imageUrl: headShare, success: function(res) { console.log('成功', res) }, fail: function(res) { // 转发失败 console.log('失败', res) } } },
2018-09-04