diff --git a/index.html b/index.html index b1f63b6..e142b54 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ 兰州沙盘 - + diff --git a/src/components/VHeader.vue b/src/components/VHeader.vue index 0285c8c..19bec14 100644 --- a/src/components/VHeader.vue +++ b/src/components/VHeader.vue @@ -1,25 +1,46 @@ - diff --git a/src/images/header/headertime.png b/src/images/header/headertime.png new file mode 100644 index 0000000..4dfe5fa --- /dev/null +++ b/src/images/header/headertime.png diff --git a/src/utils/formate.js b/src/utils/formate.js new file mode 100644 index 0000000..74f29f3 --- /dev/null +++ b/src/utils/formate.js @@ -0,0 +1,15 @@ +function formateTime() { + let date = new Date() + let str = '' + let year = date.getFullYear() + let month = date.getMonth()+1<10? "0"+ (date.getMonth()+1) : date.getMonth()+1 + let day = date.getDate()<10 ? "0"+date.getDate() : date.getDate + let hours = date.getHours()<10? "0"+date.getHours() : date.getHours() + let minutes=date.getMinutes()<10 ? "0"+date.getMinutes() : date.getMinutes(); + let seconds=date.getSeconds()<10 ? "0"+date.getSeconds() : date.getSeconds(); + + str = year +"-"+ month +"-"+day +hours+":"+minutes+":"+seconds + return str +} + +export { formateTime }