Commit 0919e918 authored by Mac's avatar Mac

1

parent 0f7f4ef3
......@@ -279,6 +279,7 @@
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/pd-sr.png"
></image>
<text>{{ dataList.BirthdayYear }}</text>
<!-- <text>{{ getyear() }}</text> -->
<text style="margin: 0 5px">·</text>
<text>{{ dataList.ConoldBaseInfostellation }}</text>
</view>
......@@ -839,6 +840,33 @@ export default {
});
},
getyear(){
//认证了取身份证上的年份 没认证取用户填写的年份
if(this.dataList.IsAttestation==1){
let text = this.dataList.IDCardNo!=''? this.getBirthdatByIdNo(this.dataList.IDCardNo):""
return text
}else{
return this.dataList.BirthdayYear
}
},
getBirthdatByIdNo(iIdNo) {//获取身份证的年份
var tmpStr = "";
var idDate = "";
var tmpInt = 0;
var strReturn = "";
iIdNo = iIdNo.replace(/^\s+|\s+$/g, "");
if (iIdNo.length == 15) {
tmpStr = iIdNo.substring(6, 12);
tmpStr = "19" + tmpStr;
}else{
tmpStr = iIdNo.substring(6, 14);
}
// tmpStr = tmpStr.substring(0, 4) + "-" + tmpStr.substring(4, 6) + "-" + tmpStr.substring(6)
tmpStr = tmpStr.substring(0, 4)
return tmpStr;
}
},
};
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment