diff --git a/App.vue b/App.vue index 84d043c..42b2761 100644 --- a/App.vue +++ b/App.vue @@ -77,7 +77,7 @@ export default { state: 'default', userType: this.getUserType() } - setOpenId(res.code); + setOpenId(res.code); // 系统登录 this.$store.dispatch('Login', data).then(() => { this.loginSuccess() diff --git a/sub/common/waiting.vue b/sub/common/waiting.vue index 7f6985d..4e88277 100644 --- a/sub/common/waiting.vue +++ b/sub/common/waiting.vue @@ -1,7 +1,7 @@ @@ -13,29 +13,30 @@ export default { data() { - return {} + return { + scene:"" + } }, onShow(res) { console.log(res) }, - + methods: { btnLogin() { - const scene = decodeURIComponent(query.scene) + const openid = getOpenId() - console.log('登陆信息发送', scene) + console.log('登陆信息发送', this.scene) console.log('opeid', openid) qrLogin({ - code:scene, - openid:openid + code:this.scene, + openid:getAccessToken() }) } }, onLoad(query) { // scene 需要使用 decodeURIComponent 才能获取到生成二维码时传入的 scene - const scene = decodeURIComponent(query.scene) - console.log('登陆信息发送', scene) + this.scene = decodeURIComponent(query.scene) }