diff --git a/src/stores/userStore.js b/src/stores/userStore.js index 45b926c..41d23bb 100644 --- a/src/stores/userStore.js +++ b/src/stores/userStore.js @@ -24,5 +24,15 @@ const iDCardImage=ref({ watch(submitReturnData,()=>{ storage.setItem('submitReturnData',submitReturnData.value) }) - return {idCardInfo,iDCardImage,recentPhoto,telNum,selectAddress,detailAddress,submitReturnData,formatToCustomDate,temSubmitReturnData} + return { + idCardInfo, + iDCardImage, + recentPhoto, + telNum, + selectAddress, + detailAddress, + submitReturnData, + formatToCustomDate, + temSubmitReturnData +} }); diff --git a/src/views/logon/index.vue b/src/views/logon/index.vue index b59b5ac..43ce222 100644 --- a/src/views/logon/index.vue +++ b/src/views/logon/index.vue @@ -5,9 +5,9 @@ import storage from '@/utils/storage.js'; import {useUserStore} from '@/stores/userStore.js' import {storeToRefs} from "pinia"; const userStore = useUserStore() -const {telNum,submitReturnData} = storeToRefs(userStore); -import {ref,onBeforeUnmount} from "vue"; -import {check_by_phone, check_code, send_code} from "@/apis/index.js"; +const {telNum,submitReturnData,iDCardImage,idCardInfo,recentPhoto,selectAddress,detailAddress} = storeToRefs(userStore); +import {ref,onBeforeUnmount,onMounted} from "vue"; +import {check_by_phone, send_code} from "@/apis/index.js"; const router = useRouter(); const isCountingDown = ref(false); const timeLeft = ref(60); @@ -21,6 +21,16 @@ const sendCodeApi=async ()=>{ if (res.status===0){ } } +onMounted(()=>{ + iDCardImage.value={ + front:'', + back:'' + } + idCardInfo.value={} + recentPhoto.value='' + selectAddress.value=null + detailAddress.value='' +}) const sendCode = async () => { if (!isCountingDown.value){ if(!/^1[3-9]\d{9}$/.test(telNum.value)){ @@ -31,7 +41,6 @@ const sendCode = async () => { return } await sendCodeApi() - } isCountingDown.value = true; countdownInterval.value = setInterval(() => { diff --git a/src/views/reg-details/index.vue b/src/views/reg-details/index.vue index aa997d1..7f781c4 100644 --- a/src/views/reg-details/index.vue +++ b/src/views/reg-details/index.vue @@ -42,7 +42,9 @@ const rightClick=async ()=>{ } const res=await check_code(data) if (res.status===0){ + temSubmitReturnData.value=submitReturnData.value saveInfo() + } } const leftClick=()=>{ @@ -116,7 +118,7 @@ const compareDate=(givenDate)=> { } else if (inputDate.isBefore(now.add(3, 'month'))) { return '*身份证即将到期,请及时更换→→→'; } else { - return '' + return '*身份证状态正常→→→' } } const goRouter=()=>{ @@ -175,8 +177,8 @@ const goRouter=()=>{ -
-
{{compareDate(submitReturnData.idCardEndDate)}}
+
+
{{compareDate(submitReturnData.idCardEndDate)}}
更换身份证
@@ -242,11 +244,10 @@ const goRouter=()=>{
{{ btnLabel }}
-
确认
+
确认
-