Commit ad7e6236bbf75292ca7c23a4b3dbaad8fac7c575
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into test
Showing
22 changed files
with
45 additions
and
39 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"], | ... | ... |
packageA/pages/liveStream/liveStream.js
| ... | ... | @@ -283,13 +283,13 @@ Page({ |
| 283 | 283 | */ |
| 284 | 284 | onShow: function () { |
| 285 | 285 | |
| 286 | - getApp().check_can_share(); | |
| 286 | + getApp().check_can_share(this); | |
| 287 | 287 | if (app.globalData.userInfo) { |
| 288 | - if (!this.data.isLogin) { | |
| 288 | + if (!this.data.isLogin_a) { | |
| 289 | 289 | this.setData({ |
| 290 | 290 | userInfo: app.globalData.userInfo, |
| 291 | 291 | imghost: app.globalData.setting.imghost, |
| 292 | - isLogin: true, | |
| 292 | + isLogin_a: true, | |
| 293 | 293 | }); |
| 294 | 294 | |
| 295 | 295 | this.updateLiveList().then(() => { |
| ... | ... | @@ -312,9 +312,6 @@ Page({ |
| 312 | 312 | }); |
| 313 | 313 | |
| 314 | 314 | |
| 315 | - | |
| 316 | - | |
| 317 | - | |
| 318 | 315 | }); |
| 319 | 316 | |
| 320 | 317 | ... | ... |
packageA/pages/liveStream/liveStream.wxml
| ... | ... | @@ -84,7 +84,7 @@ |
| 84 | 84 | |
| 85 | 85 | {{item['anchor_name']}}</view> |
| 86 | 86 | </view> |
| 87 | - <view style="width: 30%;height: 90rpx;align-items: center;justify-items: center;"> | |
| 87 | + <view wx:if="{{isLogin}}" style="width: 30%;height: 90rpx;align-items: center;justify-items: center;"> | |
| 88 | 88 | <view bindtap="clickShare" data-sharimg="{{item.share_img}}" data-shartitle="{{item.name}}" data-anchorname="{{item['anchor_name']}}" class="display: flex;" style="width: 70%;border-radius: 25rpx;border: 1rpx solid #fc6247;height: 46rpx;margin-top: 25rpx;margin-left: 30rpx;"> |
| 89 | 89 | <view class="share-image"></view> |
| 90 | 90 | <view class="fs26" style="color: #fc6247;margin-left: 10rpx;line-height: 46rpx;"> 分享 </view> | ... | ... |
packageA/pages/liveStreamDetails/liveStreamDetails.js
| ... | ... | @@ -580,9 +580,12 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un |
| 580 | 580 | } |
| 581 | 581 | } |
| 582 | 582 | |
| 583 | - this.setData({ | |
| 584 | - nickName: app.globalData.userInfo.nickname | |
| 585 | - }) | |
| 583 | + if(app.globalData.userInfo){ | |
| 584 | + | |
| 585 | + this.setData({ | |
| 586 | + nickName: app.globalData.userInfo.nickname | |
| 587 | + }) | |
| 588 | + } | |
| 586 | 589 | |
| 587 | 590 | // var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" + |
| 588 | 591 | // os.stoid + "?sceneValue=1012" + "&pageValue=pages/goods/goodsInfo/goodsInfo"; |
| ... | ... | @@ -621,7 +624,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un |
| 621 | 624 | * 生命周期函数--监听页面显示 |
| 622 | 625 | */ |
| 623 | 626 | onShow: function () { |
| 624 | - getApp().check_can_share(); | |
| 627 | + getApp().check_can_share(this); | |
| 625 | 628 | }, |
| 626 | 629 | |
| 627 | 630 | /** | ... | ... |
packageA/pages/liveStreamDetails/liveStreamDetails.wxml
| ... | ... | @@ -50,7 +50,7 @@ |
| 50 | 50 | |
| 51 | 51 | <!-- 分享 --> |
| 52 | 52 | <view class="share-container"> |
| 53 | - <image src="/packageA/images/liveStreamDetails/share.jpg" bindtap="clickShare"></image> | |
| 53 | + <image wx:if="{{isLogin}}" src="/packageA/images/liveStreamDetails/share.jpg" bindtap="clickShare"></image> | |
| 54 | 54 | <image src="/packageA/images/liveStreamDetails/home.jpg" bindtap="backHome"></image> |
| 55 | 55 | </view> |
| 56 | 56 | ... | ... |
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.wxml
| ... | ... | @@ -182,7 +182,7 @@ |
| 182 | 182 | |
| 183 | 183 | <view wx:if="{{teamlist.kttype==3}}" class='bodybutton'> |
| 184 | 184 | <!-- 阶梯团 --> |
| 185 | - <button wx:if="{{p_status==1}}" bindtap="clickShare" style='background-color:#fab55a; color:#fff'> | |
| 185 | + <button wx:if="{{p_status==1 && isLogin}}" bindtap="clickShare" style='background-color:#fab55a; color:#fff'> | |
| 186 | 186 | <!-- <button wx:if="{{p_status==1}}" bindtap="clickShare" bindtap='cmeng' style='background-color:#fab55a; color:#fff'> --> |
| 187 | 187 | 邀请好友参团 |
| 188 | 188 | </button> |
| ... | ... | @@ -194,7 +194,7 @@ |
| 194 | 194 | |
| 195 | 195 | <!--会员团 商家团--> |
| 196 | 196 | <button class="bodybutton" style='background-color:#fab55a; color:#fff' bindtap='clickShare' |
| 197 | - wx:if="{{(teamlist.kttype==2||teamlist.kttype==1)&&p_status==1}}">邀请好友参团</button> | |
| 197 | + wx:if="{{(teamlist.kttype==2||teamlist.kttype==1)&&p_status==1 && isLogin}}">邀请好友参团</button> | |
| 198 | 198 | |
| 199 | 199 | <!-- </view> --> |
| 200 | 200 | <!-- </block> --> |
| ... | ... | @@ -240,7 +240,7 @@ |
| 240 | 240 | <view class="pdh20 f1"> |
| 241 | 241 | <button class="btn-red pdh20 fs24" bindtap="gohome">返回首页</button> |
| 242 | 242 | </view> |
| 243 | - <view class="pdh20 f1" wx:if="{{!(luckyGoMembers[0].create_time > 0)}}"> | |
| 243 | + <view class="pdh20 f1" wx:if="{{!(luckyGoMembers[0].create_time > 0 && isLogin)}}"> | |
| 244 | 244 | <button class="btn-yellow pdh20 fs24" bindtap="clickShare">邀请好友参团</button> |
| 245 | 245 | </view> |
| 246 | 246 | <!-- <button class="btn-red pdh20 fs24" bindtap="gohome">返回首页</button> | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| ... | ... | @@ -894,7 +894,7 @@ Page({ |
| 894 | 894 | //---展示--- |
| 895 | 895 | onShow: async function () { |
| 896 | 896 | |
| 897 | - getApp().check_can_share(); | |
| 897 | + getApp().check_can_share(this); | |
| 898 | 898 | // console.log('onshow'); |
| 899 | 899 | var goods_list = null, th = this, that = this; |
| 900 | 900 | var show_prew_img = this.data.show_prew_img | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.wxml
| ... | ... | @@ -208,7 +208,7 @@ |
| 208 | 208 | |
| 209 | 209 | <!-- 这个是分享按钮 --> |
| 210 | 210 | <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> --> |
| 211 | - <view class="xc-share-frame t-c" bindtap="{{isTimeUp ? 'timeUp':'clickShare'}}"> | |
| 211 | + <view wx:if="{{isLogin}}" class="xc-share-frame t-c" bindtap="{{isTimeUp ? 'timeUp':'clickShare'}}"> | |
| 212 | 212 | <view class="iconfont icon-share"></view> |
| 213 | 213 | <view class="fs22 c-7b">分享</view> |
| 214 | 214 | </view> | ... | ... |
packageC/pages/presell/goodsInfo/goodsInfo.js
packageC/pages/presell/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -122,7 +122,7 @@ |
| 122 | 122 | {{data.goods_name}} |
| 123 | 123 | </view> |
| 124 | 124 | <!-- 这个是分享按钮 --> |
| 125 | - <view class="xc-share-frame t-c" bindtap="clickShare"> | |
| 125 | + <view wx:if="{{isLogin}}" class="xc-share-frame t-c" bindtap="clickShare"> | |
| 126 | 126 | <view class="iconfont icon-share"></view> |
| 127 | 127 | <view class="fs22 c-7b">分享</view> |
| 128 | 128 | </view> | ... | ... |
packageC/pages/presell/pregoodsInfo/goodsInfo.js
packageC/pages/presell/pregoodsInfo/goodsInfo.wxml
| ... | ... | @@ -120,7 +120,7 @@ |
| 120 | 120 | {{data.goods_name}} |
| 121 | 121 | </view> |
| 122 | 122 | <!-- 这个是分享按钮 --> |
| 123 | - <view class="xc-share-frame t-c" bindtap="clickShare"> | |
| 123 | + <view wx:if="{{isLogin}}" class="xc-share-frame t-c" bindtap="clickShare"> | |
| 124 | 124 | <view class="iconfont icon-share fs60"></view> |
| 125 | 125 | <view class="fs22 c-7b">分享</view> |
| 126 | 126 | </view> | ... | ... |
packageE/pages/giftpack/giftpacklistshop/giftpacklistshop.js
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
| ... | ... | @@ -359,7 +359,7 @@ Page({ |
| 359 | 359 | var th=this; |
| 360 | 360 | this.setData({submit:0}) |
| 361 | 361 | com.set_py_fir(); |
| 362 | - getApp().check_can_share(); | |
| 362 | + getApp().check_can_share(this); | |
| 363 | 363 | getApp().is_Single_page(this, function () { |
| 364 | 364 | //--先判断会员状态-- |
| 365 | 365 | var user_info = getApp().globalData.userInfo; | ... | ... |
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js
pages/giftpack/giftpacklist/giftpacklist.js
| ... | ... | @@ -169,7 +169,7 @@ Page({ |
| 169 | 169 | this.setData({submit:0}) |
| 170 | 170 | ut.fy_back('',0); |
| 171 | 171 | com.set_py_fir(); |
| 172 | - getApp().check_can_share(); | |
| 172 | + getApp().check_can_share(this); | |
| 173 | 173 | getApp().is_Single_page(this, function () { |
| 174 | 174 | //--先判断会员状态-- |
| 175 | 175 | var user_info = getApp().globalData.userInfo; | ... | ... |
pages/giftpack/giftpacklist/giftpacklist.wxml
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | <text class="data-v-3a5b7e36 ellipsis-2" style="width:90%;">{{giftTitle}}</text> |
| 14 | 14 | |
| 15 | 15 | <!-- 这个是分享按钮 --> |
| 16 | - <view wx:if="{{c_state<2}}" class="xc-share-frame t-c" bindtap="clickShare"> | |
| 16 | + <view wx:if="{{c_state<2 && isLogin}}" class="xc-share-frame t-c" bindtap="clickShare"> | |
| 17 | 17 | <view class="iconfont icon-share fs40" ></view> |
| 18 | 18 | <view class="fs22 c-7b">分享</view> |
| 19 | 19 | </view> | ... | ... |
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -903,7 +903,7 @@ Page({ |
| 903 | 903 | //---展示--- |
| 904 | 904 | onShow: function () { |
| 905 | 905 | |
| 906 | - getApp().check_can_share(); | |
| 906 | + getApp().check_can_share(this); | |
| 907 | 907 | |
| 908 | 908 | var goods_list = null, |
| 909 | 909 | th = this, |
| ... | ... | @@ -5317,7 +5317,7 @@ Page({ |
| 5317 | 5317 | //-------跳转pt商品------- |
| 5318 | 5318 | go_to_nopay: function () { |
| 5319 | 5319 | var th = this; |
| 5320 | - url = "/pages/user/order_detail/order_detail?order_id=" + th.data.buy_order.order_id; | |
| 5320 | + var url = "/pages/user/order_detail/order_detail?order_id=" + th.data.buy_order.order_id; | |
| 5321 | 5321 | getApp().goto(url); |
| 5322 | 5322 | |
| 5323 | 5323 | }, | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxml
| ... | ... | @@ -187,7 +187,7 @@ |
| 187 | 187 | {{data.goods_name}} |
| 188 | 188 | </view> |
| 189 | 189 | <!-- 这个是分享按钮 --> |
| 190 | - <view class="xc-share-frame t-c shrink0" bindtap="clickShare"> | |
| 190 | + <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> | |
| 191 | 191 | <view class="iconfont icon-share"></view> |
| 192 | 192 | <view class="fs22 c-7b">分享</view> |
| 193 | 193 | </view> |
| ... | ... | @@ -278,7 +278,7 @@ |
| 278 | 278 | </view> |
| 279 | 279 | <!-- 这个是分享按钮 --> |
| 280 | 280 | <!-- <view class="xc-share-frame {{prom_type==1?'s_ms_bth':''}} t-c" bindtap="saveImageToPhotosAlbum"> --> |
| 281 | - <view class="xc-share-frame t-c shrink0" bindtap="clickShare"> | |
| 281 | + <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> | |
| 282 | 282 | <!-- <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> --> |
| 283 | 283 | <view class="iconfont icon-share"></view> |
| 284 | 284 | <!-- <view class="share-font">1分享</view> --> |
| ... | ... | @@ -332,7 +332,7 @@ |
| 332 | 332 | </view> |
| 333 | 333 | </view> |
| 334 | 334 | <!-- 这个是分享按钮 --> |
| 335 | - <view class="xc-share-frame t-c shrink0" bindtap="clickShare" wx:if="{{prom_type != 1 && prom_type != 2}}"> | |
| 335 | + <view class="xc-share-frame t-c shrink0" bindtap="clickShare" wx:if="{{prom_type != 1 && prom_type != 2 && isLogin}}"> | |
| 336 | 336 | <!-- <image class="share-frame" src="{{iurl}}/miniapp/images/share.png"></image> --> |
| 337 | 337 | <view class="iconfont icon-share"></view> |
| 338 | 338 | <view class="fs22 c-7b">分享</view> |
| ... | ... | @@ -428,7 +428,7 @@ |
| 428 | 428 | <view wx:else class="word-line no_line_x fs24">¥{{filters.toFix(data.shop_price,2)}}</view> |
| 429 | 429 | </view> |
| 430 | 430 | <!-- 这个是分享按钮 --> |
| 431 | - <view class="xc-share-frame t-c shrink0" bindtap="clickShare"> | |
| 431 | + <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare"> | |
| 432 | 432 | <view class="iconfont icon-share"></view> |
| 433 | 433 | <view class="fs22 c-7b">分享</view> |
| 434 | 434 | </view> |
| ... | ... | @@ -444,7 +444,7 @@ |
| 444 | 444 | <view class="xc-explain flex jc_sb" wx:if="{{prom_type==2}}"> |
| 445 | 445 | <view class="fs32 ellipsis-2" style="max-width:80%; max-height: 90rpx;">{{sele_g.goods_name}}</view> |
| 446 | 446 | <!-- 这个是分享按钮 --> |
| 447 | - <view class="xc-share-frame t-c shrink0" bindtap="clickShare" style="flex-shrink:0;position: relative;top: -22rpx;"> | |
| 447 | + <view wx:if="{{isLogin}}" class="xc-share-frame t-c shrink0" bindtap="clickShare" style="flex-shrink:0;position: relative;top: -22rpx;"> | |
| 448 | 448 | <view class="iconfont icon-share"></view> |
| 449 | 449 | <view class="fs22 c-7b">分享</view> |
| 450 | 450 | </view> | ... | ... |
pages/team/team_success/team_success.js
pages/team/team_success/team_success.wxml
| ... | ... | @@ -166,7 +166,7 @@ |
| 166 | 166 | |
| 167 | 167 | <view wx:if="{{teamlist.kttype==3}}" class='bodybutton'> |
| 168 | 168 | <!-- 阶梯团 --> |
| 169 | - <button wx:if="{{p_status==1}}" bindtap="clickShare" style='background-color:#fab55a; color:#fff'> | |
| 169 | + <button wx:if="{{p_status==1 && isLogin}}" bindtap="clickShare" style='background-color:#fab55a; color:#fff'> | |
| 170 | 170 | <!-- <button wx:if="{{p_status==1}}" bindtap="clickShare" bindtap='cmeng' style='background-color:#fab55a; color:#fff'> --> |
| 171 | 171 | 邀请好友参团 |
| 172 | 172 | </button> |
| ... | ... | @@ -178,7 +178,7 @@ |
| 178 | 178 | |
| 179 | 179 | <!--会员团 商家团--> |
| 180 | 180 | <button class="bodybutton" style='background-color:#fab55a; color:#fff' bindtap='clickShare' |
| 181 | - wx:if="{{(teamlist.kttype==2||teamlist.kttype==1)&&p_status==1}}">邀请好友参团</button> | |
| 181 | + wx:if="{{(teamlist.kttype==2||teamlist.kttype==1)&&p_status==1 && isLogin}}">邀请好友参团</button> | |
| 182 | 182 | |
| 183 | 183 | <!-- </view> --> |
| 184 | 184 | <!-- </block> --> | ... | ... |