diff --git a/index.html b/index.html
index 2d5a1da..bc50105 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,8 @@
-
= [
icon: '',
},
component: () => import('views/Index.vue'),
+ children:[]
},
{
path: '/screen/sharePlatform',
diff --git a/src/views/screen/sharePlatform.vue b/src/views/screen/sharePlatform.vue
index 954fb46..71f4db7 100644
--- a/src/views/screen/sharePlatform.vue
+++ b/src/views/screen/sharePlatform.vue
@@ -7,7 +7,7 @@
晴转多云 16℃
- 2023.11.16 星期四 09:56:12
+ {{ nowTime }}
@@ -372,6 +372,7 @@ onMounted(() => {
iniTapiBmCompanyInfoTypeLis()
iniTapiMaDevInfoMaList()
+ InitApiMaLeaseInfoInfoTypeList()
})
@@ -513,9 +514,26 @@ const InitApiMaLeaseInfoInfoTypeList= async()=>{
}
}
-onMounted(()=>{
- InitApiMaLeaseInfoInfoTypeList()
-})
+const nowTime = ref("")
+
+// 实时获取当前时间, 格式为 2023.11.16 星期四 09:56:12
+const getCurrentWeather = () => {
+ const date = new Date()
+ const year = date.getFullYear()
+ const month = (date.getMonth() + 1 + '').padStart(2, '0')
+ const day = (date.getDate() + '').padStart(2, '0')
+ const week = date.getDay()
+ const weekArr = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
+ const hour = (date.getHours() + '').padStart(2, '0')
+ const minute = (date.getMinutes() + '').padStart(2, '0')
+ const second = (date.getSeconds() + '').padStart(2, '0')
+ return `${year}.${month}.${day} ${weekArr[week]} ${hour}:${minute}:${second}`
+}
+
+setInterval(() => {
+ nowTime.value = getCurrentWeather()
+}, 1000)
+