getphone(e) { const code = e.detail.code; if (!code) return; const appid = uni.getStorageSync('appid'); const openid = uni.getStorageSync('openid'); const unionId = uni.getStorageSync('unionId'); wx.getUserInfo({ success: res => { const userName = res.userInfo.nickName; getAppletPhoneByCode({ code, appid, openid, unionId, userName }).then(res => { if (res.code === 200) { uni.setStorageSync('userid', res.data); //更新消息列表语言 const type = uni.getSystemInfoSync().uniPlatform console.log(type) // mp-weixin updateLanguageType({ user: uni.getStorageSync('userid') || '', manage: '', languageType: this.$i18n.locale === 'zh_CN' ? 1 : 2, systemType: type === 'mp-weixin' ? 1 : 2 }).then(res => { console.log(res, '1') }) if (this.contractId || this.rtuaddr) { // this.$refs['uToast'].show({ // title: '授权成功!', // back: true // }); uni.navigateBack({ delta: 1, // 返回的页面数,1 表示返回上一个页面 }); } else { uni.reLaunch({ url: '/pages/user/index/index' }); } } else { let str = this.errorCode(res.msg); this.$refs.uToast.show({ title: str }); } }); }, fail: err => { console.log(err, '1') } }); },
wx.getUserInfo的使用你好,我看到文档上面写“wx.getUserInfo (已回收)”,是什么意思呢?是这个api不能用了吗
2023-09-26