Showing
1 changed file
with
19 additions
and
7 deletions
| @@ -25,13 +25,13 @@ Page({ | @@ -25,13 +25,13 @@ Page({ | ||
| 25 | * 生命周期函数--监听页面加载 | 25 | * 生命周期函数--监听页面加载 |
| 26 | */ | 26 | */ |
| 27 | onLoad: function (options) { | 27 | onLoad: function (options) { |
| 28 | - if(getApp().meListType){ | ||
| 29 | - this.tabType=getApp().meListType | ||
| 30 | - this.setData({ | ||
| 31 | - tabType:this.tabType | ||
| 32 | - }) | ||
| 33 | - } | ||
| 34 | - this.getListData(); | 28 | + // if(getApp().meListType){ |
| 29 | + // this.tabType=getApp().meListType | ||
| 30 | + // this.setData({ | ||
| 31 | + // tabType:this.tabType | ||
| 32 | + // }) | ||
| 33 | + // } | ||
| 34 | + // this.getListData(); | ||
| 35 | }, | 35 | }, |
| 36 | 36 | ||
| 37 | /** | 37 | /** |
| @@ -46,6 +46,18 @@ Page({ | @@ -46,6 +46,18 @@ Page({ | ||
| 46 | */ | 46 | */ |
| 47 | onShow: function () { | 47 | onShow: function () { |
| 48 | PubSub.emit('custom-tab-bar') | 48 | PubSub.emit('custom-tab-bar') |
| 49 | + if(getApp().meListType!=this.tabType || this.data.list[this.tabType].length<1){ | ||
| 50 | + if(getApp().meListType){ | ||
| 51 | + this.switchType({ | ||
| 52 | + currentTarget:{ | ||
| 53 | + dataset:{ | ||
| 54 | + type:getApp().meListType, | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + }) | ||
| 58 | + } | ||
| 59 | + this.getListData(); | ||
| 60 | + } | ||
| 49 | }, | 61 | }, |
| 50 | 62 | ||
| 51 | /** | 63 | /** |
-
Please register or login to post a comment