产业分类

This commit is contained in:
shijingjing
2022-04-25 13:59:02 +08:00
parent 71adfa71f7
commit 97f5af4be9
5 changed files with 92 additions and 40 deletions

View File

@@ -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
})
},
},
}
</script>