产业分类
This commit is contained in:
@@ -1,18 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AppInfotainment">
|
<div class="AppInfotainment">
|
||||||
<div class="fiveIndustry">
|
<div class="fiveIndustry" v-if="list.length">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h2>{{ title }}</h2>
|
<h2>{{ parentName }}</h2>
|
||||||
<p>实现乡村振兴的物质基础</p>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="item">
|
<div class="item" v-for="(item,index) in list" :key="index" @click="toNewList(item.id)">
|
||||||
<span>产业资讯</span>
|
<span>{{ item.categoryName }}</span>
|
||||||
<span><u-icon name="arrow-right"></u-icon></span>
|
<span><u-icon name="arrow-right"></u-icon></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <AiEmpty description="暂无数据" v-else /> -->
|
<AiEmpty description="暂无数据" v-else />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -22,28 +26,31 @@ export default {
|
|||||||
appName: '宣传资讯',
|
appName: '宣传资讯',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
fiveList: [],
|
|
||||||
title: '产业振兴',
|
|
||||||
current: 1,
|
current: 1,
|
||||||
categoryType: '0',
|
categoryType: '0',
|
||||||
list: [],
|
list: [],
|
||||||
|
parentName: '产业振兴'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = this.title
|
document.title = this.parentName
|
||||||
this.getFiveList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getFiveList() {
|
getList() {
|
||||||
this.$http.post('/app/apppublicitycategory/list',null,{
|
this.$http.post('/app/apppublicitycategory/list',null,{
|
||||||
params: {
|
params: {
|
||||||
categoryType: '0',
|
parentName: this.parentName,
|
||||||
|
categoryType: '1',
|
||||||
}
|
}
|
||||||
}).then((res)=>{
|
}).then((res)=>{
|
||||||
console.log(res);
|
// console.log(res);
|
||||||
this.fiveList = res.data.records
|
this.list = res.data.records
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
toNewList(id) {
|
||||||
|
uni.navigateTo({url: `./newList?id=${id}`})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,31 +46,36 @@
|
|||||||
isMore: false,
|
isMore: false,
|
||||||
current: 0,
|
current: 0,
|
||||||
areaId: '',
|
areaId: '',
|
||||||
tabList: [{name: '全部'}, {name: '通知公告'}, {name: '工作动态'},
|
tabList: [],
|
||||||
{name: '惠民政策'}, {name: '中央精神'},{name: '旅游故事'},{name: '特色农产品'}]
|
// [{name: '全部'}, {name: '通知公告'}, {name: '工作动态'},
|
||||||
|
// {name: '惠民政策'}, {name: '中央精神'},{name: '旅游故事'},{name: '特色农产品'}]
|
||||||
|
parentId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
onLoad (params) {
|
onLoad (params) {
|
||||||
// this.areaId = params.areaId
|
this.areaId = params.areaId
|
||||||
// uni.setStorageSync('newTypeIndex', '')
|
uni.setStorageSync('newTypeIndex', '')
|
||||||
// this.$loading()
|
this.getNewsList()
|
||||||
// this.getNewsList()
|
|
||||||
// uni.setNavigationBarTitle({
|
// uni.setNavigationBarTitle({
|
||||||
// title: params.title || '乡村资讯', //页面标题
|
// title: params.title || '乡村资讯', //页面标题
|
||||||
// })
|
// })
|
||||||
|
this.parentId = params.id
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
// if(uni.getStorageSync('newTypeIndex')) {
|
if(uni.getStorageSync('newTypeIndex')) {
|
||||||
// this.currIndex = uni.getStorageSync('newTypeIndex')
|
this.currIndex = uni.getStorageSync('newTypeIndex')
|
||||||
// this.getListInit()
|
this.getListInit()
|
||||||
// }
|
}
|
||||||
|
document.title = this.parentName
|
||||||
|
this.getList()
|
||||||
|
this.getListInit()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
toSelect() {
|
toSelect() {
|
||||||
// this.$linkTo(`./select?index=${this.currIndex}`)
|
// uni.navigateTo(`./select?index=${this.currIndex}`)
|
||||||
uni.navigateTo({url: './select'})
|
uni.navigateTo({url: `./select?parentId=${this.parentId}`})
|
||||||
},
|
},
|
||||||
changeTab(index) {
|
changeTab(index) {
|
||||||
this.currIndex = index
|
this.currIndex = index
|
||||||
@@ -80,18 +85,35 @@
|
|||||||
onConfirm () {
|
onConfirm () {
|
||||||
this.isMore = false
|
this.isMore = false
|
||||||
this.current = 0
|
this.current = 0
|
||||||
// this.$loading()
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.getNewsList(this.areaId)
|
this.getNewsList(this.areaId)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getList() {
|
||||||
|
this.$http.post('/app/apppublicitycategory/list',null,{
|
||||||
|
params: {
|
||||||
|
parentId: this.parentId,
|
||||||
|
categoryType: '2',
|
||||||
|
}
|
||||||
|
}).then((res)=>{
|
||||||
|
// console.log(res.data.records);
|
||||||
|
var array = []
|
||||||
|
res.data.records.map(item=>{
|
||||||
|
array.push({ name: item.categoryName })
|
||||||
|
})
|
||||||
|
this.tabList = array
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toNewList() {
|
||||||
|
uni.navigateTo({url: `./newList?parentName=${this.parentName}`})
|
||||||
|
},
|
||||||
|
|
||||||
getListInit() {
|
getListInit() {
|
||||||
this.isMore = false
|
this.isMore = false
|
||||||
this.current = 0
|
this.current = 0
|
||||||
this.newsList = []
|
this.newsList = []
|
||||||
// this.$loading()
|
|
||||||
this.getNewsList()
|
this.getNewsList()
|
||||||
},
|
},
|
||||||
getNewsList() {
|
getNewsList() {
|
||||||
@@ -101,12 +123,11 @@
|
|||||||
type = ''
|
type = ''
|
||||||
}
|
}
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
this.$instance.post(`/app/appnewscenterinfo/listForWxNew?current=${this.current + 1}&type=${type}&size=10&title=${this.title}&areaId=${this.areaId}`, null, {
|
this.$http.post(`/app/appnewscenterinfo/listForWxNew?current=${this.current + 1}&type=${type}&size=10&title=${this.title}&areaId=${this.areaId}`, null, {
|
||||||
withoutToken: 1
|
withoutToken: 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.isShowEmpty = true
|
this.isShowEmpty = true
|
||||||
// this.$hideLoading()
|
|
||||||
|
|
||||||
if (this.current === 0) {
|
if (this.current === 0) {
|
||||||
this.newsList = []
|
this.newsList = []
|
||||||
@@ -130,20 +151,17 @@
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.pageShow = true
|
this.pageShow = true
|
||||||
})
|
})
|
||||||
} else {
|
} else {}
|
||||||
// this.$hideLoading()
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
// this.$hideLoading()
|
|
||||||
this.isShowEmpty = true
|
this.isShowEmpty = true
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
toDetail(item) {
|
toDetail(item) {
|
||||||
if(item.detailType == 6 || item.detailType == 5) { //特色农产品 旅游故事
|
if(item.detailType == 6 || item.detailType == 5) { //特色农产品 旅游故事
|
||||||
this.$linkTo(`/subPages/live/products?id=${item.id}&detailType=${item.detailType}`)
|
uni.navigateTo(`/subPages/live/products?id=${item.id}&detailType=${item.detailType}`)
|
||||||
}else {
|
}else {
|
||||||
this.$linkTo(`/subPages/live/newsDetail?id=${item.id}&areaId=${this.areaId}&type=${this.currIndex}`)
|
uni.navigateTo(`/subPages/live/newsDetail?id=${item.id}&areaId=${this.areaId}&type=${this.currIndex}`)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -357,4 +375,8 @@
|
|||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::v-deep .emptyWrap .emptyImg {
|
||||||
|
margin-top: 40px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
0
src/apps/AppInfotainment/residentList.vue
Normal file
0
src/apps/AppInfotainment/residentList.vue
Normal file
@@ -12,12 +12,15 @@
|
|||||||
name: 'page',
|
name: 'page',
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tabList: ['全部', '通知公告', '工作动态', '惠民政策', '中央精神', '旅游故事', '特色农产品'],
|
tabList: [],
|
||||||
tabIndex: 0
|
tabIndex: 0,
|
||||||
|
parentId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad (option) {
|
onLoad (option) {
|
||||||
this.tabIndex = option.index
|
this.tabIndex = option.index,
|
||||||
|
this.parentId = option.parentId
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@@ -25,7 +28,21 @@
|
|||||||
this.tabIndex = index
|
this.tabIndex = index
|
||||||
uni.setStorageSync('newTypeIndex', index)
|
uni.setStorageSync('newTypeIndex', index)
|
||||||
uni.navigateBack({delta: 1})
|
uni.navigateBack({delta: 1})
|
||||||
}
|
},
|
||||||
|
getList() {
|
||||||
|
this.$http.post('/app/apppublicitycategory/list',null,{
|
||||||
|
params: {
|
||||||
|
parentId: this.parentId,
|
||||||
|
categoryType: '2',
|
||||||
|
}
|
||||||
|
}).then((res)=>{
|
||||||
|
var array = []
|
||||||
|
res.data.records.map(item=>{
|
||||||
|
array.push(item.categoryName)
|
||||||
|
})
|
||||||
|
this.tabList = array
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -365,6 +365,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getResidentList() {
|
||||||
|
this.$http.post('').then(res => {
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
nextStep() {
|
nextStep() {
|
||||||
const rules = this.rules()
|
const rules = this.rules()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user