11 changed files with 516 additions and 381 deletions
@ -0,0 +1,36 @@ |
|||
import request from 'utils/request' |
|||
|
|||
// 党组织数量
|
|||
export function selectConfigList (params) { |
|||
return request({ |
|||
url: '/api/resi/partymember/yifengScreen/selectConfigList', |
|||
method: 'GET', |
|||
params |
|||
}) |
|||
} |
|||
|
|||
// 天气
|
|||
export function lookup (params) { |
|||
return request({ |
|||
url: 'https://geoapi.qweather.com/v2/city/lookup?location=即墨&key=274d6db86c074fdfa52b8e294bbc42e0', |
|||
method: 'GET', |
|||
params |
|||
}) |
|||
} |
|||
|
|||
// 天气
|
|||
export function nowTianqi (id) { |
|||
return request({ |
|||
url: `https://devapi.qweather.com/v7/weather/3d?location=${id}&key=274d6db86c074fdfa52b8e294bbc42e0`, |
|||
method: 'GET' |
|||
// params
|
|||
}) |
|||
} |
|||
// 空气质量
|
|||
export function nowKongqi (id) { |
|||
return request({ |
|||
url: `https://devapi.qweather.com/v7/air/now?location=${id}&key=274d6db86c074fdfa52b8e294bbc42e0`, |
|||
method: 'GET' |
|||
// params
|
|||
}) |
|||
} |
@ -1,73 +1,76 @@ |
|||
<template> |
|||
<div class="map-header"> |
|||
<div class="flex"> |
|||
<div class="item" v-for="(item, index) in data" :key="index"> |
|||
<div class="name">{{ item.name }}</div> |
|||
<section> |
|||
<span :class="{ 'num': true, 'yellow': index === 4 }">{{ item.num }}</span> |
|||
<span :class="{'units':true, 'yellow': index === 4 }">{{item.units }}</span> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
<div class="map-header"> |
|||
<div class="flex"> |
|||
<div class="item" v-for="(item, index) in data" :key="index"> |
|||
<div class="name">{{ item.name }}</div> |
|||
<section> |
|||
<span :class="{ num: true, yellow: index === 4 }">{{ |
|||
item.num |
|||
}}</span> |
|||
<span :class="{ units: true, yellow: index === 4 }">{{ |
|||
item.units |
|||
}}</span> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
data() { |
|||
return { |
|||
}; |
|||
}, |
|||
props:{ |
|||
data:{ |
|||
type:Array, |
|||
default:()=>[] |
|||
} |
|||
}, |
|||
created() { }, |
|||
methods: {}, |
|||
components: {}, |
|||
computed: {}, |
|||
watch: {}, |
|||
data () { |
|||
return {} |
|||
}, |
|||
props: { |
|||
data: { |
|||
type: Array, |
|||
default: () => [] |
|||
} |
|||
}, |
|||
created () { |
|||
}, |
|||
methods: {}, |
|||
components: {}, |
|||
computed: {}, |
|||
watch: {} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.flex { |
|||
@include flex(); |
|||
width: 100%; |
|||
justify-content: space-around; |
|||
|
|||
.item { |
|||
@include flex(column); |
|||
@include flex(); |
|||
width: 100%; |
|||
justify-content: space-around; |
|||
|
|||
section { |
|||
margin-top: 13px; |
|||
} |
|||
.item { |
|||
@include flex(column); |
|||
|
|||
.name { |
|||
font-size: 20px; |
|||
color: #ACBBD4; |
|||
} |
|||
section { |
|||
margin-top: 13px; |
|||
} |
|||
|
|||
.num { |
|||
font-family: lihei; |
|||
font-size: 26px; |
|||
color: #FFFFFF; |
|||
font-style: italic; |
|||
text-shadow: 0 0 10px #fff; |
|||
} |
|||
.name { |
|||
font-size: 20px; |
|||
color: #acbbd4; |
|||
} |
|||
|
|||
.units { |
|||
font-size: 16px; |
|||
color: #869DB8; |
|||
margin-left: 5px; |
|||
} |
|||
.yellow { |
|||
color: #FFC486; |
|||
text-shadow: 0 0 10px #FFC486; |
|||
.num { |
|||
font-family: lihei; |
|||
font-size: 26px; |
|||
color: #ffffff; |
|||
font-style: italic; |
|||
text-shadow: 0 0 10px #fff; |
|||
} |
|||
|
|||
} |
|||
.units { |
|||
font-size: 16px; |
|||
color: #869db8; |
|||
margin-left: 5px; |
|||
} |
|||
.yellow { |
|||
color: #ffc486; |
|||
text-shadow: 0 0 10px #ffc486; |
|||
} |
|||
} |
|||
} |
|||
</style> |
|||
</style> |
|||
|
Loading…
Reference in new issue