微信获取摄像头+拍照回显

  • 获取摄像头:

  • 拍照
takePhoto() {
    const ctx = wx.createCameraContext()
      ctx.takePhoto({
        quality: 'high',
        success: (res) => {
          this.src = res.tempImagePath
          console.log(this.src)
        }
      })
    },
  • 回显

你可能感兴趣的:(微信获取摄像头+拍照回显)