diff --git a/src/apps/AppInfotainment/AppInfotainment.vue b/src/apps/AppInfotainment/AppInfotainment.vue index 8218bd7b..312b09e7 100644 --- a/src/apps/AppInfotainment/AppInfotainment.vue +++ b/src/apps/AppInfotainment/AppInfotainment.vue @@ -1,18 +1,22 @@ @@ -22,28 +26,31 @@ export default { appName: '宣传资讯', data() { return { - fiveList: [], - title: '产业振兴', current: 1, categoryType: '0', list: [], + parentName: '产业振兴' } }, onShow() { - document.title = this.title - this.getFiveList() + document.title = this.parentName + this.getList() }, methods: { - getFiveList() { + getList() { this.$http.post('/app/apppublicitycategory/list',null,{ params: { - categoryType: '0', + parentName: this.parentName, + categoryType: '1', } }).then((res)=>{ - console.log(res); - this.fiveList = res.data.records + // console.log(res); + this.list = res.data.records }) + }, + toNewList(id) { + uni.navigateTo({url: `./newList?id=${id}`}) } }, } diff --git a/src/apps/AppInfotainment/newLIst.vue b/src/apps/AppInfotainment/newLIst.vue index fa7132bd..f449f1e9 100644 --- a/src/apps/AppInfotainment/newLIst.vue +++ b/src/apps/AppInfotainment/newLIst.vue @@ -46,31 +46,36 @@ isMore: false, current: 0, areaId: '', - tabList: [{name: '全部'}, {name: '通知公告'}, {name: '工作动态'}, - {name: '惠民政策'}, {name: '中央精神'},{name: '旅游故事'},{name: '特色农产品'}] + tabList: [], + // [{name: '全部'}, {name: '通知公告'}, {name: '工作动态'}, + // {name: '惠民政策'}, {name: '中央精神'},{name: '旅游故事'},{name: '特色农产品'}] + parentId: '' } }, onLoad (params) { - // this.areaId = params.areaId - // uni.setStorageSync('newTypeIndex', '') - // this.$loading() - // this.getNewsList() + this.areaId = params.areaId + uni.setStorageSync('newTypeIndex', '') + this.getNewsList() // uni.setNavigationBarTitle({ // title: params.title || '乡村资讯', //页面标题 // }) + this.parentId = params.id }, onShow() { - // if(uni.getStorageSync('newTypeIndex')) { - // this.currIndex = uni.getStorageSync('newTypeIndex') - // this.getListInit() - // } + if(uni.getStorageSync('newTypeIndex')) { + this.currIndex = uni.getStorageSync('newTypeIndex') + this.getListInit() + } + document.title = this.parentName + this.getList() + this.getListInit() }, methods: { toSelect() { - // this.$linkTo(`./select?index=${this.currIndex}`) - uni.navigateTo({url: './select'}) + // uni.navigateTo(`./select?index=${this.currIndex}`) + uni.navigateTo({url: `./select?parentId=${this.parentId}`}) }, changeTab(index) { this.currIndex = index @@ -80,18 +85,35 @@ onConfirm () { this.isMore = false this.current = 0 - // this.$loading() this.$nextTick(() => { 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() { this.isMore = false this.current = 0 this.newsList = [] - // this.$loading() this.getNewsList() }, getNewsList() { @@ -101,12 +123,11 @@ type = '' } 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 }).then(res => { if (res.code === 0) { this.isShowEmpty = true - // this.$hideLoading() if (this.current === 0) { this.newsList = [] @@ -130,20 +151,17 @@ this.$nextTick(() => { this.pageShow = true }) - } else { - // this.$hideLoading() - } + } else {} }).catch(() => { - // this.$hideLoading() this.isShowEmpty = true this.isLoading = false }) }, toDetail(item) { 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 { - 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; } } + + ::v-deep .emptyWrap .emptyImg { + margin-top: 40px; + } diff --git a/src/apps/AppInfotainment/residentList.vue b/src/apps/AppInfotainment/residentList.vue new file mode 100644 index 00000000..e69de29b diff --git a/src/apps/AppInfotainment/select.vue b/src/apps/AppInfotainment/select.vue index bda34089..c4e2c402 100644 --- a/src/apps/AppInfotainment/select.vue +++ b/src/apps/AppInfotainment/select.vue @@ -12,12 +12,15 @@ name: 'page', data () { return { - tabList: ['全部', '通知公告', '工作动态', '惠民政策', '中央精神', '旅游故事', '特色农产品'], - tabIndex: 0 + tabList: [], + tabIndex: 0, + parentId: '' } }, onLoad (option) { - this.tabIndex = option.index + this.tabIndex = option.index, + this.parentId = option.parentId + this.getList() }, methods: { @@ -25,7 +28,21 @@ this.tabIndex = index uni.setStorageSync('newTypeIndex', index) 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 + }) + }, }, } diff --git a/src/apps/AppMonitoringObject/Add.vue b/src/apps/AppMonitoringObject/Add.vue index 0e04c2a8..1c86dd68 100644 --- a/src/apps/AppMonitoringObject/Add.vue +++ b/src/apps/AppMonitoringObject/Add.vue @@ -365,6 +365,12 @@ export default { } }, + getResidentList() { + this.$http.post('').then(res => { + + }) + }, + nextStep() { const rules = this.rules()