Commit b2bb38d3f18a447765ac9b9600a69ba5d555a3ba
1 parent
674beb60
分享的优化
Showing
1 changed file
with
8 additions
and
2 deletions
app.js
| ... | ... | @@ -994,11 +994,17 @@ App({ |
| 994 | 994 | }, |
| 995 | 995 | |
| 996 | 996 | //检验能不能分享 |
| 997 | - check_can_share() { | |
| 997 | + check_can_share(th) { | |
| 998 | 998 | |
| 999 | 999 | var userinfo=wx.getStorageSync("userinfo"); |
| 1000 | - if (!this.globalData.user_id && !userinfo) wx.hideShareMenu(); | |
| 1000 | + if (!this.globalData.user_id && !userinfo) { | |
| 1001 | + wx.hideShareMenu(); | |
| 1002 | + if(th) th.setData({isLogin:0 }) | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + } | |
| 1001 | 1006 | else{ |
| 1007 | + if(th) th.setData({isLogin:1 }) | |
| 1002 | 1008 | wx.showShareMenu({ |
| 1003 | 1009 | withShareTicket: true, |
| 1004 | 1010 | menus: ["shareAppMessage", "shareTimeline"], | ... | ... |