|
@@ -3,9 +3,15 @@
|
|
|
<div class="dierjibie">
|
|
|
<img :src="[img0, img1, img2][swindex]" alt="" srcset="" />
|
|
|
<div class="asleft">
|
|
|
+ <div class="jajajaj" v-if="tianqi">{{
|
|
|
+ tianqi.result.city
|
|
|
+ ? `${tianqi.result.city} :${tianqi.result.weather || ''} ${tianqi.result.templow || ''
|
|
|
+ }℃ ~${tianqi.result.temphigh || ''}℃`
|
|
|
+ : ''
|
|
|
+ }}</div>
|
|
|
</div>
|
|
|
<div class="aszhongjian">
|
|
|
- {{userInfo.companyWechatId ? userInfo.companyName : "售修宝运营平台"}}
|
|
|
+ {{ userInfo.companyWechatId ? userInfo.companyName : "售修宝运营平台" }}
|
|
|
</div>
|
|
|
<div class="asright">{{ timeStr }}</div>
|
|
|
</div>
|
|
@@ -17,6 +23,7 @@ import { dateFormat2 } from '@/utils/util.js';
|
|
|
import img0 from '@/assets/head8.png';
|
|
|
import img1 from '@/assets/head1.png';
|
|
|
import img2 from '@/assets/head2.png';
|
|
|
+import { bigWaterGet } from '@/api/common.js';
|
|
|
export default {
|
|
|
props: {
|
|
|
swindex: {
|
|
@@ -32,6 +39,7 @@ export default {
|
|
|
timeStr: '',
|
|
|
timeId: null,
|
|
|
info: {},
|
|
|
+ tianqi: null
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -40,6 +48,22 @@ export default {
|
|
|
return JSON.parse(localStorage.getItem('greemall_user'))
|
|
|
},
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ $IpAdd: {
|
|
|
+ handler(newVal, oldVal) {
|
|
|
+ if (newVal?.city) {
|
|
|
+ bigWaterGet({
|
|
|
+ city: newVal.city
|
|
|
+ }).then(res => {
|
|
|
+ this.tianqi = res.data
|
|
|
+ console.log(res.data)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.jishikaishi()
|
|
|
},
|
|
@@ -47,17 +71,17 @@ export default {
|
|
|
this.timeId && clearInterval(this.timeId);
|
|
|
},
|
|
|
methods: {
|
|
|
- jishikaishi(){
|
|
|
+ jishikaishi() {
|
|
|
let date = new Date();
|
|
|
this.timeStr = dateFormat2('YYYY-mm-dd HH:MM:SS WWW', date);
|
|
|
- this.timeId = setTimeout(this.jishikaishi,1000);
|
|
|
+ this.timeId = setTimeout(this.jishikaishi, 1000);
|
|
|
}
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-::v-deep .jajajaj {
|
|
|
+.jajajaj {
|
|
|
height: 24px;
|
|
|
line-height: 24px;
|
|
|
font-size: 20px;
|
|
@@ -66,20 +90,24 @@ export default {
|
|
|
text-align: left;
|
|
|
color: #34c7ff;
|
|
|
}
|
|
|
+
|
|
|
::v-deep .dv-scroll-board {
|
|
|
background: none !important;
|
|
|
+
|
|
|
.row,
|
|
|
.row-item {
|
|
|
background: none !important;
|
|
|
height: 24px !important;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.headview {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
position: relative;
|
|
|
overflow: hidden;
|
|
|
- .dierjibie{
|
|
|
+
|
|
|
+ .dierjibie {
|
|
|
width: 100%;
|
|
|
min-width: 1600px;
|
|
|
height: 100%;
|
|
@@ -88,6 +116,7 @@ export default {
|
|
|
left: 50%;
|
|
|
transform: translateX(-50%);
|
|
|
}
|
|
|
+
|
|
|
img {
|
|
|
position: absolute;
|
|
|
bottom: 0;
|
|
@@ -95,6 +124,7 @@ export default {
|
|
|
min-width: 1600px;
|
|
|
height: 58px;
|
|
|
}
|
|
|
+
|
|
|
.aszhongjian {
|
|
|
font-family: Source Han Sans CN;
|
|
|
font-weight: 500;
|
|
@@ -110,6 +140,7 @@ export default {
|
|
|
transform: translateX(-50%);
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.asleft {
|
|
|
height: 24px;
|
|
|
overflow: hidden;
|
|
@@ -117,6 +148,7 @@ export default {
|
|
|
bottom: 12px;
|
|
|
left: 160px;
|
|
|
}
|
|
|
+
|
|
|
.asright {
|
|
|
font-size: 20px;
|
|
|
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
|