更换图标+实时显示时间
This commit is contained in:
parent
cda5e07f7b
commit
0c62a7c904
|
|
@ -4,7 +4,8 @@
|
|||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Vite App</title>
|
||||
<title>机具租赁共享平台</title>
|
||||
<link rel="icon" href="//test-hzdg-1259451974.cos.ap-guangzhou.myqcloud.com/d133bcbb33438a196a8ccd4eda65934f1742495961134923776354.png" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ const routes: Array<RouteRecordRaw> = [
|
|||
icon: '',
|
||||
},
|
||||
component: () => import('views/Index.vue'),
|
||||
children:[]
|
||||
},
|
||||
{
|
||||
path: '/screen/sharePlatform',
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
</div>
|
||||
<div class="right_title_more_info">
|
||||
<span class="wheather">晴转多云 16℃ </span>
|
||||
<span class="time">2023.11.16 星期四 09:56:12</span>
|
||||
<span class="time">{{ nowTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="count_info_row2">
|
||||
|
|
@ -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)
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -559,7 +577,6 @@ onMounted(()=>{
|
|||
.wheather {
|
||||
padding-right: 34px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue