|
@@ -24,10 +24,10 @@
|
|
|
</span>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item prop="captcha">
|
|
|
+ <el-form-item prop="validCode">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="14">
|
|
|
- <el-input v-model="dataForm.captcha" :placeholder="$t('login.captcha')">
|
|
|
+ <el-input v-model="dataForm.validCode" :placeholder="$t('login.captcha')">
|
|
|
<span slot="prefix" class="el-input__icon">
|
|
|
<svg class="icon-svg" aria-hidden="true"><use xlink:href="#icon-safetycertificate"></use></svg>
|
|
|
</span>
|
|
@@ -37,7 +37,7 @@
|
|
|
<img :src="captchaPath" @click="getCaptcha()">
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- </el-form-item> -->
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="dataFormSubmitHandle()" class="w-percent-100">{{ $t('login.title') }}</el-button>
|
|
|
</el-form-item>
|
|
@@ -61,9 +61,9 @@ export default {
|
|
|
captchaPath: '',
|
|
|
dataForm: {
|
|
|
username: '',
|
|
|
- password: ''
|
|
|
- // uuid: '',
|
|
|
- // captcha: ''
|
|
|
+ password: '',
|
|
|
+ deviceId: '',
|
|
|
+ validCode: ''
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -75,21 +75,21 @@ export default {
|
|
|
],
|
|
|
password: [
|
|
|
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
|
|
+ ],
|
|
|
+ validCode: [
|
|
|
+ { required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
|
|
]
|
|
|
- // captcha: [
|
|
|
- // { required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
|
|
- // ]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
- // this.getCaptcha()
|
|
|
+ this.getCaptcha()
|
|
|
},
|
|
|
methods: {
|
|
|
// 获取验证码
|
|
|
getCaptcha () {
|
|
|
- this.dataForm.uuid = getUUID()
|
|
|
- this.captchaPath = `${window.SITE_CONFIG['apiURL']}/captcha?uuid=${this.dataForm.uuid}`
|
|
|
+ this.dataForm.deviceId = getUUID()
|
|
|
+ this.captchaPath = `${window.SITE_CONFIG['apiURL']}/validata/code/${this.dataForm.deviceId}`
|
|
|
},
|
|
|
// 表单提交
|
|
|
dataFormSubmitHandle: debounce(function () {
|