Commit 6a76ccc0ef07320b0c23e5bf7d8e8d5a2a8d6fdb
1 parent
1de5a132
未登陆不允许分享的优化
Showing
86 changed files
with
175 additions
and
34 deletions
app.js
| ... | ... | @@ -205,6 +205,7 @@ App({ |
| 205 | 205 | this.getConfig(); |
| 206 | 206 | }, |
| 207 | 207 | |
| 208 | + | |
| 208 | 209 | //---初始化第三方---- |
| 209 | 210 | initExt: function () { |
| 210 | 211 | var tt = t; |
| ... | ... | @@ -842,7 +843,6 @@ App({ |
| 842 | 843 | urls: [path] |
| 843 | 844 | }); |
| 844 | 845 | }, |
| 845 | - | |
| 846 | 846 | //b是数组,t是wxml元素返回的 |
| 847 | 847 | pre_img2(b,t){ |
| 848 | 848 | this.globalData.no_clear=1; |
| ... | ... | @@ -892,7 +892,7 @@ App({ |
| 892 | 892 | }); |
| 893 | 893 | }, |
| 894 | 894 | |
| 895 | - com_call(self) { | |
| 895 | + com_call(self) { | |
| 896 | 896 | self.getTel() |
| 897 | 897 | .then(() => { |
| 898 | 898 | if(self.data.store_tel) { |
| ... | ... | @@ -912,6 +912,14 @@ App({ |
| 912 | 912 | }; |
| 913 | 913 | }); |
| 914 | 914 | }, |
| 915 | + | |
| 916 | + //检验能不能分享 | |
| 917 | + check_can_share(){ | |
| 918 | + if(!this.globalData.user_id) wx.hideShareMenu(); | |
| 919 | + else wx.showShareMenu(); | |
| 920 | + } | |
| 921 | + | |
| 922 | + | |
| 915 | 923 | |
| 916 | 924 | |
| 917 | 925 | ... | ... |
packageA/pages/activity_share/activity_share.js
packageA/pages/addCustomer/addCustomer.js
packageA/pages/cardDetails/cardDetails.js
packageA/pages/cardList/cardList.js
packageA/pages/chongzhi/chongzhi.js
packageA/pages/chongzhiDetails/chongzhiDetails.js
packageA/pages/choujiang/choujiang.js
packageA/pages/details_serviceCard/details_serviceCard.js
packageA/pages/distribution/card/card.js
packageA/pages/distribution/commision/commision.js
packageA/pages/distribution/goods/goods.js
packageA/pages/distribution/myteam/myteam.js
packageA/pages/distribution/order/order.js
packageA/pages/distribution/rank/rank.js
packageA/pages/distribution/rookie/rookie.js
packageA/pages/distribution/shop/shop.js
packageA/pages/goodsInfo/goodsInfo.js
packageA/pages/goods_share/goods_share.js
packageA/pages/hongBao/hongBao.js
packageA/pages/hongBaoDetails/hongBaoDetails.js
packageA/pages/jfbuy/jfbuy.js
packageA/pages/liveStream/liveStream.js
packageA/pages/liveStreamDetails/liveStreamDetails.js
| ... | ... | @@ -53,6 +53,11 @@ Page({ |
| 53 | 53 | |
| 54 | 54 | // 分享操作表 |
| 55 | 55 | clickShare: function () { |
| 56 | + | |
| 57 | + if(!getApp().globalData.user_id){ | |
| 58 | + getApp().goto("/pages/togoin/togoin"); | |
| 59 | + return false; | |
| 60 | + } | |
| 56 | 61 | this.setData({ |
| 57 | 62 | showActionSheet: !this.data.showActionSheet |
| 58 | 63 | }) |
| ... | ... | @@ -570,7 +575,7 @@ drawText: function(ctx, str, leftWidth, initHeight, titleHeight, canvasWidth, un |
| 570 | 575 | * 生命周期函数--监听页面显示 |
| 571 | 576 | */ |
| 572 | 577 | onShow: function () { |
| 573 | - | |
| 578 | + getApp().check_can_share(); | |
| 574 | 579 | }, |
| 575 | 580 | |
| 576 | 581 | /** | ... | ... |
packageA/pages/live_share/live_share.js
packageA/pages/myGift/myGift.js
packageA/pages/myGiftDetails/myGiftDetails.js
packageA/pages/parseHtml/parseHtml.js
packageA/pages/profile/profile.js
packageA/pages/prom_list/prom_list.js
packageA/pages/quan/quan.js
packageA/pages/service_share/service_share.js
packageA/pages/user/my_service2/appment_main.js
packageB/pages/boxes-details/boxes-details.js
packageB/pages/luckactivity/index/index.js
packageB/pages/user/Change_phone/Change_phone.js
packageB/pages/user/binding_info/binding_info.js
packageB/pages/user/buyDetails/buyDetails.js
packageB/pages/user/choice_guide/choice_guide.js
packageB/pages/video/index.js
packageB/pages/zuhegou/index/index.js
packageB/pages/zuhegou/list/list.js
packageB/pages/zuhegou/preindex/index.js
packageC/pages/goods/distributionCategoryList/index.js
packageC/pages/goods/goodsList/goodsList.js
| ... | ... | @@ -119,6 +119,11 @@ Page({ |
| 119 | 119 | } |
| 120 | 120 | }); |
| 121 | 121 | }, |
| 122 | + | |
| 123 | + onShow:function () { | |
| 124 | + getApp().check_can_share(); | |
| 125 | + }, | |
| 126 | + | |
| 122 | 127 | //设置优惠券的 |
| 123 | 128 | set_prom_list: async function (arr) { |
| 124 | 129 | var th = this; |
| ... | ... | @@ -313,4 +318,6 @@ Page({ |
| 313 | 318 | }, |
| 314 | 319 | |
| 315 | 320 | |
| 321 | + | |
| 322 | + | |
| 316 | 323 | }); |
| 317 | 324 | \ No newline at end of file | ... | ... |
packageC/pages/goods/search/search.js
packageC/pages/group_list/group_list.js
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js
packageC/pages/luckyGo/luckyGo_details/luckyGo_details.js
| ... | ... | @@ -106,6 +106,7 @@ Page({ |
| 106 | 106 | }, |
| 107 | 107 | |
| 108 | 108 | onShow: function() { |
| 109 | + getApp().check_can_share(); | |
| 109 | 110 | this.get_team_info(); |
| 110 | 111 | }, |
| 111 | 112 | |
| ... | ... | @@ -1009,6 +1010,10 @@ Page({ |
| 1009 | 1010 | // }, |
| 1010 | 1011 | |
| 1011 | 1012 | clickShare() { |
| 1013 | + if(!getApp().globalData.user_id){ | |
| 1014 | + getApp().goto("/pages/togoin/togoin"); | |
| 1015 | + return false; | |
| 1016 | + } | |
| 1012 | 1017 | this.setData({ |
| 1013 | 1018 | share_hidden: true, |
| 1014 | 1019 | }); | ... | ... |
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
| ... | ... | @@ -756,6 +756,8 @@ Page({ |
| 756 | 756 | |
| 757 | 757 | //---展示--- |
| 758 | 758 | onShow: async function () { |
| 759 | + | |
| 760 | + getApp().check_can_share(); | |
| 759 | 761 | // console.log('onshow'); |
| 760 | 762 | var goods_list = null, th = this, that = this; |
| 761 | 763 | var show_prew_img = this.data.show_prew_img |
| ... | ... | @@ -6196,6 +6198,10 @@ Page({ |
| 6196 | 6198 | }, |
| 6197 | 6199 | |
| 6198 | 6200 | clickShare() { |
| 6201 | + if(!getApp().globalData.user_id){ | |
| 6202 | + getApp().goto("/pages/togoin/togoin"); | |
| 6203 | + return false; | |
| 6204 | + } | |
| 6199 | 6205 | this.setData({ |
| 6200 | 6206 | share_hidden: true, |
| 6201 | 6207 | }); | ... | ... |
packageC/pages/luckyGo/luckyGo_members/luckyGo_members.js
packageC/pages/luckyGo/luckyGo_winners/luckyGo_winners.js
packageC/pages/presell/goodsInfo/goodsInfo.js
| ... | ... | @@ -593,6 +593,7 @@ Page({ |
| 593 | 593 | |
| 594 | 594 | //---展示--- |
| 595 | 595 | onShow: function () { |
| 596 | + getApp().check_can_share(); | |
| 596 | 597 | var goods_list = null, th = this, that = this; |
| 597 | 598 | |
| 598 | 599 | //-- 如果是预览图片,页面不重新更新 -- |
| ... | ... | @@ -3844,6 +3845,10 @@ Page({ |
| 3844 | 3845 | }, |
| 3845 | 3846 | |
| 3846 | 3847 | clickShare() { |
| 3848 | + if(!getApp().globalData.user_id){ | |
| 3849 | + getApp().goto("/pages/togoin/togoin"); | |
| 3850 | + return false; | |
| 3851 | + } | |
| 3847 | 3852 | this.setData({ share_hidden: true, }); |
| 3848 | 3853 | }, |
| 3849 | 3854 | ... | ... |
packageC/pages/presell/pregoodsInfo/goodsInfo.js
| ... | ... | @@ -590,6 +590,8 @@ Page({ |
| 590 | 590 | |
| 591 | 591 | //---展示--- |
| 592 | 592 | onShow: function () { |
| 593 | + | |
| 594 | + getApp().check_can_share(); | |
| 593 | 595 | var goods_list = null, th = this, that = this; |
| 594 | 596 | |
| 595 | 597 | //-- 如果是预览图片,页面不重新更新 -- |
| ... | ... | @@ -3807,7 +3809,11 @@ Page({ |
| 3807 | 3809 | }, |
| 3808 | 3810 | |
| 3809 | 3811 | clickShare() { |
| 3810 | - this.setData({ share_hidden: true, }); | |
| 3812 | + if(!getApp().globalData.user_id){ | |
| 3813 | + getApp().goto("/pages/togoin/togoin"); | |
| 3814 | + return false; | |
| 3815 | + } | |
| 3816 | + this.setData({ share_hidden: true, }); | |
| 3811 | 3817 | }, |
| 3812 | 3818 | |
| 3813 | 3819 | send() { | ... | ... |
packageD/pages/AI-test-skin/history_record/history_record.js
packageD/pages/AI-test-skin/index/aiskin.js
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js
packageD/pages/AI-test-skin/success_result/success_result.js
pages/activity/pind_list/pind_list.js
pages/activity/seckill_list/seckill_list.js
pages/cart/cart_wk/cart_wk.js
pages/distribution/distribution.js
pages/giftpack/buygiftpack/giftpackbuy.js
pages/giftpack/giftpacklist/giftpacklist.js
pages/giftpack/mygiftpack/mygiftpack.js
pages/goods/categoryList/categoryList.js
pages/goods/goodsInfo/goodsInfo.js
| ... | ... | @@ -763,7 +763,7 @@ Page({ |
| 763 | 763 | //---展示--- |
| 764 | 764 | onShow: function () { |
| 765 | 765 | |
| 766 | - | |
| 766 | + getApp().check_can_share(); | |
| 767 | 767 | |
| 768 | 768 | var goods_list = null, th = this, that = this; |
| 769 | 769 | var show_prew_img = this.data.show_prew_img |
| ... | ... | @@ -2404,7 +2404,8 @@ Page({ |
| 2404 | 2404 | }, |
| 2405 | 2405 | |
| 2406 | 2406 | //--点击分享事件--- |
| 2407 | - onShareAppMessage: function (t) { getApp().globalData.no_clear=1; | |
| 2407 | + onShareAppMessage: function (t) { | |
| 2408 | + getApp().globalData.no_clear=1; | |
| 2408 | 2409 | |
| 2409 | 2410 | var th = this; |
| 2410 | 2411 | var price = th.data.sele_g.shop_price; |
| ... | ... | @@ -6375,6 +6376,10 @@ Page({ |
| 6375 | 6376 | }, |
| 6376 | 6377 | |
| 6377 | 6378 | clickShare() { |
| 6379 | + if(!getApp().globalData.user_id){ | |
| 6380 | + getApp().goto("/pages/togoin/togoin"); | |
| 6381 | + return false; | |
| 6382 | + } | |
| 6378 | 6383 | this.setData({ |
| 6379 | 6384 | share_hidden: true, |
| 6380 | 6385 | }); | ... | ... |
pages/goods/goodsList/goodsList.js
pages/goods/search/search.js
| ... | ... | @@ -139,8 +139,11 @@ Page({ |
| 139 | 139 | // 获取历史搜索记录 |
| 140 | 140 | this.getHistorySearch(); |
| 141 | 141 | }, |
| 142 | - | |
| 143 | - | |
| 142 | + | |
| 143 | + onShow:function () { | |
| 144 | + getApp().check_can_share(); | |
| 145 | + }, | |
| 146 | + | |
| 144 | 147 | changeTab: function(t) { |
| 145 | 148 | var ord = t.currentTarget.dataset.href; |
| 146 | 149 | var ad = t.currentTarget.dataset.ad; | ... | ... |
pages/index/index/index.js
pages/team/team_show/team_show.js
pages/team/team_success/team_success.js
| ... | ... | @@ -86,6 +86,10 @@ Page({ |
| 86 | 86 | } |
| 87 | 87 | }) |
| 88 | 88 | }, |
| 89 | + onShow:function () { | |
| 90 | + getApp().check_can_share(); | |
| 91 | + }, | |
| 92 | + | |
| 89 | 93 | //关闭展开列表 |
| 90 | 94 | click:function(e){ |
| 91 | 95 | this.setData({ |
| ... | ... | @@ -845,6 +849,10 @@ Page({ |
| 845 | 849 | }, |
| 846 | 850 | |
| 847 | 851 | clickShare() { |
| 852 | + if(!getApp().globalData.user_id){ | |
| 853 | + getApp().goto("/pages/togoin/togoin"); | |
| 854 | + return false; | |
| 855 | + } | |
| 848 | 856 | this.setData({ |
| 849 | 857 | share_hidden: true, |
| 850 | 858 | }); | ... | ... |
pages/template/index.js
pages/user/assistance/assistance.js
pages/user/assistance/friend_assistance.js
| ... | ... | @@ -54,6 +54,7 @@ Page({ |
| 54 | 54 | * 生命周期函数--监听页面显示 |
| 55 | 55 | */ |
| 56 | 56 | onShow: function() { |
| 57 | + getApp().check_can_share(); | |
| 57 | 58 | //--先判断会员状态-- |
| 58 | 59 | var user_info = getApp().globalData.userInfo; |
| 59 | 60 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ... | ... |
pages/user/assistance/task_assistance.js
| ... | ... | @@ -147,7 +147,7 @@ Page({ |
| 147 | 147 | * 生命周期函数--监听页面显示 |
| 148 | 148 | */ |
| 149 | 149 | onShow: function () { |
| 150 | - | |
| 150 | + getApp().check_can_share(); | |
| 151 | 151 | //--先判断会员状态-- |
| 152 | 152 | var user_info = getApp().globalData.userInfo; |
| 153 | 153 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ... | ... |
pages/user/deposit/prepaid/msg/msg.js
pages/user/index/index.js
pages/user/integral/integral.js
| ... | ... | @@ -307,6 +307,7 @@ Page({ |
| 307 | 307 | * 生命周期函数--监听页面显示 |
| 308 | 308 | */ |
| 309 | 309 | onShow: function () { |
| 310 | + getApp().check_can_share(); | |
| 310 | 311 | //--先判断会员状态-- |
| 311 | 312 | var user_info = getApp().globalData.userInfo; |
| 312 | 313 | if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) { | ... | ... |
pages/user/integral/msg/msg.js
pages/user/member/bring/bring.js
pages/user/member/bring/msg/msg.js
pages/user/member/menber.js
pages/user/user_spsy/user_spsy.js
pages/user/userinfo/userinfo.js
pages/user/userqy/userqy.js
| ... | ... | @@ -53,6 +53,7 @@ Page({ |
| 53 | 53 | * 生命周期函数--监听页面显示 |
| 54 | 54 | */ |
| 55 | 55 | onShow: async function () { |
| 56 | + getApp().check_can_share(); | |
| 56 | 57 | wx.showLoading(); |
| 57 | 58 | var cz_val=0,backClass=null,qy_list=null,gradeId=null,gradeEndDate=null,need_money=0,g_qy_list=null,GradeName='',cur_g_num=0; |
| 58 | 59 | var gl_data=getApp().globalData; | ... | ... |