💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
~~~ onLoad: function (options) { this.userAuthorized() }, userAuthorized() { /* 判断用户是否授权 */ wx.getSetting({ success: res => { /* 为真则表示授权 */ if (res.authSetting["scope.userInfo"]) { wx.getUserInfo({ success: res => { this.setData({ userInfo: res.userInfo, authorized: true }) } }) } else { console.log('err'); } } }); }, ~~~