|
|
@ -323,7 +323,7 @@ export default { |
|
|
|
// 获取微信登录二维码 |
|
|
|
getLoginWxQrCode() { |
|
|
|
this.wxQrCodeLoading = true |
|
|
|
this.$api.get('/login/wx/qrcode').then(res => { |
|
|
|
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/login/wx/qrcode`).then(res => { |
|
|
|
this.wxLoginQrCode = res.data.qrCodeUrl |
|
|
|
this.wxLoginId = res.data.loginId |
|
|
|
}) |
|
|
@ -335,7 +335,7 @@ export default { |
|
|
|
// qq登录授权地址 |
|
|
|
getQQLoginAuthorizeUrl() { |
|
|
|
let reUrl = getCurrentDomain() + '/redirect/qqlogin' |
|
|
|
this.$api.get('/login/qq/authorize/url', {params: {redirectUri: reUrl}}).then(res => { |
|
|
|
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/login/qq/authorize/url`, {params: {redirectUri: reUrl}}).then(res => { |
|
|
|
this.qqLoginAuthorizeUrl = res.data |
|
|
|
}) |
|
|
|
}, |
|
|
@ -344,7 +344,7 @@ export default { |
|
|
|
location.href = url |
|
|
|
}, |
|
|
|
getLoginWxQrCodeResult() { |
|
|
|
this.$api.get('/login/wx/qrcode/result', {params: {loginId: this.wxLoginId}}).then(res => { |
|
|
|
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/login/wx/qrcode/result`, {params: {loginId: this.wxLoginId}}).then(res => { |
|
|
|
if (res.data) { |
|
|
|
this.loginSuccessHandle(res.data) |
|
|
|
} |
|
|
@ -354,7 +354,7 @@ export default { |
|
|
|
this.$refs['emailRegForm'].validateField('email', err => { |
|
|
|
if (!err) { |
|
|
|
this.emailValidateCodeBtn = true |
|
|
|
this.$api.get(`/register/email/code?email=${this.accountForm.email}`).then(() => { |
|
|
|
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/register/email/code?email=${this.accountForm.email}`).then(() => { |
|
|
|
this.msgSuccess('验证码发送成功,5分钟内有效') |
|
|
|
this.emailValidateCodeBtn = true |
|
|
|
let count = 60 |
|
|
@ -395,7 +395,7 @@ export default { |
|
|
|
phoneRegHandle() { |
|
|
|
this.$refs['phoneRegForm'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.$api.post('/tduck-api/register/phone', this.accountForm).then(() => { |
|
|
|
this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/register/phone`, this.accountForm).then(() => { |
|
|
|
this.registerSuccessHandle() |
|
|
|
}) |
|
|
|
} else { |
|
|
@ -406,7 +406,7 @@ export default { |
|
|
|
emailRegHandle() { |
|
|
|
this.$refs['emailRegForm'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.$api.post('/tduck-api/register/email', this.accountForm).then(() => { |
|
|
|
this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/register/email`, this.accountForm).then(() => { |
|
|
|
this.registerSuccessHandle() |
|
|
|
}) |
|
|
|
} else { |
|
|
@ -444,7 +444,7 @@ export default { |
|
|
|
loginHandle() { |
|
|
|
|
|
|
|
this.$api.request({ |
|
|
|
url: '/tduck-api/login/account', |
|
|
|
url: `${process.env.VUE_APP_API_ROOT_TDUCK}/login/account`, |
|
|
|
method: 'post', |
|
|
|
data: this.accountForm |
|
|
|
}).then(res => { |
|
|
|