Files
dvcp_v2_wxcp_app/src/apps/AppInfotainment/AppInfotainment.vue

99 lines
2.4 KiB
Vue
Raw Normal View History

2022-04-24 11:38:19 +08:00
<template>
<div class="AppInfotainment">
2022-04-25 13:59:02 +08:00
<div class="fiveIndustry" v-if="list.length">
2022-04-24 17:42:09 +08:00
<div class="title">
2022-04-25 13:59:02 +08:00
<h2>{{ parentName }}</h2>
<p v-if="parentName == '产业振兴'">实现乡村振兴的物质基础</p>
<p v-if="parentName == '组织振兴'">保障乡村振兴的政治基础</p>
<p v-if="parentName == '人才振兴'">推动乡村振兴的重要因素</p>
<p v-if="parentName == '文化振兴'">稳固乡村振兴的思想保障</p>
<p v-if="parentName == '生态振兴'">构建乡村振兴的环境基础</p>
2022-04-24 11:38:19 +08:00
</div>
2022-04-24 17:42:09 +08:00
<div class="list">
2022-04-25 14:10:36 +08:00
<div class="item" v-for="(item,index) in list" :key="index" @click="toNewList(item.id,item.categoryName)">
2022-04-25 13:59:02 +08:00
<span>{{ item.categoryName }}</span>
2022-04-24 17:42:09 +08:00
<span><u-icon name="arrow-right"></u-icon></span>
2022-04-24 14:19:20 +08:00
</div>
</div>
</div>
2022-04-25 13:59:02 +08:00
<AiEmpty description="暂无数据" v-else />
2022-04-24 11:38:19 +08:00
</div>
</template>
<script>
2022-04-24 17:42:09 +08:00
export default {
name: 'AppInfotainment',
appName: '宣传资讯',
data() {
return {
current: 1,
categoryType: '0',
list: [],
2022-04-26 17:24:11 +08:00
parentName: ''
2022-04-24 17:42:09 +08:00
}
},
2022-04-26 17:24:11 +08:00
onLoad(o) {
this.parentName = o.listName
},
2022-04-24 17:42:09 +08:00
onShow() {
2022-04-25 13:59:02 +08:00
document.title = this.parentName
this.getList()
2022-04-24 17:42:09 +08:00
},
methods: {
2022-04-25 13:59:02 +08:00
getList() {
2022-04-24 17:42:09 +08:00
this.$http.post('/app/apppublicitycategory/list',null,{
params: {
2022-04-25 13:59:02 +08:00
parentName: this.parentName,
categoryType: '1',
2022-04-24 14:19:20 +08:00
}
2022-04-24 17:42:09 +08:00
}).then((res)=>{
2022-04-25 13:59:02 +08:00
this.list = res.data.records
2022-04-24 17:42:09 +08:00
})
2022-04-25 13:59:02 +08:00
},
2022-04-25 14:10:36 +08:00
toNewList(id,categoryName) {
uni.navigateTo({url: `./newList?id=${id}&parentName=${categoryName}`})
2022-04-24 14:19:20 +08:00
}
2022-04-24 17:42:09 +08:00
},
}
2022-04-24 11:38:19 +08:00
</script>
<style lang="scss" scoped>
2022-04-24 17:42:09 +08:00
.AppInfotainment {
::v-deep .AppInfotainment {
background: none;
2022-04-24 14:19:20 +08:00
}
2022-04-24 17:42:09 +08:00
.fiveIndustry {
.title {
padding: 30px 32px;
2022-04-24 14:19:20 +08:00
box-sizing: border-box;
2022-04-24 17:42:09 +08:00
height: 256px;
background: #FFF url('./components/bg.png') no-repeat right;
background-size: 336px 256px;
h2 {
margin-top: 20px;
font-size: 50px;
font-weight: 800;
2022-04-24 14:19:20 +08:00
}
2022-04-24 17:42:09 +08:00
p {
margin-top: 16px;
font-size: 30px;
color: #999999;
2022-04-24 14:19:20 +08:00
}
}
2022-04-24 17:42:09 +08:00
.list {
margin-top: 24px;
background: #FFF;
2022-04-25 09:10:26 +08:00
padding: 0 32px 40px 32px;
2022-04-24 17:42:09 +08:00
box-sizing: border-box;
.item {
2022-04-24 14:19:20 +08:00
display: flex;
2022-04-24 17:42:09 +08:00
justify-content: space-between;
padding: 30px 0;
border-bottom: 1px solid #D8DDE6;
2022-04-24 14:19:20 +08:00
}
}
2022-04-24 11:38:19 +08:00
}
2022-04-24 17:42:09 +08:00
}
</style>