- 点击重新进入小程序 页面白屏,为什么?
[图片]页面背景图片访问正常,但是访问页面的接口 提示500.不知道什么原因
2023-03-13 - 多个页面加入相同的广告,进行跳转发送"errMsg":"updateTextView:fail ?
多个页面加入相同的广告,进行跳转时报错:"errMsg":"updateTextView:fail 32771 not found";
2023-03-13 - 两个页面加入激励广告页面跳转到页面出现insertTextView:fail parent not?
页面一正常有广告,页面二{"errMsg":"insertTextView:fail parent 32904 not found"}{"errMsg":"updateTextView:fail 32904 not found"},在页面二中load回调广告加载成功,但是广告不出现
2023-03-10 - wx.canvasToTempFilePath()保存图片为空白图片?
async drawSaveImage() { console.log("drawImage", this.data.resultData.shareImage,this.data.resultData._qcCodeImage_) const { globalData } = getApp() const shareImage = await globalData.__saveImage const imageQc = await publicMethods.getQcImage(this.data.resultData) console.log("shareImage",shareImage,imageQc) const [$bgImgInfo, $imageQc] = await Promise.all([ publicMethods.getImageInfo(shareImage), publicMethods.getImageInfo(imageQc) ]) const imageBg = globalData.localSaveImageUrl console.log('imageQc', imageQc) console.log('imageBg', imageBg) const canvasContent = wx.createCanvasContext('myCanvas') if (!($imageQc.height && $imageQc.width)) { throw new Error('load qc image fail') } let pox = 1 let imagHeight = $bgImgInfo.height / pox let imageWidth = $bgImgInfo.width / pox console.log("imagHeightaaa", imagHeight, "imageWidth", imageWidth, $bgImgInfo) await this.setCanvasRect(imageWidth, imagHeight) canvasContent.drawImage(imageBg, 0, 0, imageWidth, imagHeight) await canvasContent.draw(true,()=>{}) // 这个比例值 是按照 1500x 2700 的比例算的, 如果图片有放大 或者缩小需要去缩放下 let poxImage = imageWidth / 1500 // if (imageWidth) let qcSize = 235 / pox * poxImage let qcX = imageWidth - qcSize - 40 let qcY = imagHeight - qcSize - 120 const roundRectPadding = 4 qcX = Math.ceil(qcX) qcY = Math.ceil(qcY) qcSize = Math.ceil(qcSize) publicMethods.roundRect(canvasContent, qcX - roundRectPadding, qcY - roundRectPadding, qcSize + roundRectPadding * 2, qcSize + roundRectPadding * 2) canvasContent.drawImage($imageQc.path, qcX, qcY, qcSize, qcSize) await canvasContent.draw(true,()=>{}) await publicMethods.sleep(200) return new Promise((resolve, reject) => { wx.canvasToTempFilePath({ canvasId: 'myCanvas', success: (res) => { resolve(res) }, fail(err) { console.log(err) reject(err) }, complete: (res)=>{ console.log("complete",res) } }) }) },
2023-03-09 - 请问如何动态调用wx.onShareAppMessage()?
/** * 用户点击右上角分享 */ onShareAppMessage() { console.log("aaaaa") return publicMethods.shareAppMessage() }, onShareTimeline() { console.log("sdfasdfasdf") return publicMethods.shareAppMessage() }, handleLongPress() { // 保存 canvas 图片并显示操作菜单 wx.canvasToTempFilePath({ canvasId: 'myCanvas', success: (res) => { console.log('canvasToTempFilePath success:', res.tempFilePath); this.setData({ canvasImg: res.tempFilePath, }); wx.showActionSheet({ itemList: ['保存图片', '发送给好友', '分享到朋友圈'], success: (res) => { console.log("res", res) switch (res.tapIndex) { case 0: // 保存图片 this.saveImageToPhotosAlbum(); break; case 1: // 发送给好友 this.onShareAppMessage() break; case 2: // 分享到朋友圈 this.onShareTimeline() break; default: break; } }, }); }, fail: (res) => { console.log('canvasToTempFilePath fail:', res); }, }); }, 在一个canvas上长按执行上面的三个事件,console.log("aaaaa") 这个打印有执行,但是转发好友和朋友圈都没有弹出分享框,
2023-03-07 - wx.canvasToTempFilePath()回调函数success、fail、com没有反应?
[图片]
2023-03-06