Camera组件拍照录像无法实现

发布于 7 年前作者 yan041983 次浏览最后编辑 7 年前来自 ask

使用wx.createCameraContext()的takePhoto()和startRecord()方法均没有结果回调。tap事件已经触发了的,wx.canIUse()也返回成功。

测试机为iphone7(iOS11.0.3 微信版本6.5.18 基础库版本1.6.0)

部分代码如下:

<camera binderror='bindError' >

</camera>

<button bindtap='bindPhoto'>拍照</button>

var camera = wx.createCameraContext();


Page({

    bindPhoto() {
        console.log('canuse:' + wx.canIUse('createCameraContext'));
        camera.takePhoto({
            success(res) {
                console.log(res)
            },
            fail(e) {
                app.console(e);
            }
        });
    }

})


0 回复
暂无回复