fix:明确文字验证码按钮类型,登录表单组件添加 文字验证码 类型

pull/796/head
tsui 2025-08-02 18:59:54 +08:00
parent 4002d00672
commit 5a87a41812
3 changed files with 9 additions and 4 deletions

View File

@ -119,6 +119,10 @@ export default {
}
watchEffect(() => {
switch (captchaType.value) {
case 'pictureWord':
verifyType.value = '3'
componentType.value = 'VerifyPictureWord'
break
case 'blockPuzzle':
verifyType.value = '2'
componentType.value = 'VerifySlide'

View File

@ -37,7 +37,7 @@
}">
<input class="verify-input" type="text" v-model="userCode" />
</div>
<button class="verify-btn" @click="submit" @disabled="checking">{{ t('captcha.verify') }}</button>
<button type="button" class="verify-btn" @click="submit" :disabled="checking">{{ t('captcha.verify') }}</button>
</div>
</div>
</template>
@ -48,7 +48,7 @@
* */
import { resetSize } from '../utils/util';
import { aesEncrypt } from '../utils/ase';
import { getCode, reqCheck } from 'src/api/login';
import { getCode, reqCheck } from '@/api/login';
import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue';
const props = defineProps({

View File

@ -177,7 +177,8 @@ const permissionStore = usePermissionStore()
const redirect = ref<string>('')
const loginLoading = ref(false)
const verify = ref()
const captchaType = ref('blockPuzzle') // blockPuzzle clickWord
const captchaType = ref('pictureWord') // blockPuzzle clickWord pictureWord
// const captchaType = ref('blockPuzzle') // blockPuzzle clickWord pictureWord
const getShow = computed(() => unref(getLoginState) === LoginStateEnum.LOGIN)
@ -360,4 +361,4 @@ onMounted(() => {
cursor: pointer;
}
}
</style>
</style>