Commit dfefaaed8dc70d55a94c23e33bc24410b0b955e0
1 parent
7b02ea39
点击分销,显示选中后的图标
Showing
1 changed file
with
20 additions
and
1 deletions
pages/distribution/distribution.js
| @@ -3,6 +3,19 @@ const app = getApp(); | @@ -3,6 +3,19 @@ const app = getApp(); | ||
| 3 | let self = null, os = app.globalData.setting; | 3 | let self = null, os = app.globalData.setting; |
| 4 | var regeneratorRuntime = require('../../utils/runtime.js'); | 4 | var regeneratorRuntime = require('../../utils/runtime.js'); |
| 5 | 5 | ||
| 6 | +// Component({ | ||
| 7 | +// pageLifetimes: { | ||
| 8 | +// show() { | ||
| 9 | +// if (typeof this.getTabBar === 'function' && this.getTabBar()) { | ||
| 10 | +// this.getTabBar().setData({ | ||
| 11 | +// active: 2 | ||
| 12 | +// }) | ||
| 13 | +// } | ||
| 14 | +// } | ||
| 15 | +// } | ||
| 16 | +// }) | ||
| 17 | + | ||
| 18 | + | ||
| 6 | Page({ | 19 | Page({ |
| 7 | 20 | ||
| 8 | /** | 21 | /** |
| @@ -57,7 +70,13 @@ Page({ | @@ -57,7 +70,13 @@ Page({ | ||
| 57 | /** | 70 | /** |
| 58 | * 生命周期函数--监听页面显示 | 71 | * 生命周期函数--监听页面显示 |
| 59 | */ | 72 | */ |
| 60 | - onShow: function () { | 73 | + onShow: function () { |
| 74 | + if (typeof this.getTabBar === 'function' && this.getTabBar()) { | ||
| 75 | + this.getTabBar().setData({ | ||
| 76 | + active: 2 | ||
| 77 | + }) | ||
| 78 | + }; | ||
| 79 | + | ||
| 61 | var self=this,userinfo=app.globalData.userInfo; | 80 | var self=this,userinfo=app.globalData.userInfo; |
| 62 | if(!app.globalData.userInfo){ | 81 | if(!app.globalData.userInfo){ |
| 63 | return false; | 82 | return false; |