From e2fe4bb0530dc314ac9e928040c6cf6c50885421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=20=E5=85=83=E5=B1=B1?= Date: Tue, 10 Sep 2024 20:59:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=EF=BC=8C=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/logon/index.vue | 9 ++++--- src/views/reg-details/index.vue | 48 ++++++++++++++++----------------- 2 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/views/logon/index.vue b/src/views/logon/index.vue index f805881..798b217 100644 --- a/src/views/logon/index.vue +++ b/src/views/logon/index.vue @@ -6,13 +6,18 @@ import { useUserStore } from '@/stores/userStore.js' import { storeToRefs } from "pinia"; const userStore = useUserStore() const { telNum, submitReturnData, iDCardImage, idCardInfo, recentPhoto, artworkFile, selectAddress, detailAddress } = storeToRefs(userStore); -import { ref, onBeforeUnmount, onMounted } from "vue"; +import { ref, onBeforeUnmount, onMounted, watch } from "vue"; import { check_by_phone, send_code, check_code } from "@/apis/index.js"; const router = useRouter(); const isCountingDown = ref(false); const timeLeft = ref(60); const countdownInterval = ref(null); const code = ref('') +watch(() => code.value, (newVal) => { + if (newVal.length > 6) { + code.value = newVal.slice(0, 6) + } +}) const sendCodeApi = async () => { const data = { TelNum: telNum.value @@ -65,7 +70,6 @@ const isSignUp = async () => { } else { router.push(`/title-forward/upload-id-card/${0}`) } - } } const goRouter = async () => { @@ -91,7 +95,6 @@ const goRouter = async () => { if (res.status === 0) { isSignUp() } - // isSignUp() } onBeforeUnmount(() => { clearInterval(countdownInterval.value); diff --git a/src/views/reg-details/index.vue b/src/views/reg-details/index.vue index 0e714a1..65d2183 100644 --- a/src/views/reg-details/index.vue +++ b/src/views/reg-details/index.vue @@ -1,6 +1,6 @@