|
@@ -52,8 +52,8 @@ export default {
|
|
|
// 微信授权配置
|
|
|
wechatConfig() {
|
|
|
return {
|
|
|
- appId: 'wx2d69589899b7ecd6',
|
|
|
- // appId: 'wx3a8dd28881c2c41f',
|
|
|
+ // appId: 'wx2d69589899b7ecd6',
|
|
|
+ appId: 'wx3a8dd28881c2c41f',
|
|
|
scope: 'snsapi_userinfo', // snsapi_base 或 snsapi_userinfo
|
|
|
redirectUri: encodeURIComponent(window.location.origin + '/wechat-auth'),
|
|
|
state: 'wechat_auth'
|
|
@@ -120,7 +120,7 @@ export default {
|
|
|
this.userInfo = result
|
|
|
this.authStatus = 'success'
|
|
|
const res = await wechatRegister({
|
|
|
- username: result.openid,
|
|
|
+ username: result.userInfo.nickname,
|
|
|
mail: result.openid + '@wechat.com'
|
|
|
})
|
|
|
console.log(res)
|