|
@@ -1,21 +1,20 @@
|
|
|
<template>
|
|
|
<div class="headview">
|
|
|
- <div class="asleft">
|
|
|
- <dv-scroll-board
|
|
|
- ref="scrollBoard"
|
|
|
- :config="config"
|
|
|
- style="width: 100%; height: 100%"
|
|
|
- />
|
|
|
+ <div class="dierjibie">
|
|
|
+ <img :src="[img0, img1, img2][swindex]" alt="" srcset="" />
|
|
|
+ <div class="asleft">
|
|
|
+ </div>
|
|
|
+ <div class="aszhongjian">
|
|
|
+ {{userInfo.companyWechatId ? userInfo.companyName : "售修宝运营平台"}}
|
|
|
+ </div>
|
|
|
+ <div class="asright">{{ timeStr }}</div>
|
|
|
</div>
|
|
|
- <img :src="[img0, img1, img2][swindex]" alt="" srcset="" />
|
|
|
- <div class="asright">{{ timeStr }}</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { dateFormat } from '@/utils/tool.js';
|
|
|
-import { tq } from '@/api/bigView.js';
|
|
|
-import img0 from '@/assets/head0.png';
|
|
|
+import { dateFormat2 } from '@/utils/util.js';
|
|
|
+import img0 from '@/assets/head8.png';
|
|
|
import img1 from '@/assets/head1.png';
|
|
|
import img2 from '@/assets/head2.png';
|
|
|
export default {
|
|
@@ -33,55 +32,26 @@ export default {
|
|
|
timeStr: '',
|
|
|
timeId: null,
|
|
|
info: {},
|
|
|
- config: {
|
|
|
- rowNum: 1,
|
|
|
- carousel: 'page',
|
|
|
- data: [],
|
|
|
- waitTime: 3000,
|
|
|
- },
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ // 用户信息
|
|
|
+ userInfo() {
|
|
|
+ return JSON.parse(localStorage.getItem('greemall_user'))
|
|
|
+ },
|
|
|
+ },
|
|
|
mounted() {
|
|
|
- this.gettq();
|
|
|
- this.timeId2 = setInterval(this.gettq, 60000 * 60 * 8);
|
|
|
- this.timeId = setInterval(() => {
|
|
|
- let date = new Date();
|
|
|
- this.timeStr = dateFormat('YYYY-mm-dd HH:MM:SS WWW', date);
|
|
|
- }, 1000);
|
|
|
+ this.jishikaishi()
|
|
|
},
|
|
|
beforeUnmount() {
|
|
|
this.timeId && clearInterval(this.timeId);
|
|
|
- this.timeId2 && clearInterval(this.timeId2);
|
|
|
},
|
|
|
methods: {
|
|
|
- gettq() {
|
|
|
- Promise.all([
|
|
|
- tq('广州市'),
|
|
|
- tq('清远市'),
|
|
|
- tq('韶关市'),
|
|
|
- tq('佛山市'),
|
|
|
- tq('肇庆市'),
|
|
|
- tq('云浮市'),
|
|
|
- ])
|
|
|
- .then((reslist) => {
|
|
|
- var atrlist = reslist.map((item2) => {
|
|
|
- var item = item2.data;
|
|
|
- return [
|
|
|
- `<div class="jajajaj">${
|
|
|
- item.result.city
|
|
|
- ? `${item.result.city} :${item.result.weather || ''} ${
|
|
|
- item.result.templow || ''
|
|
|
- }℃ ~${item.result.temphigh || ''}℃`
|
|
|
- : ''
|
|
|
- }</div>`,
|
|
|
- ];
|
|
|
- });
|
|
|
- this.$refs['scrollBoard'].updateRows(atrlist);
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
- },
|
|
|
+ jishikaishi(){
|
|
|
+ let date = new Date();
|
|
|
+ this.timeStr = dateFormat2('YYYY-mm-dd HH:MM:SS WWW', date);
|
|
|
+ this.timeId = setTimeout(this.jishikaishi,1000);
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -109,19 +79,43 @@ export default {
|
|
|
height: 100%;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
+ .dierjibie{
|
|
|
+ width: 100%;
|
|
|
+ min-width: 1600px;
|
|
|
+ height: 100%;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ }
|
|
|
img {
|
|
|
position: absolute;
|
|
|
bottom: 0;
|
|
|
- width: 1920;
|
|
|
+ width: 100%;
|
|
|
+ min-width: 1600px;
|
|
|
height: 58px;
|
|
|
}
|
|
|
+ .aszhongjian {
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 36px;
|
|
|
+ color: #FFFFFF;
|
|
|
+ line-height: 35px;
|
|
|
+ background: linear-gradient(0deg, #FFFFFF 0%, #B0D7FF 100%);
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ -webkit-text-fill-color: transparent;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 12px;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
.asleft {
|
|
|
- width: 500px;
|
|
|
height: 24px;
|
|
|
overflow: hidden;
|
|
|
position: absolute;
|
|
|
- bottom: 10px;
|
|
|
- left: 67px;
|
|
|
+ bottom: 12px;
|
|
|
+ left: 160px;
|
|
|
}
|
|
|
.asright {
|
|
|
font-size: 20px;
|
|
@@ -130,8 +124,8 @@ export default {
|
|
|
text-align: left;
|
|
|
color: #34c7ff;
|
|
|
position: absolute;
|
|
|
- bottom: 10px;
|
|
|
- right: 67px;
|
|
|
+ bottom: 12px;
|
|
|
+ right: 160px;
|
|
|
}
|
|
|
}
|
|
|
</style>
|