fix captcha invalid

This commit is contained in:
Timi
2026-08-29 01:07:51 +08:00
parent 754694516a
commit 04179fa55c
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -32,7 +32,7 @@
<t-input v-model.trim="formModel.captcha" borderless placeholder="请输入验证码" />
</t-form-item>
<div class="captcha-wrapper">
<captcha ref="captchaRef" class="captcha" :width="120" :height="40" @error="handleCaptchaError" />
<captcha ref="captchaRef" class="captcha" :width="120" :height="40" :request="CommonAPI.captcha" @error="handleCaptchaError" />
</div>
<t-form-item label="短信验证码">
<t-input v-model.trim="formModel.smsCode" borderless placeholder="请输入短信验证码" />
@@ -57,7 +57,7 @@
<script setup lang="ts">
import { Message } from "@/utils/message";
import { Captcha, Time } from "timi-web";
import { NotifyAPI, useUserStore, type LoginResponse } from "timi-web-api";
import { CommonAPI, NotifyAPI, useUserStore, type LoginResponse } from "timi-web-api";
import ManagedUserAPI from "@/api/ManagedUserAPI";
import { useCurrentStoreStore } from "@/store/currentStoreStore";
import Logo from "@/pages/user/component/Logo.vue";
+2 -2
View File
@@ -10,7 +10,7 @@
<t-input v-model.trim="formModel.captcha" placeholder="请输入验证码" borderless />
</t-form-item>
<div class="captcha-wrapper">
<captcha class="captcha" ref="captchaRef" :width="120" :height="40" />
<captcha class="captcha" ref="captchaRef" :width="120" :height="40" :request="CommonAPI.captcha" />
</div>
<div class="exec">
<t-button theme="primary" class="button" type="submit" :loading="isSubmitting" :disabled="isSubmitting">登录</t-button>
@@ -21,7 +21,7 @@
<script setup lang="ts">
import { Message } from "@/utils/message";
import { Captcha } from "timi-web";
import { useUserStore } from "timi-web-api";
import { CommonAPI, useUserStore } from "timi-web-api";
import { useCurrentStoreStore } from "@/store/currentStoreStore";
type CaptchaExpose = {
+2 -2
View File
@@ -7,7 +7,7 @@
<t-input v-model.trim="formModel.captcha" class="captcha-input" placeholder="请输入验证码" borderless />
</t-form-item>
<div class="captcha-wrapper">
<captcha ref="captchaRef" class="captcha" :width="120" :height="40" />
<captcha ref="captchaRef" class="captcha" :width="120" :height="40" :request="CommonAPI.captcha" />
</div>
<t-form-item label="短信验证码">
<t-input v-model.trim="formModel.smsCode" class="sms-code" placeholder="请输入短信验证码" borderless />
@@ -32,7 +32,7 @@
<script setup lang="ts">
import { Message } from "@/utils/message";
import { Captcha } from "timi-web";
import { NotifyAPI, UserAPI, useUserStore } from "timi-web-api";
import { CommonAPI, NotifyAPI, UserAPI, useUserStore } from "timi-web-api";
import { useCurrentStoreStore } from "@/store/currentStoreStore";
type CaptchaExpose = {