1. 日期差值换算
2. 模板字符串
const day = Math.floor((new Date()- new Date(person.registTime).getTime()) / 1000 / 60 / 60 / 24); h2.innerHTML = `尊贵的牛客网2级用户${person.name}您好,您已经注册牛客网${day}天啦~`
const day = Math.floor((new Date()- new Date(person.registTime).getTime()) / 1000 / 60 / 60 / 24); h2.innerHTML = `尊贵的牛客网2级用户${person.name}您好,您已经注册牛客网${day}天啦~`