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(() => { watchEffect(() => {
switch (captchaType.value) { switch (captchaType.value) {
case 'pictureWord':
verifyType.value = '3'
componentType.value = 'VerifyPictureWord'
break
case 'blockPuzzle': case 'blockPuzzle':
verifyType.value = '2' verifyType.value = '2'
componentType.value = 'VerifySlide' componentType.value = 'VerifySlide'

View File

@ -37,7 +37,7 @@
}"> }">
<input class="verify-input" type="text" v-model="userCode" /> <input class="verify-input" type="text" v-model="userCode" />
</div> </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>
</div> </div>
</template> </template>
@ -48,7 +48,7 @@
* */ * */
import { resetSize } from '../utils/util'; import { resetSize } from '../utils/util';
import { aesEncrypt } from '../utils/ase'; 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'; import { getCurrentInstance, nextTick, onMounted, reactive, ref, toRefs } from 'vue';
const props = defineProps({ const props = defineProps({

View File

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