Commit 65da041b400d649b791450a5478396bc16cd436c

Authored by 后端研发-苏泰源
2 parents c7febf5a 835b069d

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

Showing 91 changed files with 204 additions and 52 deletions
... ... @@ -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
... ... @@ -125,7 +125,7 @@ Page({
125 125 /**
126 126 * 生命周期函数--监听页面显示
127 127 */
128   - onShow: function () {},
  128 + onShow: function () { getApp().check_can_share(); },
129 129 /**
130 130 * 生命周期函数--监听页面隐藏
131 131 */
... ...
packageA/pages/addCustomer/addCustomer.js
... ... @@ -26,7 +26,7 @@ Page({
26 26 * 生命周期函数--监听页面显示
27 27 */
28 28 onShow: function () {
29   -
  29 + getApp().check_can_share();
30 30 },
31 31  
32 32 /**
... ...
packageA/pages/cardDetails/cardDetails.js
... ... @@ -39,6 +39,7 @@ Page({
39 39 * 生命周期函数--监听页面显示
40 40 */
41 41 onShow: function () {
  42 + getApp().check_can_share();
42 43 if(app.globalData.userInfo) {
43 44 if(!this.data.isLogin) {
44 45 this.setData({
... ...
packageA/pages/cardList/cardList.js
... ... @@ -52,6 +52,7 @@ Page({
52 52 * 生命周期函数--监听页面显示
53 53 */
54 54 onShow: function () {
  55 + getApp().check_can_share();
55 56 let url = '/api/weshop/serviceCard/page';
56 57 let currentQuery = this.data.currentQuery;
57 58 if(app.globalData.userInfo) {
... ...
packageA/pages/chongzhi/chongzhi.js
... ... @@ -64,7 +64,7 @@ Page({
64 64 * 生命周期函数--监听页面显示
65 65 */
66 66 onShow: function () {
67   -
  67 + getApp().check_can_share();
68 68 },
69 69  
70 70 /**
... ...
packageA/pages/chongzhiDetails/chongzhiDetails.js
... ... @@ -105,7 +105,7 @@ Page({
105 105 * 生命周期函数--监听页面显示
106 106 */
107 107 onShow: function () {
108   -
  108 + getApp().check_can_share();
109 109 },
110 110  
111 111 /**
... ...
packageA/pages/choujiang/choujiang.js
... ... @@ -26,7 +26,7 @@ Page({
26 26 * 生命周期函数--监听页面显示
27 27 */
28 28 onShow: function () {
29   -
  29 + getApp().check_can_share();
30 30 },
31 31  
32 32 /**
... ...
packageA/pages/details_serviceCard/details_serviceCard.js
... ... @@ -42,6 +42,7 @@ Page({
42 42 * 生命周期函数--监听页面显示
43 43 */
44 44 onShow: function() {
  45 + getApp().check_can_share();
45 46 if (app.globalData.userInfo) {
46 47 if (!this.data.isLogin) {
47 48 this.setData({
... ...
packageA/pages/distribution/card/card.js
... ... @@ -38,6 +38,7 @@ Page({
38 38 * 生命周期函数--监听页面显示
39 39 */
40 40 onShow: function () {
  41 + getApp().check_can_share();
41 42 if(app.globalData.userInfo) {
42 43 if(!this.data.isLogin) {
43 44 this.setData({
... ...
packageA/pages/distribution/commision/commision.js
... ... @@ -74,6 +74,7 @@ Page({
74 74 * 生命周期函数--监听页面显示
75 75 */
76 76 onShow: function () {
  77 + getApp().check_can_share();
77 78  
78 79 if(app.globalData.userInfo) {
79 80 if(!this.data.isLogin) {
... ...
packageA/pages/distribution/goods/goods.js
... ... @@ -97,6 +97,8 @@ Page({
97 97 * 生命周期函数--监听页面显示
98 98 */
99 99 onShow: function () {
  100 +
  101 + getApp().check_can_share();
100 102 let url = '/api/weshop/goods/page';
101 103 let currentQuery = this.data.currentQuery;
102 104 if(app.globalData.userInfo) {
... ...
packageA/pages/distribution/myteam/myteam.js
... ... @@ -69,6 +69,7 @@ Page({
69 69 * 生命周期函数--监听页面显示
70 70 */
71 71 onShow: function () {
  72 + getApp().check_can_share();
72 73 if(app.globalData.userInfo) {
73 74 if(!this.data.isLogin) {
74 75 this.setData({
... ...
packageA/pages/distribution/order/order.js
... ... @@ -78,6 +78,7 @@ Page({
78 78 * 生命周期函数--监听页面显示
79 79 */
80 80 onShow: function () {
  81 + getApp().check_can_share();
81 82 if(app.globalData.userInfo) {
82 83 if(!this.data.isLogin) {
83 84 this.setData({
... ...
packageA/pages/distribution/rank/rank.js
... ... @@ -67,6 +67,7 @@ Page({
67 67 * 生命周期函数--监听页面显示
68 68 */
69 69 onShow: function () {
  70 + getApp().check_can_share();
70 71 if(app.globalData.userInfo) {
71 72 if(!this.data.isLogin) {
72 73 this.setData({
... ...
packageA/pages/distribution/rookie/rookie.js
... ... @@ -58,6 +58,7 @@ Page({
58 58 * 生命周期函数--监听页面显示
59 59 */
60 60 onShow: function () {
  61 + getApp().check_can_share();
61 62 if(app.globalData.userInfo instanceof Object) {
62 63 this.setData({
63 64 userInfo: app.globalData.userInfo,
... ...
packageA/pages/distribution/shop/shop.js
... ... @@ -95,6 +95,8 @@ Page({
95 95 * 生命周期函数--监听页面显示
96 96 */
97 97 onShow: function () {
  98 + getApp().check_can_share();
  99 +
98 100 //自己登录的
99 101 if (app.globalData.userInfo && !this.data.first_leader) {
100 102 if (!this.data.isLogin) {
... ...
packageA/pages/goodsInfo/goodsInfo.js
... ... @@ -668,6 +668,9 @@ Page({
668 668 //---展示---
669 669 // gid 在onload阶段已经保存在this.data中
670 670 onShow: function() {
  671 +
  672 + getApp().check_can_share();
  673 +
671 674 var that=this;
672 675 var ee = this,gid = this.data.gid, i = getApp().request;
673 676 this.data.is_timer = 1;
... ...
packageA/pages/goods_share/goods_share.js
... ... @@ -123,9 +123,9 @@ Page({
123 123  
124 124 /*** 生命周期函数--监听页面显示***/
125 125 onShow: function () {
  126 + getApp().check_can_share();
126 127 var th=this;
127   -
128   -
  128 +
129 129 if(app.globalData.userInfo) {
130 130 this.setData({
131 131 //用来判断是否是分销商,是分销商才显示分成佣金
... ...
packageA/pages/hongBao/hongBao.js
... ... @@ -76,10 +76,9 @@ Page({
76 76 */
77 77 onShow: function () {
78 78 console.log('onshow');
  79 + getApp().check_can_share();
79 80  
80   -
81   -
82   -
  81 +
83 82 },
84 83  
85 84 /**
... ...
packageA/pages/hongBaoDetails/hongBaoDetails.js
... ... @@ -64,7 +64,7 @@ Page({
64 64 * 生命周期函数--监听页面显示
65 65 */
66 66 onShow: function () {
67   -
  67 + getApp().check_can_share();
68 68 },
69 69  
70 70 /**
... ...
packageA/pages/jfbuy/jfbuy.js
... ... @@ -169,7 +169,7 @@ Page({
169 169 /**
170 170 * 生命周期函数--监听页面显示
171 171 */
172   - onShow: function () {},
  172 + onShow: function () { getApp().check_can_share(); },
173 173 /**
174 174 * 生命周期函数--监听页面隐藏
175 175 */
... ...
packageA/pages/liveStream/liveStream.js
... ... @@ -229,6 +229,8 @@ Page({
229 229 * 生命周期函数--监听页面显示
230 230 */
231 231 onShow: function () {
  232 +
  233 + getApp().check_can_share();
232 234 if(app.globalData.userInfo) {
233 235 if(!this.data.isLogin) {
234 236 this.setData({
... ...
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
... ... @@ -44,7 +44,7 @@ Page({
44 44 * 生命周期函数--监听页面显示
45 45 */
46 46 onShow: function () {
47   -
  47 + getApp().check_can_share();
48 48 },
49 49  
50 50 /**
... ...
packageA/pages/myGift/myGift.js
... ... @@ -67,6 +67,8 @@ Page({
67 67 * 生命周期函数--监听页面显示
68 68 */
69 69 onShow: function () {
  70 +
  71 + getApp().check_can_share();
70 72 if(app.globalData.userInfo) {
71 73 if(!this.data.isLogin) {
72 74 this.setData({
... ...
packageA/pages/myGiftDetails/myGiftDetails.js
... ... @@ -57,6 +57,7 @@ Page({
57 57 * 生命周期函数--监听页面显示
58 58 */
59 59 onShow: function () {
  60 + getApp().check_can_share();
60 61 if(app.globalData.userInfo) {
61 62 if(!this.data.isLogin) {
62 63 this.setData({
... ...
packageA/pages/parseHtml/parseHtml.js
... ... @@ -286,7 +286,7 @@ Page({
286 286 * 生命周期函数--监听页面显示
287 287 */
288 288 onShow: function () {
289   -
  289 + getApp().check_can_share();
290 290 },
291 291  
292 292 /**
... ...
packageA/pages/profile/profile.js
... ... @@ -688,6 +688,9 @@ Page({
688 688 },
689 689  
690 690 onShow: function() {
  691 +
  692 + getApp().check_can_share();
  693 +
691 694 var e = this;
692 695 if (this.data.is_zy) return false;
693 696 this.wait_for_store_config();
... ...
packageA/pages/prom_list/prom_list.js
... ... @@ -162,6 +162,9 @@ Page({
162 162  
163 163 //---展示---
164 164 onShow: function() {
  165 +
  166 + getApp().check_can_share();
  167 +
165 168 var ee=this,th=ee,that=ee;
166 169 var gid = this.data.gid,i = getApp().request;
167 170 ee.data.g_buy_num = new Map();
... ...
packageA/pages/quan/quan.js
... ... @@ -48,7 +48,7 @@ Page({
48 48 /**
49 49 * 生命周期函数--监听页面显示
50 50 */
51   - onShow: function () { },
  51 + onShow: function () { getApp().check_can_share(); },
52 52  
53 53 /**
54 54 * 生命周期函数--监听页面隐藏
... ...
packageA/pages/service_share/service_share.js
... ... @@ -97,6 +97,8 @@ Page({
97 97  
98 98 /*** 生命周期函数--监听页面显示***/
99 99 onShow: function () {
  100 + getApp().check_can_share();
  101 +
100 102 var th=this;
101 103 getApp().getConfig2(function(rs){
102 104 //计算等级价相关
... ...
packageA/pages/user/my_service2/appment_main.js
... ... @@ -26,7 +26,7 @@ Page({
26 26 * 生命周期函数--监听页面显示
27 27 */
28 28 onShow: function () {
29   -
  29 + getApp().check_can_share();
30 30 },
31 31  
32 32 /**
... ...
packageB/pages/boxes-details/boxes-details.js
... ... @@ -51,6 +51,8 @@ Page({
51 51 * 生命周期函数--监听页面显示
52 52 */
53 53 onShow: function() {
  54 + getApp().check_can_share();
  55 +
54 56 // console.log('show~~~');
55 57 if (app.globalData.userInfo) {
56 58 if (!this.data.isLogin) {
... ...
packageB/pages/luckactivity/index/index.js
... ... @@ -69,6 +69,8 @@ Page({
69 69 * 生命周期函数--监听页面显示
70 70 */
71 71 onShow: function () {
  72 + getApp().check_can_share();
  73 +
72 74 if(app.globalData.userInfo) {
73 75 if(!this.data.isLogin) {
74 76 this.setData({
... ...
packageB/pages/user/Change_phone/Change_phone.js
... ... @@ -211,7 +211,7 @@ Page({
211 211 * 生命周期函数--监听页面显示
212 212 */
213 213 onShow: function() {
214   -
  214 + getApp().check_can_share();
215 215 },
216 216  
217 217 /**
... ...
packageB/pages/user/binding_info/binding_info.js
... ... @@ -26,7 +26,7 @@ Page({
26 26 * 生命周期函数--监听页面显示
27 27 */
28 28 onShow: function () {
29   -
  29 + getApp().check_can_share();
30 30 },
31 31  
32 32 /**
... ...
packageB/pages/user/buyDetails/buyDetails.js
... ... @@ -40,6 +40,7 @@ Page({
40 40 * 生命周期函数--监听页面显示
41 41 */
42 42 onShow: function () {
  43 + getApp().check_can_share();
43 44 if(app.globalData.userInfo) {
44 45 if(!this.data.isLogin) {
45 46 this.setData({
... ...
packageB/pages/user/choice_guide/choice_guide.js
... ... @@ -19,6 +19,7 @@ Page({
19 19 onLoad: function(t) {},
20 20  
21 21 onShow: function() {
  22 + getApp().check_can_share();
22 23 this.data.ismore=0;this.data.isload=0;
23 24 this.setData({list:null});
24 25 this.get_list();
... ...
packageB/pages/video/index.js
... ... @@ -26,6 +26,8 @@ Page({
26 26 })
27 27 },
28 28 onShow:function(){
  29 + getApp().check_can_share();
  30 +
29 31 var goods_list = this.selectComponent("#goods_list"); //组件的id
30 32 goods_list.init();
31 33 setTimeout(function() {
... ...
packageB/pages/zuhegou/index/index.js
... ... @@ -160,6 +160,8 @@ Page({
160 160 * 生命周期函数--监听页面显示
161 161 */
162 162 onShow: function () {
  163 + getApp().check_can_share();
  164 +
163 165 getApp().is_Single_page(this, function () {
164 166 var th = this,
165 167 that = this,
... ...
packageB/pages/zuhegou/list/list.js
... ... @@ -65,7 +65,10 @@ Page({
65 65 },
66 66  
67 67  
68   - onShow: function(t) {
  68 + onShow: function(t) {
  69 +
  70 + getApp().check_can_share();
  71 +
69 72 this.data.ismore=1;
70 73 this.data.is_timer=1;
71 74 this.data.currentPage=1;
... ...
packageB/pages/zuhegou/preindex/index.js
... ... @@ -159,6 +159,8 @@ Page({
159 159 * 生命周期函数--监听页面显示
160 160 */
161 161 onShow: function () {
  162 + getApp().check_can_share();
  163 +
162 164 getApp().is_Single_page(this, function () {
163 165 var th = this,
164 166 that = this,
... ...
packageC/pages/goods/distributionCategoryList/index.js
... ... @@ -231,6 +231,8 @@ Page({
231 231 })
232 232 },
233 233 onShow: function () {
  234 +
  235 + getApp().check_can_share();
234 236 if (t.globalData.userInfo) {
235 237 let currentData = {
236 238 store_id: t.globalData.setting.stoid,
... ...
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
... ... @@ -31,6 +31,10 @@ Page({
31 31 is_his: 0,
32 32 },
33 33  
  34 + onShow:function () {
  35 + getApp().check_can_share();
  36 + },
  37 +
34 38 onLoad: function (t) {
35 39 this.data.rq_data = t;
36 40  
... ...
packageC/pages/group_list/group_list.js
... ... @@ -44,6 +44,7 @@ Page({
44 44 * 生命周期函数--监听页面显示
45 45 */
46 46 onShow: function () {
  47 + getApp().check_can_share();
47 48 if(app.globalData.userInfo) {
48 49 if(!this.data.isLogin) {
49 50 this.setData({
... ...
packageC/pages/luckyGo/luckyGo_activityList/luckyGo_activityList.js
... ... @@ -35,6 +35,7 @@ Page({
35 35 },
36 36  
37 37 onShow: function() {
  38 + getApp().check_can_share();
38 39 if(app.globalData.userInfo) {
39 40 if(!this.data.isLogin) {
40 41 this.setData({
... ...
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
... ... @@ -34,6 +34,7 @@ Page({
34 34 * 生命周期函数--监听页面显示
35 35 */
36 36 onShow: function () {
  37 + getApp().check_can_share();
37 38 if(app.globalData.userInfo) {
38 39 if(!this.data.isLogin) {
39 40 this.setData({
... ...
packageC/pages/luckyGo/luckyGo_winners/luckyGo_winners.js
... ... @@ -38,6 +38,7 @@ Page({
38 38 * 生命周期函数--监听页面显示
39 39 */
40 40 onShow: function () {
  41 + getApp().check_can_share();
41 42 if(app.globalData.userInfo) {
42 43 if(!this.data.isLogin) {
43 44 this.setData({
... ...
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
... ... @@ -304,7 +304,7 @@ Page({
304 304 * 生命周期函数--监听页面显示
305 305 */
306 306 onShow: function () {
307   -
  307 + getApp().check_can_share();
308 308 },
309 309 go_result(e) {
310 310 let id = e.currentTarget.dataset.id;
... ...
packageD/pages/AI-test-skin/index/aiskin.js
... ... @@ -43,6 +43,7 @@ Page({
43 43 * 生命周期函数--监听页面显示
44 44 */
45 45 onShow: function () {
  46 + getApp().check_can_share();
46 47 this.getHistoryData();
47 48 },
48 49  
... ...
packageD/pages/AI-test-skin/shoot_notice/shoot_notice.js
... ... @@ -36,6 +36,7 @@ Page({
36 36 * 生命周期函数--监听页面显示
37 37 */
38 38 onShow: function () {
  39 + getApp().check_can_share();
39 40 let th = this;
40 41 setTimeout(() => {
41 42 th.setData({
... ...
packageD/pages/AI-test-skin/success_result/success_result.js
... ... @@ -480,7 +480,9 @@ Page({
480 480 /**
481 481 * 生命周期函数--监听页面显示
482 482 */
483   - onShow: function () { },
  483 + onShow: function () {
  484 + getApp().check_can_share();
  485 + },
484 486  
485 487 clickTab(e) {
486 488 let { index, tab_id } = e.currentTarget.dataset;
... ...
pages/activity/pind_list/pind_list.js
... ... @@ -65,6 +65,7 @@ Page({
65 65 },
66 66  
67 67 onShow: function (t) {
  68 + getApp().check_can_share();
68 69 this.data.is_timer = 1;
69 70 this.data.currentPage = 1;
70 71 this.data.ismore = 1;
... ...
pages/activity/seckill_list/seckill_list.js
... ... @@ -73,6 +73,7 @@ Page({
73 73  
74 74  
75 75 onShow: function (t) {
  76 + getApp().check_can_share();
76 77 this.data.is_timer = 1;
77 78 this.data.currentPage = 1;
78 79 var th = this;
... ...
pages/cart/cart2/cart2.js
... ... @@ -4371,7 +4371,6 @@ Page({
4371 4371 sendsm: function (func) {
4372 4372 let th =this;
4373 4373 var template_id = this.data.template_id;
4374   - getApp().globalData.no_clear=1;
4375 4374 // //授权订阅
4376 4375 wx.requestSubscribeMessage({
4377 4376 tmplIds: [template_id],
... ...
pages/cart/cart_wk/cart_wk.js
... ... @@ -70,6 +70,7 @@ Page({
70 70 * 生命周期函数--监听页面显示
71 71 */
72 72 onShow: function () {
  73 + getApp().check_can_share();
73 74 var th = this;
74 75 if (th.data.isclose == 0) {
75 76 wx.navigateTo({
... ...
pages/distribution/distribution.js
... ... @@ -57,7 +57,8 @@ Page({
57 57 /**
58 58 * 生命周期函数--监听页面显示
59 59 */
60   - onShow: function () {
  60 + onShow: function () {
  61 + getApp().check_can_share();
61 62 if (typeof this.getTabBar === 'function' && this.getTabBar()) {
62 63 this.getTabBar().setData({
63 64 active: 2
... ...
pages/giftpack/buygiftpack/giftpackbuy.js
... ... @@ -79,6 +79,7 @@ Page({
79 79 this.getList();
80 80 },
81 81 onShow: function () {
  82 + getApp().check_can_share();
82 83 //--先判断会员状态--
83 84 getApp().is_Single_page(this, function () {
84 85 var user_info = getApp().globalData.userInfo;
... ...
pages/giftpack/giftpacklist/giftpacklist.js
... ... @@ -73,6 +73,7 @@ Page({
73 73 },
74 74  
75 75 onShow: function () {
  76 + getApp().check_can_share();
76 77 getApp().is_Single_page(this,function () {
77 78 //--先判断会员状态--
78 79 var user_info = getApp().globalData.userInfo;
... ...
pages/giftpack/mygiftpack/mygiftpack.js
... ... @@ -78,6 +78,7 @@ Page({
78 78 this.getList();
79 79 },
80 80 onShow: function () {
  81 + getApp().check_can_share();
81 82 //--先判断会员状态--
82 83 getApp().is_Single_page(this, function () {
83 84 var user_info = getApp().globalData.userInfo;
... ...
pages/goods/categoryList/categoryList.js
... ... @@ -185,6 +185,7 @@ Page({
185 185 });
186 186 },
187 187 onShow:function(){
  188 + getApp().check_can_share();
188 189  
189 190 if (typeof this.getTabBar === 'function' && this.getTabBar()) {
190 191 var index=getApp().getPageIndex(this);
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -271,7 +271,11 @@ Page({
271 271 prom_id = t.prom_id; //活动ID
272 272  
273 273 self = this;
274   -
  274 +
  275 +
  276 + console.log("gd onload");
  277 + console.log(t);
  278 +
275 279 //-- 自定义海报 --
276 280 getApp().request.promiseGet("/api/weshop/goods/poster/page", {
277 281 data: {store_id: os.stoid, type: 1, is_use: 1}
... ... @@ -335,8 +339,13 @@ Page({
335 339 this.data.prom_id = prom_id;
336 340 }
337 341 ee.setData({gid: gid});
338   - if (first_leader) {
339   - console.log("log---".first_leader);
  342 +
  343 + console.log("gd onload--2");
  344 + console.log(first_leader);
  345 +
  346 + if(first_leader) {
  347 + console.log("gd onload--3");
  348 + console.log("log---"+first_leader);
340 349 getApp().globalData.first_leader = first_leader;
341 350 //调用接口判断是不是会员
342 351 getApp().request.promiseGet("/api/weshop/shoppingGuide/get/" + os.stoid + "/" + first_leader, {}).then(res => {
... ... @@ -754,7 +763,7 @@ Page({
754 763 //---展示---
755 764 onShow: function () {
756 765  
757   -
  766 + getApp().check_can_share();
758 767  
759 768 var goods_list = null, th = this, that = this;
760 769 var show_prew_img = this.data.show_prew_img
... ... @@ -2395,7 +2404,8 @@ Page({
2395 2404 },
2396 2405  
2397 2406 //--点击分享事件---
2398   - onShareAppMessage: function (t) { getApp().globalData.no_clear=1;
  2407 + onShareAppMessage: function (t) {
  2408 + getApp().globalData.no_clear=1;
2399 2409  
2400 2410 var th = this;
2401 2411 var price = th.data.sele_g.shop_price;
... ... @@ -2454,6 +2464,9 @@ Page({
2454 2464 }
2455 2465 //-- 页面不能刷新 --
2456 2466 this.data.show_prew_img=1;
  2467 +
  2468 + console.log("share..");
  2469 + console.log(ob);
2457 2470 return ob;
2458 2471  
2459 2472 },
... ... @@ -6363,6 +6376,10 @@ Page({
6363 6376 },
6364 6377  
6365 6378 clickShare() {
  6379 + if(!getApp().globalData.user_id){
  6380 + getApp().goto("/pages/togoin/togoin");
  6381 + return false;
  6382 + }
6366 6383 this.setData({
6367 6384 share_hidden: true,
6368 6385 });
... ...
pages/goods/goodsInfo/goodsInfo.wxml
... ... @@ -129,7 +129,7 @@
129 129 </view>
130 130 </view>
131 131  
132   - <!-- <view class="abs white xc-nanber">
  132 + <view class="abs white xc-nanber">
133 133 <text class="fs22">已拼{{prom_act.buy_num}}件</text>
134 134 <view class="flex" style='margin-top:-34rpx'>
135 135 <view class="xc-people-img">
... ... @@ -137,7 +137,7 @@
137 137 </view>
138 138 <view class="t-s fs20 xc-people-val">{{prom_act.ct_num}}人拼</view>
139 139 </view>
140   - </view> -->
  140 + </view>
141 141  
142 142 <!-- 幸运购 -->
143 143 <view class="abs white xc-nanber" wx:if="{{false}}">
... ...
pages/goods/goodsList/goodsList.js
... ... @@ -200,6 +200,10 @@ Page({
200 200 })
201 201 },
202 202  
  203 + onShow:function () {
  204 + getApp().check_can_share();
  205 + },
  206 +
203 207 //设置优惠券的
204 208 set_prom_list:async function(arr){
205 209 var th=this;
... ...
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
... ... @@ -292,6 +292,9 @@ Page({
292 292 },
293 293  
294 294 async onShow() {
  295 +
  296 + getApp().check_can_share();
  297 +
295 298 this.getTabBar().setData({
296 299 cartGoodsNum: getApp().globalData.cartGoodsNum
297 300 })
... ...
pages/team/team_show/team_show.js
... ... @@ -142,6 +142,7 @@ Page({
142 142  
143 143 //显示加载
144 144 onShow:function(){
  145 + getApp().check_can_share();
145 146 var tg_id = this.data.tg_id,th=this;
146 147 this.init(tg_id);
147 148 },
... ...
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
... ... @@ -24,6 +24,7 @@ Page({
24 24 },
25 25  
26 26 async onShow() {
  27 + getApp().check_can_share();
27 28 var th = this;
28 29 await this.init_load();
29 30 //如果是自定义模板
... ...
pages/user/assistance/assistance.js
... ... @@ -49,6 +49,7 @@ Page({
49 49 * 生命周期函数--监听页面显示
50 50 */
51 51 onShow: function () {
  52 + getApp().check_can_share();
52 53 //--先判断会员状态--
53 54 getApp().is_Single_page(this, function () {
54 55 var user_info = getApp().globalData.userInfo;
... ...
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/cardinfo/cardinfo.wxml
... ... @@ -19,16 +19,16 @@
19 19 </view>
20 20  
21 21 <view>
22   - <view bindtap="xufei" class="renew fs28" style="background:{{user_card.CardColor}}">立即续费</view>
  22 + <view bindtap="xufei" class="renew fs28" style="background:{{user_card.CardColor}};color:{{user_card.ButtonColor}}">立即续费</view>
23 23 <!-- 判断是不是过期,显示变更按钮,但是要看是不是多件 -->
24 24 <block wx:if="{{is_guoqi}}">
25   - <view wx:if="{{buy_list.length>0}}" bindtap="show_change" class="renew fs28" style="background:{{user_card.CardColor}}">卡类变更</view>
  25 + <view wx:if="{{buy_list.length>0}}" bindtap="show_change" class="renew fs28" style="background:{{user_card.CardColor}};color:{{user_card.ButtonColor}}">卡类变更</view>
26 26 </block>
27 27 <block wx:else>
28 28 <!-- 要判断是不是最高级的卡 -->
29   - <view wx:if="{{cardid!=big_card.CardId}}" bindtap="show_change" class="renew fs28" style="background:{{user_card.CardColor}}">卡类升级</view>
  29 + <view wx:if="{{cardid!=big_card.CardId}}" bindtap="show_change" class="renew fs28" style="background:{{user_card.CardColor}};color:{{user_card.ButtonColor}}">卡类升级</view>
30 30 </block>
31   - <view bindtap="goto" class="renew fs28" style="background:{{user_card.CardColor}}" data-url="/packageB/pages/user/buyDetails/buyDetails">购卡明细</view>
  31 + <view bindtap="goto" class="renew fs28" style="background:{{user_card.CardColor}};color:{{user_card.ButtonColor}}" data-url="/packageB/pages/user/buyDetails/buyDetails">购卡明细</view>
32 32 </view>
33 33  
34 34  
... ...
pages/user/deposit/prepaid/msg/msg.js
... ... @@ -30,7 +30,7 @@ Page({
30 30 * 生命周期函数--监听页面显示
31 31 */
32 32 onShow: function () {
33   -
  33 + getApp().check_can_share();
34 34 wx.setNavigationBarTitle({
35 35 title: "支付成功",
36 36 })
... ...
pages/user/index/index.js
... ... @@ -84,6 +84,7 @@ Page({
84 84 * 生命周期函数--监听页面显示
85 85 */
86 86 onShow: function() {
  87 + getApp().check_can_share();
87 88 //看一下小程序是不是过期了
88 89 getApp().getConfig2(function(config2){
89 90 if(config2 && config2.is_overdue==1){
... ...
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
... ... @@ -30,6 +30,7 @@ Page({
30 30 * 生命周期函数--监听页面显示
31 31 */
32 32 onShow: function () {
  33 + getApp().check_can_share();
33 34  
34 35 wx.setNavigationBarTitle({
35 36 title: "支付成功",
... ...
pages/user/member/bring/bring.js
... ... @@ -328,6 +328,7 @@ Page({
328 328 * 生命周期函数--监听页面显示
329 329 */
330 330 onShow: function() {
  331 + getApp().check_can_share();
331 332 var th=this;
332 333 this.weixin();
333 334 this.setData({
... ...
pages/user/member/bring/msg/msg.js
... ... @@ -30,6 +30,7 @@ Page({
30 30 * 生命周期函数--监听页面显示
31 31 */
32 32 onShow: function () {
  33 + getApp().check_can_share();
33 34 this.countDown();
34 35 },
35 36 countDown: function () {
... ...
pages/user/member/menber.js
... ... @@ -20,6 +20,7 @@ Page({
20 20 * 生命周期函数--监听页面显示
21 21 */
22 22 onShow: function () {
  23 + getApp().check_can_share();
23 24 var th=this;
24 25 //--先判断会员状态--
25 26 var user_info = getApp().globalData.userInfo;
... ...
pages/user/plus/plus.wxml
... ... @@ -23,7 +23,7 @@
23 23 <view class="fs36">{{item.CardName}}</view>
24 24 <view class="fs24 Membership_remarks">开通会员卡仅{{item.CardFee}}元</view>
25 25 </view>
26   - <view class="Opening fs28 xc-black" data-ind="{{index}}" style="background:{{item.CardColor}}" bindtap="Opening">立即购买
  26 + <view class="Opening fs28 xc-black" data-ind="{{index}}" style="background:{{item.CardColor}};color:{{item.ButtonColor}}" bindtap="Opening">立即购买
27 27 </view>
28 28  
29 29 </view>
... ...
pages/user/user_spsy/user_spsy.js
... ... @@ -41,8 +41,7 @@ Page({
41 41 * 生命周期函数--监听页面显示
42 42 */
43 43 onShow: function () {
44   -
45   -
  44 + getApp().check_can_share();
46 45 },
47 46 async getQrCode(FormId,GradeId) {
48 47 const res = await getApp().request.promiseGet("/api/weshop/users/grade/wares/code/get", {
... ...
pages/user/userinfo/userinfo.js
... ... @@ -740,6 +740,7 @@ Page({
740 740 },
741 741  
742 742 onShow: function() {
  743 + getApp().check_can_share();
743 744 var e = this;
744 745 if (this.data.is_zy) return false;
745 746 this.wait_for_store_config();
... ...
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;
... ...
pages/user/userqy/userqy.wxml
... ... @@ -29,10 +29,10 @@
29 29 <view class='li rel'>
30 30 <image class="vip-img li1 {{currentItemId == index ? 'selected' : ''}}" src="{{item.ImageUrl}}">
31 31 <image class="vip-huangguan abs " src="{{iurl}}/miniapp/images/userqy/user_userqy_huang.png"> </image>
32   - <view class="white emerald abs">{{item.GradeName}}</view>
  32 + <view class="white emerald abs" style="color:#{{item.FontColor}};">{{item.GradeName}}</view>
33 33  
34 34 <!-- 上部分的文字判断 -->
35   - <view class=" abs white discounts four-level-word" wx:if="{{cz_val<item.BuyGradeSum && gradeId!=item.Id}}">
  35 + <view class=" abs white discounts four-level-word" wx:if="{{cz_val<item.BuyGradeSum && gradeId!=item.Id}}" style="color:#{{item.FontColor}};">
36 36 <block wx:if="{{index!=backClass.length-1}}">
37 37 [{{item.GradeName}}]365天累计成长值≥{{backClass[index+1].BuyGradeSum }}可升级[{{ backClass[index+1].GradeName}}]
38 38 </block>
... ... @@ -40,21 +40,21 @@
40 40 [{{item.GradeName}}]365天累计成长值≥{{item.BuyGradeSum }}可保级
41 41 </block>
42 42 </view>
43   - <view class=" abs white discounts four-level-word" wx:if="{{gradeId==item.Id}}">会员将在{{filter.replace_time2(gradeEndDate)}}到期,<text wx:if="{{need_money>0}}">365天累计成长值≥{{need_money}}可升级[{{ backClass[index+1].GradeName}}]</text><text wx:else >[{{item.GradeName}}]365天累计成长值≥{{item.BuyGradeSum}}可保级</text>
  43 + <view class=" abs white discounts four-level-word" wx:if="{{gradeId==item.Id}}" style="color:#{{item.FontColor}};">会员将在{{filter.replace_time2(gradeEndDate)}}到期,<text wx:if="{{need_money>0}}">365天累计成长值≥{{need_money}}可升级[{{ backClass[index+1].GradeName}}]</text><text wx:else >[{{item.GradeName}}]365天累计成长值≥{{item.BuyGradeSum}}可保级</text>
44 44 </view>
45   - <view class=" abs white discounts four-level-word" wx:if="{{gradeId!=item.Id && cz_val>item.BuyGradeSum }}">
  45 + <view class=" abs white discounts four-level-word" wx:if="{{gradeId!=item.Id && cz_val>item.BuyGradeSum }}" style="color:#{{item.FontColor}};">
46 46 [{{item.GradeName}}]365天累计成长值≥{{backClass[index+1].BuyGradeSum }}可升级[{{ backClass[index+1].GradeName}}]
47 47 </view>
48 48  
49 49 <!-- 下部分的文字判断 -->
50   - <view wx:if="{{cz_val>item.BuyGradeSum && gradeId!=item.Id }}" class=" abs white money four-level-word">
  50 + <view wx:if="{{cz_val>item.BuyGradeSum && gradeId!=item.Id }}" class=" abs white money four-level-word" style="color:#{{item.FontColor}};">
51 51 加入会员尽享优惠
52 52 </view>
53 53  
54   - <view wx:if="{{cz_val<item.BuyGradeSum && gradeId!=item.Id }}" class=" abs white money four-level-word">
  54 + <view wx:if="{{cz_val<item.BuyGradeSum && gradeId!=item.Id }}" class=" abs white money four-level-word" style="color:#{{item.FontColor}};">
55 55 距离{{item.GradeName}}还需{{ filter.pInt(item.BuyGradeSum-cz_val)}}成长值
56 56 </view>
57   - <view wx:if="{{gradeId==item.Id}}" class=" abs white money four-level-word new curword">
  57 + <view wx:if="{{gradeId==item.Id}}" class=" abs white money four-level-word new curword" style="color:#{{item.FontColor}};">
58 58 <view class="rel">
59 59 <view class='text'></view>
60 60 <text class='text2 abs'>您当前是此会员</text>
... ...