Skip to content

Commit

Permalink
fix(SPA): 修复二次登录时无法获取 openid 的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Jan 5, 2019
1 parent 7524508 commit debf897
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/spa/src/page/wechat/WechatSignin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ export default {
if (!accessToken || !openId) {
const { data } = await this.$http.get(`socialite/getAccess/${code}`, { validateStatus: s => s === 200 })
const { access_token: newAccessToken, openid: openId } = data
const { access_token: newAccessToken, openid: newOpenId } = data
accessToken = newAccessToken
openId = newOpenId
this.$lstore.setData('H5_WECHAT_MP_OPENID', openId)
this.$lstore.setData('H5_WECHAT_MP_ASTOKEN', accessToken)
Expand Down

0 comments on commit debf897

Please sign in to comment.