let firstDay = new Date();
firstDay.setFullYear(2022, 0, 28);
let lastDaty = new Date();
lastDaty.setFullYear(2022, 1, 10);
let today = new Date();
console.log(lastDaty, 'lastDaty');
console.log(firstDay, 'firstDay');
console.log(today, 'today');
if (firstDay < today && today < lastDaty) {
//是否大于2022.1.28小于2022.2.10号
this.dateShow = true;
} else {
this.dateShow = false;
}
this.noticeShow = uni.getStorageSync('dateShow') ? false : true;
<block v-if="dateShow">
<u-modal v-model="noticeShow" :content="content" title=" " :show-cancel-button="false" @confirm="toNotice"></u-modal>
</block>