Commit 0b0701b2 by 胡悦

Merge branch 'v1.0.0' of http://192.168.3.233:8090/h5/glsk-data-view-scene into v1.0.0

2 parents 3cfa5ccd 993ef5c7
.top_head {
display: flex;
justify-content: space-between;
background: url('../assets/images/top_bg.png') no-repeat center bottom;
background-size: 100% auto;
height: 102px;
.logo,
.right_box {
flex: 1;
flex-shrink: 0;
box-sizing: border-box;
}
.logo {
.img {
width: 166px;
height: 36px;
margin: 18px 0 0 32px;
}
}
.title_box {
box-sizing: border-box;
padding-top: 19px;
text-align: center;
.title {
flex: 2;
font-family: SourceHanSansCN-Bold;
font-weight: 700;
font-size: 44px;
letter-spacing: 5px;
// background: linear-gradient(left right, #00c8ff 0%, #0069f2 100%);
// background-clip: text;
// -webkit-background-clip: text;
// -webkit-text-fill-color: transparent;
background: linear-gradient(to right,
#00c8ff 0%,
#0069f2 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
.right_box {
display: flex;
justify-content: flex-end;
.time_box {
display: flex;
flex-direction: column;
margin-top: 19px;
.date {
font-family: SourceHanSansCN-Medium;
font-weight: 500;
font-size: 10px;
color: #56FEFE;
letter-spacing: 0;
line-height: 15px;
}
.time {
font-family: SourceHanSansCN-Medium;
font-weight: 500;
font-size: 20px;
color: #56FEFE;
letter-spacing: 2px;
line-height: 29px;
}
}
.welcome {
width: 196px;
height: 52px;
background: url('../assets/images/top_user.png') no-repeat top center;
background-size: 100% auto;
text-align: center;
margin: 10px 24px 0 68px;
line-height: 52px;
span {
font-family: SourceHanSansCN-Regular;
font-weight: 400;
font-size: 14px;
color: #56FEFE;
letter-spacing: 0;
// margin-top:16px;
line-height: 0;
}
}
}
}
\ No newline at end of file \ No newline at end of file
<template>
<div class="top_head">
<!-- logo 开始 -->
<div class="logo">
<img src="@/assets/images/top_logo.png" class="img" alt="" />
</div>
<!-- logo end -->
<!-- 标题 开始 -->
<div class="title_box">
<span class="title">{{ title }}</span>
</div>
<!-- 标题 end -->
<!-- 欢迎词 开始 -->
<div class="right_box">
<!-- 日期、时间 开始 -->
<div class="time_box">
<span class="date">{{ month }}月{{ day }}日 {{ week }}</span>
<span class="time">{{ time }}</span>
</div>
<!-- 日期、时间 end -->
<div class="welcome">
<span>欢迎回来!</span>
</div>
</div>
<!-- 欢迎词 end -->
</div>
</template>
<script>
export default {
name: 'TopHead',
props: {
title: {
type: String,
default: '广联数科运营看板'
}
},
data() {
return {
month: '',
day: '',
week: '',
time: '',
timeInterval: ''
}
},
mounted() {
let weekList = {
1: '周一',
2: '周二',
3: '周三',
4: '周四',
5: '周五',
6: '周六',
7: '周日'
}
let m = new Date()
this.month = m.getMonth() + 1
this.day = m.getDate()
this.week = weekList[m.getDay()]
this.initTime();
},
methods: {
// 定时获取时间
initTime() {
let _this = this
if (this.timeInterval) {
clearInterval(this.timeInterval)
}
_this.timeInterval = setInterval(function () {
_this.time = _this.getTime()
}, 1000)
},
// 获取时间
getTime() {
let time = ''
let o = new Date()
let h = o.getHours()
let m = o.getMinutes()
let s = o.getSeconds()
time = `${h < 10 ? '0' + h : h}:${m < 10 ? '0' + m : m}:${s < 10 ? '0' + s : s}`
return time
}
}
}
</script>
<style lang="scss" scoped>
@import '@/assets/css/topHead.scss';
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!