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