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 @@