diff --git a/src/pages/about/index.vue b/src/pages/about/index.vue index 4460d29..ceefef6 100644 --- a/src/pages/about/index.vue +++ b/src/pages/about/index.vue @@ -46,7 +46,7 @@ {{ item.name }} @@ -113,6 +113,7 @@ export default defineComponent({ } }, async onLoad(option) { + console.log(option) this.getCategory() this.getDetail(1) }, diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 8131962..c48b8fa 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -158,7 +158,7 @@ 美丽乡村风貌展示厅 - + @@ -216,7 +216,7 @@ 精选好物,不容错过 - + @@ -225,7 +225,7 @@ - + - + - {{ item.store_name }} - {{ item.store_info }} + {{ item.title }} + {{ item.description }} - + @@ -274,7 +274,7 @@ 热门咨询,一键掌握新鲜事 - + @@ -283,7 +283,7 @@ - + @@ -314,7 +314,7 @@ 好玩儿路线一网打尽 - + @@ -323,7 +323,7 @@ - + @@ -380,6 +380,11 @@ export default defineComponent({ index_eat: {}, index_live: {}, index_play: {}, + eat_id: 1, + live_id: 7, + play_id: 8, + purchase_id: 6, + index_purchase: {}, current_item: {}, currentTab: 1, @@ -423,12 +428,12 @@ export default defineComponent({ }, async getArticle() { - this.index_eat = await this.getIndex(1) + this.index_eat = await this.getIndex(this.eat_id) this.current_item = this.index_eat[0] || {} - this.index_live = await this.getIndex(2) + this.index_live = await this.getIndex(this.live_id) - this.index_play = await this.getIndex(3) - this.index_purchase = await this.getIndex(4) + this.index_play = await this.getIndex(this.play_id) + this.index_purchase = await this.getIndex(this.purchase_id) }, async getIndex(category_id) { const res = await getArticleIndexAPI({ category_id: category_id }) @@ -456,7 +461,11 @@ export default defineComponent({ // url: `/pages/web_view/index?target=${item.url}&title=${item.name}`, // }) // }, - + switchTab(index) { + uni.switchTab({ + url: '/pages/about/index?category_id=' + index, + }) + }, more(item) { console.log(item) if (item.type == 1) {