diff --git a/src/components/Verifition/src/Verify.vue b/src/components/Verifition/src/Verify.vue index b7b504861c7117cceb9691c28e80edbae6203e97..bd7bd21b0f332b844a9dac2f5cb5fa57c4e43ecc 100644 --- a/src/components/Verifition/src/Verify.vue +++ b/src/components/Verifition/src/Verify.vue @@ -36,14 +36,15 @@ * Verify 验证码组件 * @description 分发验证码使用 * */ -import { VerifyPoints, VerifySlide } from './Verify' +import { VerifyPoints, VerifySlide, VerifyInput } from './Verify' import { computed, ref, toRefs, watchEffect } from 'vue' export default { name: 'Vue3Verify', components: { VerifySlide, - VerifyPoints + VerifyPoints, + VerifyInput }, props: { captchaType: { @@ -118,14 +119,21 @@ export default { } watchEffect(() => { switch (captchaType.value) { - case 'blockPuzzle': + case 'blockPuzzle': // 滑块拼图 verifyType.value = '2' componentType.value = 'VerifySlide' break - case 'clickWord': + case 'clickWord': // 文字点选 verifyType.value = '' componentType.value = 'VerifyPoints' break + case 'pictureWord': // 文字输入 + verifyType.value = '' + componentType.value = 'VerifyInput' + break + default: + // TODO 不支持的验证码类型,如:rotatePuzzle 旋转拼图 + break } }) diff --git a/src/components/Verifition/src/Verify/VerifyInput.vue b/src/components/Verifition/src/Verify/VerifyInput.vue new file mode 100644 index 0000000000000000000000000000000000000000..90712d00c1abb91fff51c8f9350755ebfbb52d6a --- /dev/null +++ b/src/components/Verifition/src/Verify/VerifyInput.vue @@ -0,0 +1,162 @@ + + + + + + + + + + + + {{ t('login.code') }} + + 确定 + + + + diff --git a/src/components/Verifition/src/Verify/index.ts b/src/components/Verifition/src/Verify/index.ts index 0daa63a560e8efef28532d3b9488fbcadbcf27b1..f00dfe3e404214fd5f24009d76e13862d2c632e4 100644 --- a/src/components/Verifition/src/Verify/index.ts +++ b/src/components/Verifition/src/Verify/index.ts @@ -1,4 +1,5 @@ import VerifySlide from './VerifySlide.vue' import VerifyPoints from './VerifyPoints.vue' +import VerifyInput from './VerifyInput.vue' -export { VerifySlide, VerifyPoints } +export {VerifySlide, VerifyPoints, VerifyInput} diff --git a/src/views/Login/SocialLogin.vue b/src/views/Login/SocialLogin.vue index e0caace83985aa4b66318417c46c58b3fb29c880..f4a5d19ddd70b680379243216e25866e7ce9c812 100644 --- a/src/views/Login/SocialLogin.vue +++ b/src/views/Login/SocialLogin.vue @@ -185,7 +185,7 @@ const { push } = useRouter() const permissionStore = usePermissionStore() const loginLoading = ref(false) const verify = ref() -const captchaType = ref('blockPuzzle') // blockPuzzle 滑块 clickWord 点击文字 +const captchaType = ref('blockPuzzle') // blockPuzzle 滑块拼图 clickWord 点击文字 pictureWord 文本输入 const getShow = computed(() => unref(getLoginState) === LoginStateEnum.LOGIN) diff --git a/src/views/Login/components/ForgetPasswordForm.vue b/src/views/Login/components/ForgetPasswordForm.vue index 0c3b2e04ff858e09d58a838fa17ff31287917bd4..3e6edac71e9c4eebb0392b4d81da3166cb8098a6 100644 --- a/src/views/Login/components/ForgetPasswordForm.vue +++ b/src/views/Login/components/ForgetPasswordForm.vue @@ -38,6 +38,7 @@ unref(getLoginState) === LoginStateEnum.RESET_PASSWORD) -const captchaType = ref('blockPuzzle') // blockPuzzle 滑块 clickWord 点击文字 +const captchaType = ref('blockPuzzle') // blockPuzzle 滑块拼图 clickWord 点击文字 pictureWord 文本输入 const validatePass2 = (_rule, value, callback) => { if (value === '') { diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue index 3c4e1d1a97039ee3a8c973d4ffcdcd35a8f76dbf..29d0e7ab507eb6a504c232e00b06b12441d26178 100644 --- a/src/views/Login/components/LoginForm.vue +++ b/src/views/Login/components/LoginForm.vue @@ -82,7 +82,7 @@ ('') const loginLoading = ref(false) const verify = ref() -const captchaType = ref('blockPuzzle') // blockPuzzle 滑块 clickWord 点击文字 +const captchaType = ref('blockPuzzle') // blockPuzzle 滑块拼图 clickWord 点击文字 pictureWord 文本输入 const getShow = computed(() => unref(getLoginState) === LoginStateEnum.LOGIN) diff --git a/src/views/Login/components/RegisterForm.vue b/src/views/Login/components/RegisterForm.vue index 0636a1c8265eee15857259a8bcfae15f1422966c..407fe39bb10c7b8a8d72b2177bf2d17923c0440a 100644 --- a/src/views/Login/components/RegisterForm.vue +++ b/src/views/Login/components/RegisterForm.vue @@ -85,7 +85,7 @@ ('') const loginLoading = ref(false) const verify = ref() -const captchaType = ref('blockPuzzle') // blockPuzzle 滑块 clickWord 点击文字 +const captchaType = ref('blockPuzzle') // blockPuzzle 滑块拼图 clickWord 点击文字 pictureWord 文本输入 const getShow = computed(() => unref(getLoginState) === LoginStateEnum.REGISTER)