add comments

This commit is contained in:
lb
2022-08-02 17:06:11 +08:00
parent edc8a10cc3
commit 0566808861
6 changed files with 17 additions and 15 deletions

View File

@@ -22,7 +22,7 @@
</span>
</el-input>
</el-form-item>
<el-form-item prop="captcha">
<!-- <el-form-item prop="captcha">
<el-row :gutter="20">
<el-col :span="14">
<el-input v-model="dataForm.captcha" :placeholder="$t('login.captcha')">
@@ -35,7 +35,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>
@@ -55,7 +55,7 @@
<script>
import Cookies from 'js-cookie'
import debounce from 'lodash/debounce'
import { getUUID } from '@/utils'
// import { getUUID } from '@/utils'
export default {
data () {
return {
@@ -64,7 +64,7 @@ export default {
username: 'admin',
password: 'admin',
uuid: '',
captcha: ''
// captcha: ''
}
}
},
@@ -77,14 +77,14 @@ export default {
password: [
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
],
captcha: [
{ 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: {
// 获取验证码
@@ -99,8 +99,8 @@ export default {
return false
}
this.$http.post('/login', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
this.getCaptcha()
if (res.code !== 200) {
// this.getCaptcha()
return this.$message.error(res.msg)
}
Cookies.set('token', res.data.token)