diff --git a/mobile/src/pages/tabBar/dir/search.vue b/mobile/src/pages/tabBar/dir/search.vue index c9dba01034..03bb832889 100644 --- a/mobile/src/pages/tabBar/dir/search.vue +++ b/mobile/src/pages/tabBar/dir/search.vue @@ -43,9 +43,12 @@ export default { timer: null }; }, - onLoad() { + onLoad() { // 本示例用的是高德 sdk ,请根据具体需求换成自己的服务器接口。 this.amapPlugin = util.mapInit(); + this.historyList = uni.getStorageSync('search:history'); + }, + created() { this.historyList = uni.getStorageSync('search:history'); }, methods: { @@ -104,6 +107,7 @@ export default { index: 4, userId: node.userId } + this.isHistory= false if(node.type === 'panel') { uni.navigateTo({ diff --git a/mobile/src/pages/tabBar/home/detail.nvue b/mobile/src/pages/tabBar/home/detail.nvue index c163c2c1a3..f38d24ab78 100644 --- a/mobile/src/pages/tabBar/home/detail.nvue +++ b/mobile/src/pages/tabBar/home/detail.nvue @@ -5,10 +5,13 @@ - - - + + + + + + diff --git a/mobile/src/pages/tabBar/home/index.nvue b/mobile/src/pages/tabBar/home/index.nvue index 8f99107019..0b7e7c954f 100644 --- a/mobile/src/pages/tabBar/home/index.nvue +++ b/mobile/src/pages/tabBar/home/index.nvue @@ -205,8 +205,14 @@ this.switchTab(index); }, ontabchange(e) { - // let index = e.target.current || e.detail.current; + let index = e.target.current || e.detail.current; // this.switchTab(index); + + if (this.tabIndex === index) { + return; + } + this.tabIndex = index; + this.scrollInto = this.tabBars[index].id; }, switchTab(index) { if (this.newsList[index].data.length === 0) {