- camera组件摄像头device-position=front前置摄像头无效
代码: <camera device-position="front" flash="off" binderror="cameraError" bindstop="stop"> <cover-view> <cover-imagesrc="/resources/over_a.png"style="width:722rpx;height:800rpx;margin-top:410rpx;"/> </cover-view> </camera> 第一次进页面时摄像头是前置的,后退后再次进入页面,摄像头就变成了后置! 这个问题在ios下才会出现。
2018-12-24 - 小程序camera组件拍照变蓝色
反馈一个Bug: Bug表现:camera组件调用takePhoto拍照后,图片变蓝。 预期:图片正常。 复现:在一加手机上每次都会变蓝,其他手机暂无发现。如下图,都变成蓝精灵了 代码: [代码]<[代码][代码]camera[代码] [代码]device-position[代码][代码]=[代码][代码]"front"[代码] [代码]flash[代码][代码]=[代码][代码]"off"[代码] [代码]binderror[代码][代码]=[代码][代码]"error"[代码] [代码]bindstop[代码][代码]=[代码][代码]"stop"[代码] [代码]style[代码][代码]=[代码][代码]"width: 100%; height: 60%;"[代码][代码]></[代码][代码]camera[代码][代码]>[代码] [代码]<[代码][代码]image[代码] [代码]mode[代码][代码]=[代码][代码]"widthFix"[代码] [代码]src[代码][代码]=[代码][代码]"{{src}}"[代码] [代码]style[代码][代码]=[代码][代码]"margin-top:10rpx;width: 80px; height: 80px;"[代码][代码]></[代码][代码]image[代码][代码]>[代码] [代码]/**[代码][代码] [代码][代码]* 调用拍照[代码][代码] [代码][代码]*/[代码][代码]doTokePhoto: [代码][代码]function[代码] [代码](e) {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码] [代码][代码]var[代码] [代码]ctx = wx.createCameraContext()[代码][代码] [代码][代码]ctx.takePhoto({[代码][代码] [代码][代码]quality: [代码][代码]'high'[代码][代码],[代码][代码] [代码][代码]success: (res) => {[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]src: res.tempImagePath[代码][代码] [代码][代码]})[代码][代码] [代码][代码]that.showViewLog([代码][代码]'拍照完成 '[代码] [代码]+ res.tempImagePath)[代码][代码] [代码][代码]that.uploadImg(that.data.src, e)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码] [代码]() { console.log([代码][代码]'fail'[代码][代码]); },[代码][代码] [代码][代码]complete: [代码][代码]function[代码] [代码]() { console.log([代码][代码]'complete'[代码][代码]); }[代码][代码] [代码][代码]})[代码][代码]},[代码] [图片]
2018-01-05