Browse Source

modify

master
slj 3 years ago
parent
commit
ec9dbebf09
  1. 10
      pages/home/index.js
  2. 2
      pages/topics/activity/activitySign/index.js
  3. 4
      pages/topics/attract/oceanDetail/index.js
  4. 4
      pages/topics/attract/spaceDetail/index.js
  5. 13
      pages/topics/index.js
  6. 28
      pages/topics/index.wxml

10
pages/home/index.js

@ -41,6 +41,16 @@ Page({
menus: ['shareAppMessage'] menus: ['shareAppMessage']
}); });
}, },
// onShareAppMessage() {
// return {
// title: '报需求',
// // path: '/pages/topics/reportDemand/index',
// path:'/pages/topics/index'
// }
// },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */

2
pages/topics/activity/activitySign/index.js

@ -112,7 +112,7 @@ Page({
showCancel: false, //是否显示取消按钮 showCancel: false, //是否显示取消按钮
confirmText: "确定", //默认是“确定” confirmText: "确定", //默认是“确定”
success: function (res) { success: function (res) {
app.globalData.currentTab = "5" app.globalData.currentTab = "1"
wx.switchTab({ wx.switchTab({
url: '../../../topics/index' url: '../../../topics/index'
}) })

4
pages/topics/attract/oceanDetail/index.js

@ -114,12 +114,12 @@ Page({
goLinkPage(e) { goLinkPage(e) {
if (e.currentTarget.dataset.association == '1') { if (e.currentTarget.dataset.association == '1') {
app.globalData.currentTab = "3" app.globalData.currentTab = "4"
wx.switchTab({ wx.switchTab({
url: '../../../topics/index' url: '../../../topics/index'
}) })
} else { } else {
app.globalData.currentTab = "5" app.globalData.currentTab = "1"
wx.switchTab({ wx.switchTab({
url: '../../../topics/index' url: '../../../topics/index'
}) })

4
pages/topics/attract/spaceDetail/index.js

@ -112,12 +112,12 @@ Page({
goLinkPage(e) { goLinkPage(e) {
console.log('链接--',e) console.log('链接--',e)
if (e.currentTarget.dataset.association == '1') { if (e.currentTarget.dataset.association == '1') {
app.globalData.currentTab = "3" app.globalData.currentTab = "4"
wx.switchTab({ wx.switchTab({
url: '../../../topics/index' url: '../../../topics/index'
}) })
} else { } else {
app.globalData.currentTab = "5" app.globalData.currentTab = "1"
wx.switchTab({ wx.switchTab({
url: '../../../topics/index' url: '../../../topics/index'
}) })

13
pages/topics/index.js

@ -75,6 +75,7 @@ Page({
onShow: function () { onShow: function () {
//文章关联链接跳转 显示 报需求 还是来活动 tab //文章关联链接跳转 显示 报需求 还是来活动 tab
let curTab = app.globalData.currentTab let curTab = app.globalData.currentTab
console.log('app.globalData.currentTab--',app.globalData.currentTab)
if (curTab) { if (curTab) {
// console.log("currentTab:" + curTab) // console.log("currentTab:" + curTab)
this.setData({ this.setData({
@ -138,7 +139,6 @@ Page({
} }
} else { } else {
console.log('未绑定微信') console.log('未绑定微信')
if (app.globalData.navigate.mobile) { if (app.globalData.navigate.mobile) {
var params = { var params = {
phone: app.globalData.navigate.mobile, phone: app.globalData.navigate.mobile,
@ -178,6 +178,7 @@ Page({
changeTabs: function (e) { changeTabs: function (e) {
console.log('点击tab--',e) console.log('点击tab--',e)
var tab = e.detail.name; var tab = e.detail.name;
app.globalData.currentTab=tab
this.setData({ this.setData({
page: 1, page: 1,
next: true, next: true,
@ -193,9 +194,10 @@ Page({
getData: function (tab) { getData: function (tab) {
console.log('tab--',tab) console.log('tab--',tab)
switch (tab) { switch (tab) {
case "3": case "4":
return this.fetchCenterList() return this.fetchCenterList()
case "5": // case "5":
case "1":
return this.fetchActivityList(); return this.fetchActivityList();
default: default:
return; return;
@ -310,10 +312,11 @@ Page({
page: page + 1 page: page + 1
}) })
switch (tab) { switch (tab) {
case "3": case "4":
this.fetchCenterList() this.fetchCenterList()
return; return;
case "5": // case "5":
case "1":
return this.fetchActivityList(); return this.fetchActivityList();
default: default:
return; return;

28
pages/topics/index.wxml

@ -2,28 +2,33 @@
<view class="content-wrapper"> <view class="content-wrapper">
<!-- <e-segment bind:tapSegment="tapSegment" headerTitles="{{headerTitles}}" defaultSelectIndex="{{selectedTitle}}"/> --> <!-- <e-segment bind:tapSegment="tapSegment" headerTitles="{{headerTitles}}" defaultSelectIndex="{{selectedTitle}}"/> -->
<van-tabs bind:click="changeTabs" active="{{active}}" swipe-threshold="5"> <van-tabs bind:click="changeTabs" active="{{active}}" swipe-threshold="5">
<van-tab title="促招引" name="1"> <van-tab title="来活动" name="1">
<block wx:if="{{tab == '1'}}"> <block wx:if="{{tab == '1'}}">
<activity list="{{activityList}}" bind:quitEvent="changeActivityStatus" />
</block>
</van-tab>
<van-tab title="促招引" name="2">
<block wx:if="{{tab == '2'}}">
<scroll-view scroll-y style="height:{{height}}px" bindscrolltolower="onReachBottom"> <scroll-view scroll-y style="height:{{height}}px" bindscrolltolower="onReachBottom">
<attract /> <attract />
</scroll-view> </scroll-view>
</block> </block>
</van-tab> </van-tab>
<van-tab title="租房子" name="2"> <van-tab title="租房子" name="3">
<block wx:if="{{tab == '2'}}"> <block wx:if="{{tab == '3'}}">
<lease></lease> <lease></lease>
</block> </block>
</van-tab> </van-tab>
<van-tab title="报需求" name="3"> <van-tab title="报需求" name="4">
<block wx:if="{{tab == '3'}}"> <block wx:if="{{tab == '4'}}">
<scroll-view scroll-y style="height:{{height}}px" bindscrolltolower="onReachBottom"> <scroll-view scroll-y style="height:{{height}}px" bindscrolltolower="onReachBottom">
<demand typeList="{{typeList}}" nodes="{{nodes}}" /> <demand typeList="{{typeList}}" nodes="{{nodes}}" />
</scroll-view> </scroll-view>
</block> </block>
</van-tab> </van-tab>
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<van-tab title="找贷款" name="4"> <van-tab title="找贷款" name="5">
<block wx:if="{{tab == '4'}}"> <block wx:if="{{tab == '5'}}">
<loan detail="{{loan}}" /> <loan detail="{{loan}}" />
</block> </block>
</van-tab> </van-tab>
@ -33,13 +38,14 @@
<loan /> <loan />
</block> </block>
</van-tab> --> </van-tab> -->
<block wx:if="{{flag}}"> <!-- <block wx:if="{{flag}}">
<van-tab title="来活动" name="5"> <van-tab title="来活动" name="5">
<block wx:if="{{tab == '5'}}"> <block wx:if="{{tab == '5'}}">
<activity list="{{activityList}}" bind:quitEvent="changeActivityStatus"/> <activity list="{{activityList}}" bind:quitEvent="changeActivityStatus"/>
</block> </block>
</van-tab> </van-tab>
</block> </block> -->
<!-- <van-tab title="报需求" name="3"> <!-- <van-tab title="报需求" name="3">
<talents /> <talents />
</van-tab> </van-tab>

Loading…
Cancel
Save