wx.getSetting在IOS下无法调用
发布于 5 年前 作者 oxiang 12016 次浏览 来自 问答

在app.js中的onLaunch中调用,本地IDE测试正常,在IOS中预览无法调用wx.getSetting函数。

getUserInfo: function () {
        var that = this
        wx.getSetting({
            success: (data) => {
                console.log(data)
                if (data.authSetting["scope.userInfo"]) {
                    wx.getUserInfo({
                        success: function (res) {
                            console.log(res)
                            that.globalData.userInfo = res.userInfo
                        }
                    })
                }
            }
        })
    },
回到顶部