submit
This commit is contained in:
parent
38e84fd4d0
commit
4c53b69e20
@ -24,5 +24,15 @@ const iDCardImage=ref({
|
|||||||
watch(submitReturnData,()=>{
|
watch(submitReturnData,()=>{
|
||||||
storage.setItem('submitReturnData',submitReturnData.value)
|
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
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
@ -5,9 +5,9 @@ import storage from '@/utils/storage.js';
|
|||||||
import {useUserStore} from '@/stores/userStore.js'
|
import {useUserStore} from '@/stores/userStore.js'
|
||||||
import {storeToRefs} from "pinia";
|
import {storeToRefs} from "pinia";
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const {telNum,submitReturnData} = storeToRefs(userStore);
|
const {telNum,submitReturnData,iDCardImage,idCardInfo,recentPhoto,selectAddress,detailAddress} = storeToRefs(userStore);
|
||||||
import {ref,onBeforeUnmount} from "vue";
|
import {ref,onBeforeUnmount,onMounted} from "vue";
|
||||||
import {check_by_phone, check_code, send_code} from "@/apis/index.js";
|
import {check_by_phone, send_code} from "@/apis/index.js";
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const isCountingDown = ref(false);
|
const isCountingDown = ref(false);
|
||||||
const timeLeft = ref(60);
|
const timeLeft = ref(60);
|
||||||
@ -21,6 +21,16 @@ const sendCodeApi=async ()=>{
|
|||||||
if (res.status===0){
|
if (res.status===0){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
onMounted(()=>{
|
||||||
|
iDCardImage.value={
|
||||||
|
front:'',
|
||||||
|
back:''
|
||||||
|
}
|
||||||
|
idCardInfo.value={}
|
||||||
|
recentPhoto.value=''
|
||||||
|
selectAddress.value=null
|
||||||
|
detailAddress.value=''
|
||||||
|
})
|
||||||
const sendCode = async () => {
|
const sendCode = async () => {
|
||||||
if (!isCountingDown.value){
|
if (!isCountingDown.value){
|
||||||
if(!/^1[3-9]\d{9}$/.test(telNum.value)){
|
if(!/^1[3-9]\d{9}$/.test(telNum.value)){
|
||||||
@ -31,7 +41,6 @@ const sendCode = async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
await sendCodeApi()
|
await sendCodeApi()
|
||||||
|
|
||||||
}
|
}
|
||||||
isCountingDown.value = true;
|
isCountingDown.value = true;
|
||||||
countdownInterval.value = setInterval(() => {
|
countdownInterval.value = setInterval(() => {
|
||||||
|
@ -42,7 +42,9 @@ const rightClick=async ()=>{
|
|||||||
}
|
}
|
||||||
const res=await check_code(data)
|
const res=await check_code(data)
|
||||||
if (res.status===0){
|
if (res.status===0){
|
||||||
|
temSubmitReturnData.value=submitReturnData.value
|
||||||
saveInfo()
|
saveInfo()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const leftClick=()=>{
|
const leftClick=()=>{
|
||||||
@ -116,7 +118,7 @@ const compareDate=(givenDate)=> {
|
|||||||
} else if (inputDate.isBefore(now.add(3, 'month'))) {
|
} else if (inputDate.isBefore(now.add(3, 'month'))) {
|
||||||
return '*身份证即将到期,请及时更换→→→';
|
return '*身份证即将到期,请及时更换→→→';
|
||||||
} else {
|
} else {
|
||||||
return ''
|
return '*身份证状态正常→→→'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const goRouter=()=>{
|
const goRouter=()=>{
|
||||||
@ -175,8 +177,8 @@ const goRouter=()=>{
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content7" v-if="compareDate(submitReturnData.idCardEndDate)">
|
<div class="content7" v-if="btnStatus===1">
|
||||||
<div class="wrap1">{{compareDate(submitReturnData.idCardEndDate)}}</div>
|
<div class="wrap1" v-if="compareDate(submitReturnData.idCardEndDate)">{{compareDate(submitReturnData.idCardEndDate)}}</div>
|
||||||
<div class="wrap2" @click="goRouter">更换身份证</div>
|
<div class="wrap2" @click="goRouter">更换身份证</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content4">
|
<div class="content4">
|
||||||
@ -242,11 +244,10 @@ const goRouter=()=>{
|
|||||||
</div>
|
</div>
|
||||||
<div class="content5">
|
<div class="content5">
|
||||||
<div class="wrap1" @click="leftClick" :class="[`btn${btnStatus}`]">{{ btnLabel }}</div>
|
<div class="wrap1" @click="leftClick" :class="[`btn${btnStatus}`]">{{ btnLabel }}</div>
|
||||||
<div class="wrap2" @click="rightClick">确认</div>
|
<div class="wrap2" v-if="btnStatus===1" @click="rightClick">确认</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.container {
|
.container {
|
||||||
padding: 14px 22px 75px;
|
padding: 14px 22px 75px;
|
||||||
@ -256,6 +257,7 @@ const goRouter=()=>{
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
.wrap2{
|
.wrap2{
|
||||||
|
margin-left: auto;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -446,7 +448,8 @@ const goRouter=()=>{
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
&.btn0{
|
&.btn0{
|
||||||
background-color: #24437E;
|
width: 100%;
|
||||||
|
background-color: #2159C4;
|
||||||
}
|
}
|
||||||
&.btn1{
|
&.btn1{
|
||||||
background-color: #5A5A5A;
|
background-color: #5A5A5A;
|
||||||
|
Loading…
Reference in New Issue
Block a user