|
@@ -10,7 +10,7 @@
|
|
|
<input type="text" id="student_num" placeholder="学号">
|
|
<input type="text" id="student_num" placeholder="学号">
|
|
|
<input type="text" id="captcha" placeholder="验证码">
|
|
<input type="text" id="captcha" placeholder="验证码">
|
|
|
<div id="captchaImg" @click="getCaptcha()" title="点击更换验证码">
|
|
<div id="captchaImg" @click="getCaptcha()" title="点击更换验证码">
|
|
|
- <img alt="点我重试" :src="ImageCaptcha" v-if="ImageCaptcha" />
|
|
|
|
|
|
|
+ <img alt="点我重试" :src="ImageCaptcha" v-if="!captchaLoading" />
|
|
|
<a-spin dot v-else />
|
|
<a-spin dot v-else />
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -39,7 +39,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
-import { ref, reactive, onMounted } from 'vue'
|
|
|
|
|
|
|
+import { ref, onMounted } from 'vue'
|
|
|
import { Message } from '@arco-design/web-vue'
|
|
import { Message } from '@arco-design/web-vue'
|
|
|
import { BeginFaceReco } from '@/api/lepao'
|
|
import { BeginFaceReco } from '@/api/lepao'
|
|
|
import { getImageCaptcha } from '@/api/login'
|
|
import { getImageCaptcha } from '@/api/login'
|
|
@@ -50,11 +50,13 @@ const step = ref(1)
|
|
|
const buttonLoading = ref(false)
|
|
const buttonLoading = ref(false)
|
|
|
const userInfo = ref({})
|
|
const userInfo = ref({})
|
|
|
|
|
|
|
|
|
|
+const captchaLoading = ref(true)
|
|
|
let CaptchaId = ref('')
|
|
let CaptchaId = ref('')
|
|
|
let ImageCaptcha = ref('')
|
|
let ImageCaptcha = ref('')
|
|
|
|
|
|
|
|
const getCaptcha = async () => {
|
|
const getCaptcha = async () => {
|
|
|
try {
|
|
try {
|
|
|
|
|
+ captchaLoading.value = true
|
|
|
const res = await getImageCaptcha()
|
|
const res = await getImageCaptcha()
|
|
|
if (!res || res.code != 0)
|
|
if (!res || res.code != 0)
|
|
|
return Message.error('获取图片验证码失败!' + res?.msg ?? '')
|
|
return Message.error('获取图片验证码失败!' + res?.msg ?? '')
|
|
@@ -62,6 +64,8 @@ const getCaptcha = async () => {
|
|
|
CaptchaId.value = res.data.id
|
|
CaptchaId.value = res.data.id
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
Message.error('获取图片验证码失败!')
|
|
Message.error('获取图片验证码失败!')
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ captchaLoading.value = false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|