diff --git a/app/pages/collectCode/login/index.vue b/app/pages/collectCode/login/index.vue index f99f91c..02f30af 100644 --- a/app/pages/collectCode/login/index.vue +++ b/app/pages/collectCode/login/index.vue @@ -36,7 +36,6 @@ const countdown = ref(0); const phoneNum = ref('') const code = ref('') const pane = ref(0) -const showKeyboard = ref(false); const getFingerprint = async () => { const fp = await FingerprintJS.load() const result = await fp.get() @@ -50,6 +49,7 @@ const checkFingerprint = async () => { await router.push('/collectCode/mine') } } +const isFocused = ref(false) checkFingerprint() const vanSwipeRef = ref(null) const getCode = async () => { @@ -63,23 +63,13 @@ const getCode = async () => { if (res.status === 0) { pane.value = 1 vanSwipeRef.value?.swipeTo(pane.value) - showKeyboard.value = true + nextTick(()=>{ + codeInput.value.focus() + }) } } - /* loadingRef.value.loading1 = false - if (res.status === 0) { - } - pane.value = 1 - vanSwipeRef.value?.swipeTo(pane.value) - showKeyboard.value = true - startCountdown();*/ - /* pane.value = 1 - vanSwipeRef.value?.swipeTo(pane.value) - showKeyboard.value=true - startCountdown();*/ - } const changeToPwd = async () => { loginType.value = loginType.value === 0 ? 1 : 0 @@ -184,7 +174,24 @@ const togglePasswordVisibility = () => {
{{ $t('collectCode.login.hasSendTo') }}
+86 {{ phoneNum }}
- +
+ + +
{{ $t('collectCode.login.reSend') }}({{ countdown }}) @@ -205,7 +212,6 @@ const togglePasswordVisibility = () => {
-
diff --git a/app/pages/login/index.vue b/app/pages/login/index.vue index d32249a..60765eb 100644 --- a/app/pages/login/index.vue +++ b/app/pages/login/index.vue @@ -19,6 +19,7 @@ const loadingRef=ref({ }) const isExist=ref(false)//帐号是否存在 true存在 const isReal=ref(false) //isReal 是否实名过 +const codeInput=ref(null) function goToPage() { router.push('/countryRegion'); } @@ -40,7 +41,6 @@ const countdown = ref(0); const phoneNum = ref('') const code = ref('') const pane = ref(0) -const showKeyboard = ref(false); // 根据语言获取默认国家 const getDefaultCountry = () => { let defaultCode = 'CN' // 默认中国大陆 @@ -98,13 +98,11 @@ const getCode =async () => { } pane.value = 1 vanSwipeRef.value?.swipeTo(pane.value) - showKeyboard.value=true + startCountdown(); -/* pane.value = 1 - vanSwipeRef.value?.swipeTo(pane.value) - showKeyboard.value=true - startCountdown();*/ - + nextTick(()=>{ + codeInput.value.focus() + }) } const goBack = () => { code.value = '' @@ -142,7 +140,7 @@ const goLogin =async () => { } const isKeyboardVisible = ref(false) const windowHeight = ref(window.innerHeight) - +const isFocused = ref(false) onMounted(() => { // 记录初始窗口高度 windowHeight.value = window.innerHeight @@ -197,20 +195,22 @@ onUnmounted(() => {
{{ $t('login.hasSendTo') }}
+{{ selectedZone }} {{ phoneNum }}
-
+