submit
This commit is contained in:
parent
38e84fd4d0
commit
4c53b69e20
@ -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
|
||||
}
|
||||
});
|
||||
|
@ -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(() => {
|
||||
|
@ -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=()=>{
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content7" v-if="compareDate(submitReturnData.idCardEndDate)">
|
||||
<div class="wrap1">{{compareDate(submitReturnData.idCardEndDate)}}</div>
|
||||
<div class="content7" v-if="btnStatus===1">
|
||||
<div class="wrap1" v-if="compareDate(submitReturnData.idCardEndDate)">{{compareDate(submitReturnData.idCardEndDate)}}</div>
|
||||
<div class="wrap2" @click="goRouter">更换身份证</div>
|
||||
</div>
|
||||
<div class="content4">
|
||||
@ -242,11 +244,10 @@ const goRouter=()=>{
|
||||
</div>
|
||||
<div class="content5">
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.container {
|
||||
padding: 14px 22px 75px;
|
||||
@ -256,6 +257,7 @@ const goRouter=()=>{
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
.wrap2{
|
||||
margin-left: auto;
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
@ -446,7 +448,8 @@ const goRouter=()=>{
|
||||
font-size: 14px;
|
||||
color: #fff;
|
||||
&.btn0{
|
||||
background-color: #24437E;
|
||||
width: 100%;
|
||||
background-color: #2159C4;
|
||||
}
|
||||
&.btn1{
|
||||
background-color: #5A5A5A;
|
||||
|
Loading…
Reference in New Issue
Block a user