【2022版学平险三款产品】学平险的指定生效日期需要根据这个规则调整一下,改为当前时间为9月30号

This commit is contained in:
li.yuetong
2022-05-26 17:20:41 +08:00
parent bc3e172d3d
commit 54f1be83c8
2 changed files with 3 additions and 3 deletions

View File

@@ -11,7 +11,7 @@ export default {
}, },
getAfterDays: function(days) { getAfterDays: function(days) {
//获取“多少天数”之后的时间 例如28天后 即days=28 //获取“多少天数”之后的时间 例如28天后 即days=28
let currentTime = new Date('2022-07-04').getTime() let currentTime = new Date('2022-09-30').getTime()
return new Date(Number(currentTime) + 1000 * 60 * 60 * 24 * days) return new Date(Number(currentTime) + 1000 * 60 * 60 * 24 * days)
}, },
isLeapYear: function(year) { isLeapYear: function(year) {
@@ -32,7 +32,7 @@ export default {
//date1结束时间 //date1结束时间
let date1 = new Date(Date_end); let date1 = new Date(Date_end);
//date2当前时间 //date2当前时间
let date2 = new Date('2022-07-04'); let date2 = new Date('2022-09-30');
date1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()); date1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());
date2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate()); date2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
const diff = date1.getTime() - date2.getTime(); //目标时间减去当前时间 const diff = date1.getTime() - date2.getTime(); //目标时间减去当前时间

View File

@@ -628,7 +628,7 @@ export default {
proSchemeCode: '', proSchemeCode: '',
productDate: '', //保险期间 productDate: '', //保险期间
now: afterDate.getAfterDays(1), //指定生效日期最小值 now: afterDate.getAfterDays(1), //指定生效日期最小值
currentMonth: 7, //当前月份 currentMonth: 9, //当前月份
// currentMonth: new Date().getMonth() + 1, //当前月份 // currentMonth: new Date().getMonth() + 1, //当前月份
currentYear: new Date().getFullYear(), //当前年份 currentYear: new Date().getFullYear(), //当前年份
certiexpiredateMin: afterDate.getAfterDays(1), //证件截止日期最小值 certiexpiredateMin: afterDate.getAfterDays(1), //证件截止日期最小值