巫溪
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<div class="header-content">
|
||||
<u-navbar :is-back="false" title="数智巫溪" title-color="#000" title-width="300" title-size="32" :title-bold="true" :background="backgroundNavbar"></u-navbar>
|
||||
<div class="header-bg">
|
||||
<p class="weather-info">
|
||||
<img :src="`${cdn}/border.png`" alt="">
|
||||
今天:多云 26℃ ~ 34℃ 无持续风向<4级
|
||||
</p>
|
||||
<div class="weather-info" v-if="weatherInfo.wea">
|
||||
<img :src="weatherInfo.icon" alt="" />
|
||||
<p>今天:{{weatherInfo.wea}}{{weatherInfo.tem2}}~{{weatherInfo.tem1}},{{weatherInfo.air_tips}}</p>
|
||||
</div>
|
||||
<div class="swiper-content">
|
||||
<u-swiper :list="swiperList" mode="none" height="364" bg-color="none" @click="handleBannerClick"/>
|
||||
</div>
|
||||
@@ -26,7 +26,6 @@
|
||||
<div class="item-banner" v-for="(banner, bannerIndex) in item.bannerApp" :key="bannerIndex" @click="openApp(banner)">
|
||||
<img :src="banner.pictureUrl" alt="">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="app-content" v-if="item.apps && item.apps.length">
|
||||
<div class="item-app" v-for="(app, appIndex) in item.apps" :key="appIndex" @click="openApp(app)">
|
||||
@@ -94,6 +93,7 @@ export default {
|
||||
backgroundSize: 'cover',
|
||||
},
|
||||
appList: [], //应用列表
|
||||
weatherInfo: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -120,6 +120,7 @@ export default {
|
||||
this.getActive();
|
||||
this.getNotice();
|
||||
this.getAppList()
|
||||
this.getWeather()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
@@ -262,7 +263,15 @@ export default {
|
||||
}else { //type0 内置应用
|
||||
uni.navigateTo({url: row.modulePath})
|
||||
}
|
||||
}
|
||||
},
|
||||
getWeather() {
|
||||
this.$instance.post("/app/weather/queryWeather", {cityId: 101041800}, { withoutToken: true }).then(res => {
|
||||
if (res.data) {
|
||||
this.weatherInfo = res.data
|
||||
this.weatherInfo.icon = 'https://cdn.cunwuyun.cn/wuxi/home/weather-'+this.weatherInfo.wea_img+'.png'
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
@@ -294,12 +303,16 @@ export default {
|
||||
font-size: 28px;
|
||||
color: #222;
|
||||
padding: 12px 34px;
|
||||
display: flex;
|
||||
img {
|
||||
width: 56px;
|
||||
height: 52px;
|
||||
margin-right: 12px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
p {
|
||||
width: calc(100% - 68px);
|
||||
}
|
||||
}
|
||||
.swiper-content {
|
||||
width: 686px;
|
||||
|
||||
Reference in New Issue
Block a user