This commit is contained in:
liuye
2023-08-17 15:38:21 +08:00
parent 2bc9fd2121
commit e61437d5eb
2 changed files with 55 additions and 141 deletions

View File

@@ -17,133 +17,24 @@
</div>
</div>
</div>
<div class="title-content">
<h2>居民惠</h2>
<div>更多<img src="https://cdn.cunwuyun.cn/wechat/wuxi/right-icon-blue.png" alt=""></div>
</div>
<div class="banner-flex">
<div class="item-banner color-3872BC">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-banner-zcjd.png" alt="">
<div class="banner-text">
<h2>政策解读</h2>
<p>社区情况介绍</p>
</div>
<div class="app-list" v-for="(item, index) in appList" :key="index">
<div class="title-content">
<h2>{{item.name}}</h2>
<div @click="toService()">更多<img src="https://cdn.cunwuyun.cn/wechat/wuxi/right-icon-blue.png" alt=""></div>
</div>
<div class="item-banner color-CE5A5A">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-banner-dyzd.png" alt="">
<div class="banner-text">
<h2>党员阵地</h2>
<p>党员阵地</p>
<div class="banner-flex" v-if="item.bannerApp && item.bannerApp.length">
<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)">
<img :src="app.pictureUrl">
<p>{{app.name}}</p>
</div>
</div>
</div>
<div class="app-content">
<div class="item-app">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-app-shjf.png" alt="">
<p>生活缴费</p>
</div>
<div class="item-app">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-app-tqyb.png" alt="">
<p>天气预报</p>
</div>
<div class="item-app">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-app-wsbs.png" alt="">
<p>网上办事</p>
</div>
<div class="item-app">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-app-zgjy.png" alt="">
<p>招工就业</p>
</div>
</div>
<div class="title-content">
<h2>便民利</h2>
<div>更多<img src="https://cdn.cunwuyun.cn/wechat/wuxi/right-icon-blue.png" alt=""></div>
</div>
<div class="banner-content">
<div class="banner-left color-4C3FCD">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-banner-gdyh.png" alt="" class="banner-img">
<div class="banner-text">
<h2>功德银行</h2>
<p><img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-star-icon.png" alt="">行好事</p>
<p><img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-star-icon.png" alt="">得积分</p>
<p><img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-star-icon.png" alt="">去兑换</p>
</div>
</div>
<div class="banner-right">
<div class="item color-DF863E">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-banner-xnr.png" alt="" class="banner-img">
<div class="banner-text">
<h2>新农人</h2>
<p>新农人新经济</p>
</div>
</div>
<div class="item color-D9606E">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-banner-jtjy.png" alt="" class="banner-img">
<div class="banner-text">
<h2>家庭教育互助惠</h2>
<p>关注每一个留守儿童</p>
</div>
</div>
</div>
</div>
<div class="title-content">
<h2>城市智</h2>
<div>更多<img src="https://cdn.cunwuyun.cn/wechat/wuxi/right-icon-blue.png" alt=""></div>
</div>
<div class="banner-flex">
<div class="item-banner color-3872BC">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-banner-zcjd.png" alt="">
<div class="banner-text">
<h2>居民议事</h2>
<p>社区情况介绍</p>
</div>
</div>
<div class="item-banner color-409681">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-banner-sqgy.png" alt="">
<div class="banner-text">
<h2>社区公约</h2>
<p>社区情况介绍</p>
</div>
</div>
</div>
<div class="app-content">
<div class="item-app">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-app-ssp.png" alt="">
<p>随手拍</p>
</div>
<div class="item-app">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-app-sxw.png" alt="">
<p>随心问</p>
</div>
<div class="item-app">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-app-rdht.png" alt="">
<p>热点话题</p>
</div>
<div class="item-app">
<img src="https://cdn.cunwuyun.cn/wechat/wuxi/home-app-bmtxl.png" alt="">
<p>便民通讯录</p>
</div>
</div>
<!-- <div class="grid-content">
<u-grid :col="4" hover-class="text-hover" :border="false">
<u-grid-item v-for="(item, index) in grids" :key="index" :custom-style="{padding:'8px 0'}" bg-color="none"
class="grid-item" @click="handleClick(item)">
<img :src="item.pictureUrl" alt=""/>
<div class="grid-text">{{ item.name }}</div>
</u-grid-item>
</u-grid>
</div> -->
<!-- <template v-if="activeList.length>0">
<header>推荐专题</header>
<scroll-view :scroll-x="true" style="width: 100%" class="scroll-wrap">
<div class="scroll-card"
:style="{background:'url(' + item.pictureUrl + ') no-repeat no-repeat;background-size:100% 100%;'}"
v-for="(item,index) in activeList" :key="index" @click="handleActive(item)"/>
</scroll-view>
</template> -->
<template v-if="categorys&&categorys.length>0">
<u-tabs :list="categorys.map(e=>({name:e.categoryName}))" font-size="40" bg-color="transparent"
inactive-color="#999999" :active-item-style="active"
@@ -201,7 +92,8 @@ export default {
backgroundNavbar: {
background: 'url(https://cdn.cunwuyun.cn/wechat/wuxi/wuxi-nav-bg.png) no-repeat',
backgroundSize: 'cover',
}
},
appList: [], //应用列表
}
},
computed: {
@@ -222,11 +114,12 @@ export default {
},
onLoad() {
this.autoLogin().then(() => {
// this.getSwiperList();
this.getSwiperList();
this.getName();
this.getGrids();
// this.getGrids();
this.getActive();
this.getNotice();
this.getAppList()
})
},
methods: {
@@ -351,6 +244,23 @@ export default {
})
}
},
getAppList() {
this.$instance.get("/wuxi_home.json", null, { withoutToken: true }).then(res => {
if (res.length) {
this.appList = res
}
})
},
toService() {
uni.switchTab({
url: '/pages/AppModules/AppModules'
})
},
openApp(row) {
if(row.appId) {
uni.navigateToMiniProgram({appId: row.appId});
}
}
},
onShareAppMessage() {
@@ -420,6 +330,10 @@ export default {
}
}
// .app-list {
// margin-bottom: 24px;
// }
.title-content {
display: flex;
justify-content: space-between;
@@ -485,12 +399,13 @@ export default {
}
.app-content {
padding: 48px 32px 32px;
display: flex;
padding: 48px 16px 8px;
// display: flex;
.item-app {
// width: 104px;
display: inline-block;
width: 25%;
text-align: center;
margin-right: 86px;
margin-bottom: 20px;
img {
width: 96px;
height: 96px;

View File

@@ -36,10 +36,9 @@ export default {
this.current = e.detail.current;
if(this.current == 2) {
setTimeout(() => {
// uni.switchTab({
// url: '/pages/AppHome/AppHome'
// })
console.log(123)
uni.switchTab({
url: '/pages/AppHome/AppHome'
})
}, 2000)
}
},
@@ -52,12 +51,12 @@ export default {
url: '/pages/AppHome/AppHome'
})
} else {
this.getList()
setTimeout(() => {
uni.switchTab({
url: '/pages/AppHome/AppHome'
})
}, 3000)
// this.getList()
// setTimeout(() => {
// uni.switchTab({
// url: '/pages/AppHome/AppHome'
// })
// }, 3000)
}
}
})
@@ -79,7 +78,7 @@ export default {
}
},
onShow() {
// this.getStatus()
this.getStatus()
},
}
</script>