请问解决了吗
wx.faceDetect接口在不同手机上返回值不同吗?在调用wx.faceDetect接口的时候发现在一些手机上的返回值是正常的,但是用iphone12 pro max测试的时候就有问题,返回值不全了 screen2base64: function (frame) { if (!this.data.scan_switch) { // 扫描开关关闭了 return; } // console.log("screen2base64"); var that = this skip = skip + 1; if (skip % 20 == 1) { wx.faceDetect({ width: frame.width, height: frame.height, frameBuffer: frame.data, enableConf: true, enablePoint: true, success(res) { console.log("faceDetect Res->",res) console.log("pointArray 内容如下",res.pointArray) console.log("第86个点的数据如下:",res.pointArray[86]) var centerX = ((res.pointArray[84].x + res.pointArray[90].x) / 2) * (that.data.width / frame.width) var centerY = ((res.pointArray[93].y + res.pointArray[87].y) / 2) * (that.data.height / frame.height) that.setData({ centerX: centerX, centerY: centerY, }) // console.log("识别度",res.confArray.mouth) // console.log(that.data.zoneX1,"+",centerX,"+",that.data.zoneX2) // console.log(that.data.zoneY1,"+",centerY,"+",that.data.zoneY2) if (res.confArray.mouth > 0.80 && centerX < that.data.zoneX2 && centerX > that.data.zoneX1 && centerY < that.data.zoneY2 && centerY > that.data.zoneY1) { count++; NoMouth = 8; if (count >= 3) { that.closeScan() //检测完成,但是要播放完动画 clearInterval(mouth) console.log("stop了", that.data.a) mouth = setInterval(() => { if (that.data.a > 45) { clearInterval(mouth) setTimeout(function () { wx.redirectTo({ url: '../AVideo/AVideo', }) }, 500) } else { that.setData({ a: that.data.a + 1 }) } }, 2000 / 45) } } else { NoMouth = NoMouth - 1 console.log("nomout", NoMouth) if (NoMouth == 0) { wx.showToast({ icon: 'none', title: '微笑识别不成功,记得对准唇部框哦', duration: 2000 }) NoMouth = 7; } } // console.log("count->", count) }, fail(err) { console.log('失败', err) NoMouth = NoMouth - 1 console.log("nomout", NoMouth) if (NoMouth == 0) { wx.showToast({ icon: 'none', title: '微笑识别不成功,记得对准唇部框哦', duration: 2000 }) NoMouth = 7; } } }) } // 开始制作base64 that.setData({ create_ready_status: false }) }, [图片][图片]
2021-10-25[图片]原图是这个500*400 [图片]华为P20Pro显示是这样子
onShareAppMessage自定义图片显示不全自定义图片长宽比为5:4,华为P20Pro图片显示不全,右边少了一部分
2018-07-30同问,onShareAppMessage()事件是触发了,不过就是不转发
分享网页是不是必须要用button按钮我用别的按钮触发事件,然后再事件里去调用转发的这个函数:onShareAppMessage,好像不行,是不是必须要用button按钮。
2018-06-18