update vuecli proxy

This commit is contained in:
2022-09-19 16:30:50 +08:00
parent 10e454eb2a
commit e532989ddf
12 changed files with 47 additions and 17 deletions

View File

@@ -102,7 +102,8 @@ export default {
// 获取验证码
getCaptcha() {
this.dataForm.uuid = getUUID()
this.captchaPath = `${window.SITE_CONFIG['apiURL']}/captcha?uuid=${this.dataForm.uuid}`
// this.captchaPath = `${window.SITE_CONFIG['apiURL']}/captcha?uuid=${this.dataForm.uuid}`
this.captchaPath = (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + `/captcha?uuid=${this.dataForm.uuid}`
},
// 表单提交
dataFormSubmitHandle: debounce(
@@ -114,7 +115,9 @@ export default {
this.$http
.post(this.$http.adornUrl('/login'), this.dataForm)
.then(({ data: res }) => {
console.log('res', res)
if (res.code !== 0) {
console.log('res', res)
// this.getCaptcha()
return this.$message.error(res.msg)
}