['设置中心']

This commit is contained in:
2021-09-24 15:11:14 +08:00
parent 08c56ea921
commit 3dc185139c
172 changed files with 13194 additions and 433 deletions

30
public/date.js Normal file
View File

@@ -0,0 +1,30 @@
/**
* Web唐明明
* 匆匆数载恍如梦,岁月迢迢华发增。
* 碌碌无为枉半生,一朝惊醒万事空。
* moduleName: 日期
*/
export default getDate = (type) =>{
return new Promise((resolve, reject) => {
const date = new Date()
const year = date.getFullYear()
const month = (date.getMonth() + 1) <= 9 ? '0' + (date.getMonth() + 1) : date.getMonth()
const day = date.getDate()
switch(type){
case 'day':
resolve(year + '-' + month + '-' + day)
break
case 'month':
resolve(year + '-' + month)
break
case 'year':
resolve(year)
break
default:
resolve(year + '-' + month + '-' + day)
}
})
}