提交 6267d8f2 authored 作者: 王鹏飞's avatar 王鹏飞

登录增加测试环境的回调地址

上级 22a04add
...@@ -124,8 +124,12 @@ export default { ...@@ -124,8 +124,12 @@ export default {
}, },
wechatLogin() { wechatLogin() {
const appId = 'wxc6044475caf2805a' const appId = 'wxc6044475caf2805a'
const wechatRedirectURL =
webConf.isDev === 'production'
? 'https://passport.ezijing.com'
: 'https://passport2.ezijing.com'
// 回调地址 // 回调地址
const redirectURI = `https://passport.ezijing.com/rest/wechat/oauth-callback?needCheck=false&identity=transport&redirectUrl=${window.location.href}` const redirectURI = `${wechatRedirectURL}/rest/wechat/oauth-callback?needCheck=false&identity=transport&redirectUrl=${window.location.href}`
// 微信的地址 // 微信的地址
const wechatUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURIComponent( const wechatUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURIComponent(
redirectURI redirectURI
...@@ -141,6 +145,7 @@ export default { ...@@ -141,6 +145,7 @@ export default {
} }
}, },
created() { created() {
console.log(process.env, webConf)
this.$store.dispatch('checkLogin').then(isLogin => { this.$store.dispatch('checkLogin').then(isLogin => {
if (isLogin) { if (isLogin) {
this.loginSuccess({ code: 0, data: { TGC: Cookies.get('TGC') } }, 1) this.loginSuccess({ code: 0, data: { TGC: Cookies.get('TGC') } }, 1)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论