| | |
| | | autocomplete="off" |
| | | /> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="确认密码" prop="checkPass"> |
| | | <el-input v-model="ruleForm.checkPass" type="password" autocomplete="off" /> |
| | | </el-form-item> --> |
| | | <el-form-item label="" prop="code"> |
| | | <el-input v-model="ruleForm.code" autocomplete="off" style="width: 70%"> </el-input> |
| | | <img class="login-code" :src="captcha" @click="getCaptchaData" /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="submitForm(ruleFormRef)">登录</el-button> |
| | | </el-form-item> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ref, reactive } from 'vue' |
| | | import { ref, reactive, onMounted } from 'vue' |
| | | import type { FormInstance, FormRules } from 'element-plus' |
| | | import { getCaptcha } from '@/api' |
| | | |
| | | const ruleFormRef = ref<FormInstance>() |
| | | |
| | |
| | | const ruleForm = reactive({ |
| | | pass: '', |
| | | // checkPass: '', |
| | | accountNumber: '' |
| | | accountNumber: '', |
| | | code: '' |
| | | }) |
| | | |
| | | const captcha = ref('') |
| | | |
| | | const getCaptchaData = () => { |
| | | getCaptcha().then((rsp) => { |
| | | if (rsp.code == 200) { |
| | | this.captchaId = rsp.data.captchaId |
| | | this.captcha = rsp.data.picPath |
| | | } |
| | | }) |
| | | } |
| | | onMounted(() => { |
| | | // 获取验证码 |
| | | getCaptcha().then((rsp) => { |
| | | if (rsp.code == 200) { |
| | | this.captchaId = rsp.data.captchaId |
| | | this.captcha = rsp.data.picPath |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | const rules = reactive<FormRules<typeof ruleForm>>({ |