小程序相机点击第一次无反应,第二次才能实现拍照
发布于 5 年前 作者 nqiu 3379 次浏览 来自 问答

onLoad() {

    this.cameraCTX = wepy.createCameraContext()

}

takePhoto() {

    this.cameraCTX.takePhoto({

        success: res => {

            this.photo = {

            show: true,

            info: res.tempImagePath

            }

        },

        error: error => {

            console.log(error)

        }

    })

}

1 回复

你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

回到顶部