|
|
|
@ -9,7 +9,9 @@ import dayjs from "dayjs";
|
|
|
|
|
|
|
|
|
|
const userStore = useUserStore()
|
|
|
|
|
const {idCardInfo,iDCardImage} = storeToRefs(userStore);
|
|
|
|
|
const Num=ref(0)
|
|
|
|
|
const afterRead = async (file, num) => {
|
|
|
|
|
Num.value=num
|
|
|
|
|
const res = await upload_img({
|
|
|
|
|
file: file.file,
|
|
|
|
|
source: "artwork",
|
|
|
|
@ -27,7 +29,6 @@ const afterRead = async (file, num) => {
|
|
|
|
|
const compareDate=(givenDate)=> {
|
|
|
|
|
const inputDate = dayjs(givenDate);
|
|
|
|
|
const now = dayjs();
|
|
|
|
|
|
|
|
|
|
if (inputDate.isBefore(now)) {
|
|
|
|
|
return '证件已到期,请尽快更新,否则将影响部分功能使用!';
|
|
|
|
|
} else if (inputDate.isBefore(now.add(3, 'month'))) {
|
|
|
|
@ -48,6 +49,12 @@ const cardFace = async (img, num) => {
|
|
|
|
|
idCardInfo.value.expirationDate=res.data.expirationDate
|
|
|
|
|
idCardInfo.value.issueDate=res.data.issueDate
|
|
|
|
|
}
|
|
|
|
|
}else if (res.status === 1) {
|
|
|
|
|
if(Num.value===0){
|
|
|
|
|
iDCardImage.value.front=''
|
|
|
|
|
}else if(Num.value===1){
|
|
|
|
|
iDCardImage.value.back=''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|