diff --git a/pages/home/index.js b/pages/home/index.js index c99e805..ef3fdb5 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -41,6 +41,16 @@ Page({ menus: ['shareAppMessage'] }); }, + // onShareAppMessage() { + + // return { + // title: '报需求', + // // path: '/pages/topics/reportDemand/index', + // path:'/pages/topics/index' + + // } + // }, + /** * 页面相关事件处理函数--监听用户下拉动作 */ diff --git a/pages/topics/activity/activitySign/index.js b/pages/topics/activity/activitySign/index.js index 0cbcf09..25e19f2 100644 --- a/pages/topics/activity/activitySign/index.js +++ b/pages/topics/activity/activitySign/index.js @@ -112,7 +112,7 @@ Page({ showCancel: false, //是否显示取消按钮 confirmText: "确定", //默认是“确定” success: function (res) { - app.globalData.currentTab = "5" + app.globalData.currentTab = "1" wx.switchTab({ url: '../../../topics/index' }) diff --git a/pages/topics/attract/oceanDetail/index.js b/pages/topics/attract/oceanDetail/index.js index f0a811e..89c8914 100644 --- a/pages/topics/attract/oceanDetail/index.js +++ b/pages/topics/attract/oceanDetail/index.js @@ -114,12 +114,12 @@ Page({ goLinkPage(e) { if (e.currentTarget.dataset.association == '1') { - app.globalData.currentTab = "3" + app.globalData.currentTab = "4" wx.switchTab({ url: '../../../topics/index' }) } else { - app.globalData.currentTab = "5" + app.globalData.currentTab = "1" wx.switchTab({ url: '../../../topics/index' }) diff --git a/pages/topics/attract/spaceDetail/index.js b/pages/topics/attract/spaceDetail/index.js index 50d0e0d..3af0c4f 100644 --- a/pages/topics/attract/spaceDetail/index.js +++ b/pages/topics/attract/spaceDetail/index.js @@ -112,12 +112,12 @@ Page({ goLinkPage(e) { console.log('链接--',e) if (e.currentTarget.dataset.association == '1') { - app.globalData.currentTab = "3" + app.globalData.currentTab = "4" wx.switchTab({ url: '../../../topics/index' }) } else { - app.globalData.currentTab = "5" + app.globalData.currentTab = "1" wx.switchTab({ url: '../../../topics/index' }) diff --git a/pages/topics/index.js b/pages/topics/index.js index 4d76c81..401917d 100644 --- a/pages/topics/index.js +++ b/pages/topics/index.js @@ -75,6 +75,7 @@ Page({ onShow: function () { //文章关联链接跳转 显示 报需求 还是来活动 tab let curTab = app.globalData.currentTab + console.log('app.globalData.currentTab--',app.globalData.currentTab) if (curTab) { // console.log("currentTab:" + curTab) this.setData({ @@ -138,7 +139,6 @@ Page({ } } else { console.log('未绑定微信') - if (app.globalData.navigate.mobile) { var params = { phone: app.globalData.navigate.mobile, @@ -178,6 +178,7 @@ Page({ changeTabs: function (e) { console.log('点击tab--',e) var tab = e.detail.name; + app.globalData.currentTab=tab this.setData({ page: 1, next: true, @@ -193,9 +194,10 @@ Page({ getData: function (tab) { console.log('tab--',tab) switch (tab) { - case "3": + case "4": return this.fetchCenterList() - case "5": + // case "5": + case "1": return this.fetchActivityList(); default: return; @@ -310,10 +312,11 @@ Page({ page: page + 1 }) switch (tab) { - case "3": + case "4": this.fetchCenterList() return; - case "5": + // case "5": + case "1": return this.fetchActivityList(); default: return; diff --git a/pages/topics/index.wxml b/pages/topics/index.wxml index 23b635f..e8701fb 100644 --- a/pages/topics/index.wxml +++ b/pages/topics/index.wxml @@ -2,28 +2,33 @@ - - + + + + + + + - - - + + + - - + + - - + + @@ -33,13 +38,14 @@ --> - + +