diff --git a/app.js b/app.js index a6b002c..e30525f 100644 --- a/app.js +++ b/app.js @@ -994,11 +994,17 @@ App({ }, //检验能不能分享 - check_can_share() { + check_can_share(th) { var userinfo=wx.getStorageSync("userinfo"); - if (!this.globalData.user_id && !userinfo) wx.hideShareMenu(); + if (!this.globalData.user_id && !userinfo) { + wx.hideShareMenu(); + if(th) th.setData({isLogin:0 }) + + + } else{ + if(th) th.setData({isLogin:1 }) wx.showShareMenu({ withShareTicket: true, menus: ["shareAppMessage", "shareTimeline"], diff --git a/packageA/pages/liveStream/liveStream.js b/packageA/pages/liveStream/liveStream.js index 1e16b24..f9401ae 100644 --- a/packageA/pages/liveStream/liveStream.js +++ b/packageA/pages/liveStream/liveStream.js @@ -283,13 +283,13 @@ Page({ */ onShow: function () { - getApp().check_can_share(); + getApp().check_can_share(this); if (app.globalData.userInfo) { - if (!this.data.isLogin) { + if (!this.data.isLogin_a) { this.setData({ userInfo: app.globalData.userInfo, imghost: app.globalData.setting.imghost, - isLogin: true, + isLogin_a: true, }); this.updateLiveList().then(() => { @@ -312,9 +312,6 @@ Page({ }); - - - }); diff --git a/packageA/pages/liveStream/liveStream.wxml b/packageA/pages/liveStream/liveStream.wxml index ed5c088..cbbfb52 100644 --- a/packageA/pages/liveStream/liveStream.wxml +++ b/packageA/pages/liveStream/liveStream.wxml @@ -84,7 +84,7 @@ {{item['anchor_name']}} - + 分享 diff --git a/packageA/pages/liveStreamDetails/liveStreamDetails.js b/packageA/pages/liveStreamDetails/liveStreamDetails.js index 686b656..5263c76 100644 --- a/packageA/pages/liveStreamDetails/liveStreamDetails.js +++ b/packageA/pages/liveStreamDetails/liveStreamDetails.js @@ -580,9 +580,12 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un } } - this.setData({ - nickName: app.globalData.userInfo.nickname - }) + if(app.globalData.userInfo){ + + this.setData({ + nickName: app.globalData.userInfo.nickname + }) + } // var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + // os.stoid + "?sceneValue=1012" + "&pageValue=pages/goods/goodsInfo/goodsInfo"; @@ -621,7 +624,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un * 生命周期函数--监听页面显示 */ onShow: function () { - getApp().check_can_share(); + getApp().check_can_share(this); }, /** diff --git a/packageA/pages/liveStreamDetails/liveStreamDetails.wxml b/packageA/pages/liveStreamDetails/liveStreamDetails.wxml index a09fa35..83eea5e 100644 --- a/packageA/pages/liveStreamDetails/liveStreamDetails.wxml +++ b/packageA/pages/liveStreamDetails/liveStreamDetails.wxml @@ -50,7 +50,7 @@ diff --git a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js index cf05702..6b453d8 100644 --- a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js +++ b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js @@ -106,7 +106,7 @@ Page({ }, onShow: function() { - getApp().check_can_share(); + getApp().check_can_share(this); this.get_team_info(); }, diff --git a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml index 0d3d155..f28cbb7 100644 --- a/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml +++ b/packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml @@ -182,7 +182,7 @@ - @@ -194,7 +194,7 @@ + wx:if="{{(teamlist.kttype==2||teamlist.kttype==1)&&p_status==1 && isLogin}}">邀请好友参团 @@ -240,7 +240,7 @@ - + - - -