收藏
回答

调取录音问题?

    checkRecordPermission: function () {

        let that = this

        wx.getSetting({

            success(res) {

                if (!res.authSetting['scope.record']) {

                    wx.authorize({

                        scope: 'scope.record',

                        success() {

                            // 用户已同意授权

                            console.log('用户已同意授权')

                            that.startRecord()

                        },

                        fail() {

                            // 用户拒绝了授权

                            console.log('用户拒绝了授权')

                            wx.showModal({

                                title: '提示',

                                content: '需要获取录音权限,请点击确定进入设置页面进行授权。',

                                showCancel: false,

                                success(res) {

                                    if (res.confirm{

                                        wx.openSetting({

                                            success(res) {

                                                console.log(res.authSetting)

                                                // 用户在设置页面设置了录音权限

                                                if (res.authSetting['scope.record']) {

                                                    console.log('用户在设置页面设置了录音权限')

                                                } else {

                                                    console.log('用户在设置页面未设置录音权限')

                                                }

                                            }

                                        })

                                    }

                                }

                            })

                        }

                    })

                } else {

                    // 已经有录音权限

                    console.log('已经有录音权限')

                    that.startRecord()

                }

            }

        })

    },

我调不起录音权限功能,这个是什么问题啊,之前是开发版是可以的,现在开发版也不行了


回答关注问题邀请回答
收藏

1 个回答

  • 一笑皆春
    一笑皆春
    04-24

    小程序后台更新用户隐私协议,将录制相关的api权限都加上,提交审核

    04-24
    有用
    回复
登录 后发表内容