[图片]
getPhoneNumbe button 组件走登陆 5分钟授权但是后端接口提示1005?微信版本8.0.17 基础库2.21.4 button getphoneNumber登录,页面初始化获取了code然后我操作登录授权是页面初始化10分钟左右,然后提示我1005 <button type="default" :loading="loginLoading" open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber" class="login__wx" >授权登录</button> getWxcode () { wx.login({ provider: 'weixin', success: (loginRes) => { this.code = loginRes.code uni.setStorageSync('tyycode', loginRes.code) } }) }, decryptPhoneNumber (e) { if (this.loginLoading) return if (e.detail.errMsg === 'getPhoneNumber:ok') { uni.showLoading({ title: '登录中...' }) const encryptedData = e.detail.encryptedData const iv = e.detail.iv wx.checkSession({ success: (res) => { console.log(res) this.phoneLogin(encryptedData, iv) }, fail: (err) => { uni.login({ provider: 'weixin', success: (res) => { this.code = res.code this.phoneLogin(encryptedData, iv) } }) } }) } }, async phoneLogin (encryptedData, iv) { let _this = this this.loginLoading = true const resData = await api.login.wxLogin({ encryptedData, iv, code: this.code }) const { errcode = '', data = {}, message = '登录失败' } = resData uni.hideLoading() if (errcode === 0) { // "is_need_login": 2 // 是否需要重新登陆:0不需要,1需要 const { api_token = '' } = data uni.showToast({ title: '登录成功', icon: 'success', duration: 1500, success: () => { uni.setStorageSync('api_token', api_token) _this.$store.commit(IS_NEED_LOGIN, 0) _this.loginLoading = false uni.reLaunch({ url: `/pages/index/index` }) } }) } else if (errcode === 1500) { this.$refs['popup'].open() this.getWxcode() this.loginLoading = false } else { this.loginLoading = false this.getWxcode() uni.showToast({ title: message, icon: 'none' }) } }, popupClick () { this.$refs['popup'].close() } },
2022-01-21咋解决的
微信内H5跳转小程序,openTagList返回为空?[图片] 代码里面写了的,求大佬帮忙 [图片]
2021-04-07楼主解决了嘛,我也遇到了
wx-open-launch-weapp 在ios中不展示,使用的是vue?