1234567891011121314151617181920212223242526272829303132333435363738394041// 思路:获取时间戳的差// 时间差除以时间格式需要的倍数 如果超过1 则表示时间差在这个等级中function getDateDiff(dateTimeStamp) { const now = Date.now() const diffValue = now - dateTimeStamp if (diffValue < 0) { console.error('结束日期不能小于开始日期!') return } // 时间格式转换需要的数字倍数 const minute = 1000 * 60 // const hour = minute * 60// const day = hour * 24 // 几天前 const month = day * 30 // 月 // 时间差 除以时间格式需要的倍数 const monthC = diffValue ...