From b62940e86a5cbdd25569cf70fba944ac57d1179e Mon Sep 17 00:00:00 2001 From: mutoe Date: Thu, 22 Nov 2018 15:55:33 +0800 Subject: [PATCH] =?UTF-8?q?fix(SPA):=20=E5=BE=AE=E4=BF=A1=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=97=B6=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0access=5F?= =?UTF-8?q?token=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/spa/src/page/wechat/WechatBindUser.vue | 2 -- resources/spa/src/page/wechat/WechatSignin.vue | 4 +--- resources/spa/src/page/wechat/WechatSignup.vue | 3 --- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/resources/spa/src/page/wechat/WechatBindUser.vue b/resources/spa/src/page/wechat/WechatBindUser.vue index 4d85f3abd..922d946c7 100644 --- a/resources/spa/src/page/wechat/WechatBindUser.vue +++ b/resources/spa/src/page/wechat/WechatBindUser.vue @@ -156,8 +156,6 @@ export default { this.$store.dispatch('GET_UNREAD_COUNT') this.$store.dispatch('GET_NEW_UNREAD_COUNT') this.$store.commit('SAVE_USER', user) - this.$lstore.removeData('H5_WECHAT_MP_OPENID') - this.$lstore.removeData('H5_WECHAT_MP_ASTOKEN') }) }) .finally(() => { diff --git a/resources/spa/src/page/wechat/WechatSignin.vue b/resources/spa/src/page/wechat/WechatSignin.vue index 7275fa28b..47f37e6ac 100644 --- a/resources/spa/src/page/wechat/WechatSignin.vue +++ b/resources/spa/src/page/wechat/WechatSignin.vue @@ -94,7 +94,7 @@ export default { this.$http .post( 'socialite/wechat', - { access_token: accessToken }, + { access_token: this.accessToken }, { validateStatus: s => s === 201 || s === 404 } ) .then(({ status, data: { token = '', user = {} } = {} }) => { @@ -106,8 +106,6 @@ export default { // 保存用户信息 并跳转 this.$router.push(this.$route.query.redirect || '/feeds?type=hot') this.$nextTick(() => { - this.$lstore.removeData('H5_WECHAT_MP_OPENID') - this.$lstore.removeData('H5_WECHAT_MP_ASTOKEN') this.$store.commit('SAVE_USER', user) this.$store.dispatch('GET_UNREAD_COUNT') this.$store.dispatch('GET_NEW_UNREAD_COUNT') diff --git a/resources/spa/src/page/wechat/WechatSignup.vue b/resources/spa/src/page/wechat/WechatSignup.vue index af546184e..8dc3670fa 100644 --- a/resources/spa/src/page/wechat/WechatSignup.vue +++ b/resources/spa/src/page/wechat/WechatSignup.vue @@ -147,9 +147,6 @@ export default { this.$store.dispatch('GET_UNREAD_COUNT') this.$store.dispatch('GET_NEW_UNREAD_COUNT') this.$store.commit('SAVE_USER', user) - this.$lstore.removeData('H5_WECHAT_MP_OPENID') - this.$lstore.removeData('H5_WECHAT_MP_ASTOKEN') - this.$lstore.removeData('H5_WECHAT_NICKNAME') }) }) .catch(