|
|
@ -299,7 +299,7 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
queryUserInfo() { |
|
|
|
this.$api.get('/user/current/detail').then(res => { |
|
|
|
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/current/detail`).then(res => { |
|
|
|
if (res.data) { |
|
|
|
this.userInfo = res.data |
|
|
|
this.$store.dispatch('user/update', this.userInfo).then(() => { |
|
|
@ -317,14 +317,14 @@ export default { |
|
|
|
return `${process.env.VUE_APP_API_ROOT}/user/file/upload` |
|
|
|
}, |
|
|
|
getBindWxQrCode() { |
|
|
|
this.$api.get('/user/bind/wx/qrcode').then(res => { |
|
|
|
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/bind/wx/qrcode`).then(res => { |
|
|
|
this.bindWxQrcode = res.data |
|
|
|
}) |
|
|
|
}, |
|
|
|
updateUserPwdHandle() { |
|
|
|
this.$refs['updatePassWordForm'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.$api.post('/user/update/password', this.userPwdForm).then(res => { |
|
|
|
this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/update/password`, this.userPwdForm).then(res => { |
|
|
|
if (res.data) { |
|
|
|
this.msgSuccess('修改成功') |
|
|
|
this.queryUserInfo() |
|
|
@ -339,7 +339,7 @@ export default { |
|
|
|
sendUpdateEmail() { |
|
|
|
this.$refs['updateEmailForm'].validateField('email', err => { |
|
|
|
if (!err) { |
|
|
|
this.$api.get('/user/update-email/msg', {params: {email: this.userInfoForm.email}}).then(res => { |
|
|
|
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/update-email/msg`, {params: {email: this.userInfoForm.email}}).then(res => { |
|
|
|
if (res.data) { |
|
|
|
this.msgSuccess('发送成功,请去您的邮箱查看') |
|
|
|
this.emailDialogVisible = false |
|
|
@ -351,7 +351,7 @@ export default { |
|
|
|
sendUpdatePhoneNumber() { |
|
|
|
this.$refs['updatePhoneForm'].validateField('phoneNumber', err => { |
|
|
|
if (!err) { |
|
|
|
this.$api.get(`/user/update-phone/code?phoneNumber=${this.userInfoForm.phoneNumber}`).then(() => { |
|
|
|
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/update-phone/code?phoneNumber=${this.userInfoForm.phoneNumber}`).then(() => { |
|
|
|
this.msgSuccess('验证码发送成功,5分钟内有效') |
|
|
|
let count = 60 |
|
|
|
let timer = setInterval(() => { |
|
|
@ -367,7 +367,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
updateUserHandle() { |
|
|
|
this.$api.post('/user/update', this.userInfoForm).then(res => { |
|
|
|
this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/update`, this.userInfoForm).then(res => { |
|
|
|
if (res.data) { |
|
|
|
this.msgSuccess('保存成功') |
|
|
|
this.queryUserInfo() |
|
|
@ -378,7 +378,7 @@ export default { |
|
|
|
// qq登录授权地址 |
|
|
|
getQQLoginAuthorizeUrl() { |
|
|
|
let reUrl = getCurrentDomain() + '/redirect/bindqq' |
|
|
|
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 |
|
|
|
}) |
|
|
|
}, |
|
|
@ -388,7 +388,7 @@ export default { |
|
|
|
updateUserPhoneHandle() { |
|
|
|
this.$refs['updatePhoneForm'].validateField(['phoneNumber', 'code'], err => { |
|
|
|
if (!err) { |
|
|
|
this.$api.post('/user/update/phone-number', this.userInfoForm).then(() => { |
|
|
|
this.$api.post(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/update/phone-number`, this.userInfoForm).then(() => { |
|
|
|
this.msgSuccess('修改成功') |
|
|
|
this.queryUserInfo() |
|
|
|
}) |
|
|
@ -398,7 +398,7 @@ export default { |
|
|
|
bindWxHandle() { |
|
|
|
this.bindWxDialogVisible = true |
|
|
|
this.bindWxTimer = setInterval(() => { |
|
|
|
this.$api.get('/user/current/detail').then(res => { |
|
|
|
this.$api.get(`${process.env.VUE_APP_API_ROOT_TDUCK}/user/current/detail`).then(res => { |
|
|
|
if (res.data) { |
|
|
|
let {wxName} = res.data |
|
|
|
if (wxName) { |
|
|
|