Commit 5575a681e1a099b28d6e4df52de9e9685c786382

Authored by WXD-SEASON\season
2 parents 58b40ef8 ede6219e

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

packageA/pages/activity_share/activity_share.js
@@ -673,12 +673,12 @@ Page({ @@ -673,12 +673,12 @@ Page({
673 //--定义的保存图片方法,分享团--- 673 //--定义的保存图片方法,分享团---
674 saveImageToPhotosAlbum: function() { 674 saveImageToPhotosAlbum: function() {
675 //--先判断会员状态-- 675 //--先判断会员状态--
676 - var user_info = getApp().globalData.userInfo;  
677 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
678 - //getApp().my_warnning("请先登录",0,this);  
679 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
680 - return false;  
681 - } 676 + // var user_info = getApp().globalData.userInfo;
  677 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  678 + // //getApp().my_warnning("请先登录",0,this);
  679 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  680 + // return false;
  681 + // }
682 //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 682 //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团
683 var type = 0; 683 var type = 0;
684 wx.showLoading({ 684 wx.showLoading({
@@ -752,6 +752,8 @@ Page({ @@ -752,6 +752,8 @@ Page({
752 pg_path=th.data.share_b_img; 752 pg_path=th.data.share_b_img;
753 } 753 }
754 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 754 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
  755 +
  756 + let nick=app.globalData.userInfo?app.globalData.userInfo.nickname:'';
755 757
756 //-- 是自定义海报的情况下 -- 758 //-- 是自定义海报的情况下 --
757 if(th.data.poster && parseInt(th.data.poster.style)==2){ 759 if(th.data.poster && parseInt(th.data.poster.style)==2){
@@ -765,8 +767,8 @@ Page({ @@ -765,8 +767,8 @@ Page({
765 //--昵称--- 767 //--昵称---
766 context.setFontSize(24 * unit) 768 context.setFontSize(24 * unit)
767 context.setFillStyle("black") 769 context.setFillStyle("black")
768 - context.fillText(app.globalData.userInfo.nickname, x1, y1);  
769 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; 770 + context.fillText(nick, x1, y1);
  771 + var width = 24 * nick.length * unit + 4 * unit;
770 //强烈推荐 改许程 772 //强烈推荐 改许程
771 var tj_path = "../../../images/share/q_tj.png"; 773 var tj_path = "../../../images/share/q_tj.png";
772 context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit); 774 context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit);
@@ -779,8 +781,8 @@ Page({ @@ -779,8 +781,8 @@ Page({
779 //--昵称--- 781 //--昵称---
780 context.setFontSize(24 * unit) 782 context.setFontSize(24 * unit)
781 context.setFillStyle("black") 783 context.setFillStyle("black")
782 - context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);  
783 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; 784 + context.fillText(nick, 152 * unit, 76 * unit);
  785 + var width = 24 * nick.length * unit + 2 * unit;
784 //强烈推荐 改许程 786 //强烈推荐 改许程
785 var tj_path = "../../../images/share/q_tj.png"; 787 var tj_path = "../../../images/share/q_tj.png";
786 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); 788 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
@@ -1085,12 +1087,12 @@ Page({ @@ -1085,12 +1087,12 @@ Page({
1085 share_index:function(e){ 1087 share_index:function(e){
1086 1088
1087 //--先判断会员状态-- 1089 //--先判断会员状态--
1088 - var user_info = getApp().globalData.userInfo;  
1089 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
1090 - //getApp().my_warnning("请先登录",0,this);  
1091 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
1092 - return false;  
1093 - } 1090 + // var user_info = getApp().globalData.userInfo;
  1091 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  1092 + // //getApp().my_warnning("请先登录",0,this);
  1093 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  1094 + // return false;
  1095 + // }
1094 1096
1095 var index=e.currentTarget.dataset.index; 1097 var index=e.currentTarget.dataset.index;
1096 var item=this.data.list[index]; 1098 var item=this.data.list[index];
@@ -1104,12 +1106,12 @@ Page({ @@ -1104,12 +1106,12 @@ Page({
1104 //---点击分享商品--- 1106 //---点击分享商品---
1105 share_good:function(e){ 1107 share_good:function(e){
1106 //--先判断会员状态-- 1108 //--先判断会员状态--
1107 - var user_info = getApp().globalData.userInfo;  
1108 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
1109 - //getApp().my_warnning("请先登录",0,this);  
1110 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
1111 - return false;  
1112 - } 1109 + // var user_info = getApp().globalData.userInfo;
  1110 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  1111 + // //getApp().my_warnning("请先登录",0,this);
  1112 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  1113 + // return false;
  1114 + // }
1113 var index=e.currentTarget.dataset.index; 1115 var index=e.currentTarget.dataset.index;
1114 var item=this.data.list[index]; 1116 var item=this.data.list[index];
1115 //如果是搭配购 1117 //如果是搭配购
@@ -1126,12 +1128,12 @@ Page({ @@ -1126,12 +1128,12 @@ Page({
1126 //----活动详情里面的分享--- 1128 //----活动详情里面的分享---
1127 share_good2:function(e){ 1129 share_good2:function(e){
1128 //--先判断会员状态-- 1130 //--先判断会员状态--
1129 - var user_info = getApp().globalData.userInfo;  
1130 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
1131 - //getApp().my_warnning("请先登录",0,this);  
1132 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
1133 - return false;  
1134 - } 1131 + // var user_info = getApp().globalData.userInfo;
  1132 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  1133 + // //getApp().my_warnning("请先登录",0,this);
  1134 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  1135 + // return false;
  1136 + // }
1135 1137
1136 var index=e.currentTarget.dataset.index; 1138 var index=e.currentTarget.dataset.index;
1137 var item=this.data.list2[index]; 1139 var item=this.data.list2[index];
@@ -1144,12 +1146,12 @@ Page({ @@ -1144,12 +1146,12 @@ Page({
1144 share_detail:function(e){ 1146 share_detail:function(e){
1145 1147
1146 //--先判断会员状态-- 1148 //--先判断会员状态--
1147 - var user_info = getApp().globalData.userInfo;  
1148 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
1149 - //getApp().my_warnning("请先登录",0,this);  
1150 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
1151 - return false;  
1152 - } 1149 + // var user_info = getApp().globalData.userInfo;
  1150 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  1151 + // //getApp().my_warnning("请先登录",0,this);
  1152 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  1153 + // return false;
  1154 + // }
1153 1155
1154 var com = this.selectComponent("#share_button"); //组件的id 1156 var com = this.selectComponent("#share_button"); //组件的id
1155 com.set_type(0); 1157 com.set_type(0);
@@ -1171,7 +1173,7 @@ Page({ @@ -1171,7 +1173,7 @@ Page({
1171 return false; 1173 return false;
1172 } 1174 }
1173 //---获取分享图片的本地地址,头像和商品图片---- 1175 //---获取分享图片的本地地址,头像和商品图片----
1174 - var path2 = getApp().globalData.userInfo.head_pic; 1176 + var path2 = getApp().globalData.userInfo?getApp().globalData.userInfo.head_pic:'';
1175 if (path2 == "") { 1177 if (path2 == "") {
1176 ee.data.share_head = "../../../images/share/hui_hear_pic.png"; 1178 ee.data.share_head = "../../../images/share/hui_hear_pic.png";
1177 tt(func); 1179 tt(func);
packageA/pages/goodsInfo/goodsInfo.js
@@ -2096,12 +2096,12 @@ Page({ @@ -2096,12 +2096,12 @@ Page({
2096 //--定义的保存图片方法,分享团--- 2096 //--定义的保存图片方法,分享团---
2097 saveImageToPhotosAlbum: function() { 2097 saveImageToPhotosAlbum: function() {
2098 //--先判断会员状态-- 2098 //--先判断会员状态--
2099 - var user_info = getApp().globalData.userInfo;  
2100 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
2101 - //getApp().my_warnning("请先登录",0,this);  
2102 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
2103 - return false;  
2104 - } 2099 + // var user_info = getApp().globalData.userInfo;
  2100 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  2101 + // //getApp().my_warnning("请先登录",0,this);
  2102 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  2103 + // return false;
  2104 + // }
2105 2105
2106 //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团 2106 //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 4阶梯团
2107 var type = this.data.prom_type; 2107 var type = this.data.prom_type;
packageA/pages/goods_share/goods_share.js
@@ -114,9 +114,9 @@ Page({ @@ -114,9 +114,9 @@ Page({
114 } 114 }
115 }) 115 })
116 116
117 - if(!app.globalData.userInfo) {  
118 - getApp().goto("/packageE/pages/togoin/togoin");  
119 - } 117 + // if(!app.globalData.userInfo) {
  118 + // getApp().goto("/packageE/pages/togoin/togoin");
  119 + // }
120 120
121 121
122 }, 122 },
@@ -368,12 +368,12 @@ Page({ @@ -368,12 +368,12 @@ Page({
368 //--定义的保存图片方法,分享团--- 368 //--定义的保存图片方法,分享团---
369 saveImageToPhotosAlbum: function() { 369 saveImageToPhotosAlbum: function() {
370 //--先判断会员状态-- 370 //--先判断会员状态--
371 - var user_info = getApp().globalData.userInfo;  
372 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
373 - //getApp().my_warnning("请先登录",0,this);  
374 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
375 - return false;  
376 - } 371 + // var user_info = getApp().globalData.userInfo;
  372 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  373 + // //getApp().my_warnning("请先登录",0,this);
  374 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  375 + // return false;
  376 + // }
377 //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 377 //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团
378 var type = 0; 378 var type = 0;
379 wx.showLoading({ 379 wx.showLoading({
@@ -416,7 +416,9 @@ Page({ @@ -416,7 +416,9 @@ Page({
416 pg_path=th.data.share_b_img; 416 pg_path=th.data.share_b_img;
417 } 417 }
418 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 418 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
419 - 419 +
  420 +
  421 + let nick=app.globalData.userInfo?app.globalData.userInfo.nickname:'';
420 //-- 是自定义海报的情况下 -- 422 //-- 是自定义海报的情况下 --
421 if(th.data.poster && parseInt(th.data.poster.style)==2){ 423 if(th.data.poster && parseInt(th.data.poster.style)==2){
422 //在线上分享人的情况下 424 //在线上分享人的情况下
@@ -429,8 +431,8 @@ Page({ @@ -429,8 +431,8 @@ Page({
429 //--昵称--- 431 //--昵称---
430 context.setFontSize(24 * unit) 432 context.setFontSize(24 * unit)
431 context.setFillStyle("black") 433 context.setFillStyle("black")
432 - context.fillText(app.globalData.userInfo.nickname, x1, y1);  
433 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; 434 + context.fillText(nick, x1, y1);
  435 + var width = 24 * nick.length * unit + 4 * unit;
434 //强烈推荐 改许程 436 //强烈推荐 改许程
435 var tj_path = "../../../images/share/q_tj.png"; 437 var tj_path = "../../../images/share/q_tj.png";
436 context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit); 438 context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit);
@@ -443,8 +445,8 @@ Page({ @@ -443,8 +445,8 @@ Page({
443 //--昵称--- 445 //--昵称---
444 context.setFontSize(24 * unit) 446 context.setFontSize(24 * unit)
445 context.setFillStyle("black") 447 context.setFillStyle("black")
446 - context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);  
447 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; 448 + context.fillText(nick, 152 * unit, 76 * unit);
  449 + var width = 24 * nick.length * unit + 2 * unit;
448 //强烈推荐 改许程 450 //强烈推荐 改许程
449 var tj_path = "../../../images/share/q_tj.png"; 451 var tj_path = "../../../images/share/q_tj.png";
450 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); 452 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
@@ -749,12 +751,12 @@ Page({ @@ -749,12 +751,12 @@ Page({
749 //点击分享商品 751 //点击分享商品
750 share_good:function(e){ 752 share_good:function(e){
751 //--先判断会员状态-- 753 //--先判断会员状态--
752 - var user_info = getApp().globalData.userInfo;  
753 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
754 - //getApp().my_warnning("请先登录",0,this);  
755 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
756 - return false;  
757 - } 754 + // var user_info = getApp().globalData.userInfo;
  755 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  756 + // //getApp().my_warnning("请先登录",0,this);
  757 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  758 + // return false;
  759 + // }
758 760
759 var index=e.currentTarget.dataset.index; 761 var index=e.currentTarget.dataset.index;
760 var item=this.data.list[index]; 762 var item=this.data.list[index];
@@ -773,7 +775,7 @@ Page({ @@ -773,7 +775,7 @@ Page({
773 return false; 775 return false;
774 } 776 }
775 //---获取分享图片的本地地址,头像和商品图片---- 777 //---获取分享图片的本地地址,头像和商品图片----
776 - var path2 = getApp().globalData.userInfo.head_pic; 778 + var path2 = getApp().globalData.userInfo?getApp().globalData.userInfo.head_pic:'';
777 if (path2 == "") { 779 if (path2 == "") {
778 ee.data.share_head = "../../../images/share/hui_hear_pic.png"; 780 ee.data.share_head = "../../../images/share/hui_hear_pic.png";
779 tt(func); 781 tt(func);
packageA/pages/live_share/live_share.js
@@ -166,12 +166,12 @@ Page({ @@ -166,12 +166,12 @@ Page({
166 share_index:function(e){ 166 share_index:function(e){
167 167
168 //--先判断会员状态-- 168 //--先判断会员状态--
169 - var user_info = getApp().globalData.userInfo;  
170 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
171 - //getApp().my_warnning("请先登录",0,this);  
172 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
173 - return false;  
174 - } 169 + // var user_info = getApp().globalData.userInfo;
  170 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  171 + // //getApp().my_warnning("请先登录",0,this);
  172 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  173 + // return false;
  174 + // }
175 175
176 var index=e.currentTarget.dataset.index; 176 var index=e.currentTarget.dataset.index;
177 var item=this.data.list[index]; 177 var item=this.data.list[index];
packageA/pages/quan/quan.js
@@ -123,26 +123,7 @@ Page({ @@ -123,26 +123,7 @@ Page({
123 } 123 }
124 }) 124 })
125 }, 125 },
126 -  
127 -  
128 - //---点击分享优惠活动---  
129 - share_index:function(e){  
130 -  
131 - //--先判断会员状态--  
132 - var user_info = getApp().globalData.userInfo;  
133 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
134 - //getApp().my_warnning("请先登录",0,this);  
135 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
136 - return false;  
137 - }  
138 -  
139 - var index=e.currentTarget.dataset.index;  
140 - var item=this.data.list[index];  
141 - this.setData({share_hidden:0,hui_active:item});  
142 -  
143 - var com = this.selectComponent("#share_button"); //组件的id  
144 - com.set_type(1);  
145 - }, 126 +
146 //-- ---更多加载---- 127 //-- ---更多加载----
147 refresh:function(){ 128 refresh:function(){
148 this.requestGoodsList(); 129 this.requestGoodsList();
@@ -152,12 +133,12 @@ Page({ @@ -152,12 +133,12 @@ Page({
152 share_index:function(e){ 133 share_index:function(e){
153 134
154 //--先判断会员状态-- 135 //--先判断会员状态--
155 - var user_info = getApp().globalData.userInfo;  
156 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
157 - //getApp().my_warnning("请先登录",0,this);  
158 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
159 - return false;  
160 - } 136 + // var user_info = getApp().globalData.userInfo;
  137 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  138 + // //getApp().my_warnning("请先登录",0,this);
  139 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  140 + // return false;
  141 + // }
161 142
162 var index=e.currentTarget.dataset.index; 143 var index=e.currentTarget.dataset.index;
163 var item=this.data.list[index]; 144 var item=this.data.list[index];
packageA/pages/service_share/service_share.js
@@ -341,12 +341,12 @@ Page({ @@ -341,12 +341,12 @@ Page({
341 //--定义的保存图片方法,分享团--- 341 //--定义的保存图片方法,分享团---
342 saveImageToPhotosAlbum: function() { 342 saveImageToPhotosAlbum: function() {
343 //--先判断会员状态-- 343 //--先判断会员状态--
344 - var user_info = getApp().globalData.userInfo;  
345 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
346 - //getApp().my_warnning("请先登录",0,this);  
347 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
348 - return false;  
349 - } 344 + // var user_info = getApp().globalData.userInfo;
  345 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  346 + // //getApp().my_warnning("请先登录",0,this);
  347 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  348 + // return false;
  349 + // }
350 //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团 350 //类型 0普通商品 1秒杀商品 2商家和会员团 3阶梯团
351 var type = 0; 351 var type = 0;
352 wx.showLoading({ 352 wx.showLoading({
@@ -391,7 +391,9 @@ Page({ @@ -391,7 +391,9 @@ Page({
391 pg_path=th.data.share_b_img; 391 pg_path=th.data.share_b_img;
392 } 392 }
393 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 393 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
394 - 394 +
  395 +
  396 + let nick=app.globalData.userInfo?app.globalData.userInfo.nickname:'';
395 //-- 是自定义海报的情况下 -- 397 //-- 是自定义海报的情况下 --
396 if(th.data.poster && parseInt(th.data.poster.style)==2){ 398 if(th.data.poster && parseInt(th.data.poster.style)==2){
397 //在线上分享人的情况下 399 //在线上分享人的情况下
@@ -404,8 +406,8 @@ Page({ @@ -404,8 +406,8 @@ Page({
404 //--昵称--- 406 //--昵称---
405 context.setFontSize(24 * unit) 407 context.setFontSize(24 * unit)
406 context.setFillStyle("black") 408 context.setFillStyle("black")
407 - context.fillText(app.globalData.userInfo.nickname, x1, y1);  
408 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; 409 + context.fillText(nick, x1, y1);
  410 + var width = 24 * nick.length * unit + 4 * unit;
409 //强烈推荐 改许程 411 //强烈推荐 改许程
410 var tj_path = "../../../images/share/q_tj.png"; 412 var tj_path = "../../../images/share/q_tj.png";
411 context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit); 413 context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit);
@@ -418,8 +420,8 @@ Page({ @@ -418,8 +420,8 @@ Page({
418 //--昵称--- 420 //--昵称---
419 context.setFontSize(24 * unit) 421 context.setFontSize(24 * unit)
420 context.setFillStyle("black") 422 context.setFillStyle("black")
421 - context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);  
422 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; 423 + context.fillText(nick, 152 * unit, 76 * unit);
  424 + var width = 24 * nick.length * unit + 2 * unit;
423 //强烈推荐 改许程 425 //强烈推荐 改许程
424 var tj_path = "../../../images/share/q_tj.png"; 426 var tj_path = "../../../images/share/q_tj.png";
425 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); 427 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
@@ -728,12 +730,12 @@ Page({ @@ -728,12 +730,12 @@ Page({
728 //点击分享商品 730 //点击分享商品
729 share_good:function(e){ 731 share_good:function(e){
730 //--先判断会员状态-- 732 //--先判断会员状态--
731 - var user_info = getApp().globalData.userInfo;  
732 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
733 - //getApp().my_warnning("请先登录",0,this);  
734 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
735 - return false;  
736 - } 733 + // var user_info = getApp().globalData.userInfo;
  734 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  735 + // //getApp().my_warnning("请先登录",0,this);
  736 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  737 + // return false;
  738 + // }
737 739
738 var index=e.currentTarget.dataset.index; 740 var index=e.currentTarget.dataset.index;
739 var item=this.data.list[index]; 741 var item=this.data.list[index];
@@ -752,7 +754,7 @@ Page({ @@ -752,7 +754,7 @@ Page({
752 return false; 754 return false;
753 } 755 }
754 //---获取分享图片的本地地址,头像和商品图片---- 756 //---获取分享图片的本地地址,头像和商品图片----
755 - var path2 = getApp().globalData.userInfo.head_pic; 757 + var path2 = getApp().globalData.userInfo?getApp().globalData.userInfo.head_pic:'';
756 if (path2 == "") { 758 if (path2 == "") {
757 ee.data.share_head = "../../../images/share/hui_hear_pic.png"; 759 ee.data.share_head = "../../../images/share/hui_hear_pic.png";
758 tt(func); 760 tt(func);
packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -568,16 +568,16 @@ Page({ @@ -568,16 +568,16 @@ Page({
568 568
569 569
570 //--先判断会员登陆状态-- 570 //--先判断会员登陆状态--
571 - var user_info = getApp().globalData.userInfo;  
572 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
573 -  
574 - getApp().is_Single_page(th, function () {  
575 - wx.navigateTo({  
576 - url: '/packageE/pages/togoin/togoin',  
577 - })  
578 - return false;  
579 - })  
580 - } 571 + // var user_info = getApp().globalData.userInfo;
  572 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  573 + //
  574 + // getApp().is_Single_page(th, function () {
  575 + // wx.navigateTo({
  576 + // url: '/packageE/pages/togoin/togoin',
  577 + // })
  578 + // return false;
  579 + // })
  580 + // }
581 }, 581 },
582 582
583 //-- 获取直播的分享人的导购信息 -- 583 //-- 获取直播的分享人的导购信息 --
@@ -5320,14 +5320,17 @@ Page({ @@ -5320,14 +5320,17 @@ Page({
5320 context.setFillStyle('black'); 5320 context.setFillStyle('black');
5321 context.fillText(shopName, 277 * unit, 60 * unit); 5321 context.fillText(shopName, 277 * unit, 60 * unit);
5322 // // 3.推荐来源 5322 // // 3.推荐来源
5323 - let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;  
5324 - // let fromTextLen = context.measureText(fromText);  
5325 - // let x_fromText = (375 - fromTextLen.width)/2;  
5326 - // console.log('222222',fromTextLen,x_fromText);  
5327 - context.setTextAlign('center');  
5328 - context.setFontSize(22 * unit);  
5329 - context.setFillStyle('#96959a');  
5330 - context.fillText(fromText, 277 * unit, 105 * unit); 5323 +
  5324 + if(getApp().globalData.userInfo) {
  5325 + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;
  5326 + // let fromTextLen = context.measureText(fromText);
  5327 + // let x_fromText = (375 - fromTextLen.width)/2;
  5328 + // console.log('222222',fromTextLen,x_fromText);
  5329 + context.setTextAlign('center');
  5330 + context.setFontSize(22 * unit);
  5331 + context.setFillStyle('#96959a');
  5332 + context.fillText(fromText, 277 * unit, 105 * unit);
  5333 + }
5331 // 4.海报背景 5334 // 4.海报背景
5332 // context.beginPath(); 5335 // context.beginPath();
5333 // context.setStrokeStyle('#f2f1f6'); 5336 // context.setStrokeStyle('#f2f1f6');
@@ -5423,12 +5426,12 @@ Page({ @@ -5423,12 +5426,12 @@ Page({
5423 //--定义的保存图片方法,分享团--- 5426 //--定义的保存图片方法,分享团---
5424 saveImageToPhotosAlbum: function () { 5427 saveImageToPhotosAlbum: function () {
5425 //--先判断会员状态-- 5428 //--先判断会员状态--
5426 - var user_info = getApp().globalData.userInfo;  
5427 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
5428 - //getApp().my_warnning("请先登录",0,this);  
5429 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
5430 - return false;  
5431 - } 5429 + // var user_info = getApp().globalData.userInfo;
  5430 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  5431 + // //getApp().my_warnning("请先登录",0,this);
  5432 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  5433 + // return false;
  5434 + // }
5432 5435
5433 if (this.data.share_hidden) { 5436 if (this.data.share_hidden) {
5434 this.setData({ share_hidden: false, }); 5437 this.setData({ share_hidden: false, });
@@ -5497,7 +5500,7 @@ Page({ @@ -5497,7 +5500,7 @@ Page({
5497 }; 5500 };
5498 5501
5499 5502
5500 - 5503 + let nick=app.globalData.userInfo?app.globalData.userInfo.nickname:'';
5501 5504
5502 //-- 是自定义海报的情况下 -- 5505 //-- 是自定义海报的情况下 --
5503 if (th.data.share_b_img ) { 5506 if (th.data.share_b_img ) {
@@ -5515,8 +5518,8 @@ Page({ @@ -5515,8 +5518,8 @@ Page({
5515 //--昵称--- 5518 //--昵称---
5516 context.setFontSize(24 * unit) 5519 context.setFontSize(24 * unit)
5517 context.setFillStyle("black") 5520 context.setFillStyle("black")
5518 - context.fillText(app.globalData.userInfo.nickname, x1, y1);  
5519 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; 5521 + context.fillText(nick, x1, y1);
  5522 + var width = 24 * nick.length * unit + 4 * unit;
5520 //强烈推荐 改许程 5523 //强烈推荐 改许程
5521 var tj_path = "../../../../images/share/q_tj.png"; 5524 var tj_path = "../../../../images/share/q_tj.png";
5522 context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); 5525 context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit);
@@ -5870,9 +5873,9 @@ Page({ @@ -5870,9 +5873,9 @@ Page({
5870 return false; 5873 return false;
5871 } 5874 }
5872 //---获取分享图片的本地地址,头像和商品图片---- 5875 //---获取分享图片的本地地址,头像和商品图片----
5873 - var path2 = getApp().globalData.userInfo.head_pic; 5876 + var path2 =getApp().globalData.userInfo?getApp().globalData.userInfo.head_pic:'';
5874 if (path2 == "") { 5877 if (path2 == "") {
5875 - ee.data.share_head = "../../../images/share/hui_hear_pic.png"; 5878 + ee.data.share_head = "../../../../images/share/hui_hear_pic.png";
5876 tt(func); 5879 tt(func);
5877 } else { 5880 } else {
5878 path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn"); 5881 path2 = path2.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
@@ -6917,10 +6920,10 @@ Page({ @@ -6917,10 +6920,10 @@ Page({
6917 }, 6920 },
6918 6921
6919 clickShare() { 6922 clickShare() {
6920 - if(!getApp().globalData.user_id){  
6921 - getApp().goto("/packageE/pages/togoin/togoin");  
6922 - return false;  
6923 - } 6923 + // if(!getApp().globalData.user_id){
  6924 + // getApp().goto("/packageE/pages/togoin/togoin");
  6925 + // return false;
  6926 + // }
6924 this.setData({ 6927 this.setData({
6925 share_hidden: true, 6928 share_hidden: true,
6926 }); 6929 });
packageC/pages/presell/cardInfo/goodsInfo.js
@@ -1961,7 +1961,7 @@ Page({ @@ -1961,7 +1961,7 @@ Page({
1961 return false; 1961 return false;
1962 } 1962 }
1963 //---获取分享图片的本地地址,头像和商品图片---- 1963 //---获取分享图片的本地地址,头像和商品图片----
1964 - var path2 = getApp().globalData.userInfo.head_pic; 1964 + var path2 = getApp().globalData.userInfo?getApp().globalData.userInfo.head_pic:'';
1965 if (path2 == "") { 1965 if (path2 == "") {
1966 ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; 1966 ee.data.share_head = "../../../../images/share/hui_hear_pic.png";
1967 tt(func); 1967 tt(func);
@@ -3359,10 +3359,10 @@ Page({ @@ -3359,10 +3359,10 @@ Page({
3359 }, 3359 },
3360 3360
3361 clickShare() { 3361 clickShare() {
3362 - if (!getApp().globalData.user_id) {  
3363 - getApp().goto("/packageE/pages/togoin/togoin");  
3364 - return false;  
3365 - } 3362 + // if (!getApp().globalData.user_id) {
  3363 + // getApp().goto("/packageE/pages/togoin/togoin");
  3364 + // return false;
  3365 + // }
3366 this.setData({ share_hidden: true, }); 3366 this.setData({ share_hidden: true, });
3367 }, 3367 },
3368 3368
@@ -3388,12 +3388,12 @@ Page({ @@ -3388,12 +3388,12 @@ Page({
3388 //--定义的保存图片方法,分享团--- 3388 //--定义的保存图片方法,分享团---
3389 saveImageToPhotosAlbum: function () { 3389 saveImageToPhotosAlbum: function () {
3390 //--先判断会员状态-- 3390 //--先判断会员状态--
3391 - var user_info = getApp().globalData.userInfo;  
3392 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
3393 - //getApp().my_warnning("请先登录",0,this);  
3394 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
3395 - return false;  
3396 - } 3391 + // var user_info = getApp().globalData.userInfo;
  3392 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  3393 + // //getApp().my_warnning("请先登录",0,this);
  3394 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  3395 + // return false;
  3396 + // }
3397 3397
3398 if (this.data.share_hidden) { 3398 if (this.data.share_hidden) {
3399 this.setData({ 3399 this.setData({
@@ -3454,6 +3454,8 @@ Page({ @@ -3454,6 +3454,8 @@ Page({
3454 } 3454 }
3455 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 3455 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
3456 3456
  3457 + let nick=app.globalData.userInfo?app.globalData.userInfo.nickname:'';
  3458 +
3457 //-- 是自定义海报的情况下 -- 3459 //-- 是自定义海报的情况下 --
3458 if (th.data.poster && parseInt(th.data.poster.style) == 2) { 3460 if (th.data.poster && parseInt(th.data.poster.style) == 2) {
3459 //在线上分享人的情况下 3461 //在线上分享人的情况下
@@ -3466,8 +3468,8 @@ Page({ @@ -3466,8 +3468,8 @@ Page({
3466 //--昵称--- 3468 //--昵称---
3467 context.setFontSize(24 * unit) 3469 context.setFontSize(24 * unit)
3468 context.setFillStyle("black") 3470 context.setFillStyle("black")
3469 - context.fillText(app.globalData.userInfo.nickname, x1, y1);  
3470 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; 3471 + context.fillText(nick, x1, y1);
  3472 + var width = 24 * nick.length * unit + 4 * unit;
3471 //强烈推荐 改许程 3473 //强烈推荐 改许程
3472 var tj_path = "../../../../images/share/q_tj.png"; 3474 var tj_path = "../../../../images/share/q_tj.png";
3473 context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); 3475 context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit);
@@ -3484,8 +3486,8 @@ Page({ @@ -3484,8 +3486,8 @@ Page({
3484 //--昵称--- 3486 //--昵称---
3485 context.setFontSize(24 * unit) 3487 context.setFontSize(24 * unit)
3486 context.setFillStyle("black") 3488 context.setFillStyle("black")
3487 - context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);  
3488 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; 3489 + context.fillText(nick, 152 * unit, 76 * unit);
  3490 + var width = 24 * nick.length * unit + 2 * unit;
3489 //强烈推荐 改许程 3491 //强烈推荐 改许程
3490 var tj_path = "../../../../images/share/q_tj.png"; 3492 var tj_path = "../../../../images/share/q_tj.png";
3491 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); 3493 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
@@ -3703,12 +3705,12 @@ Page({ @@ -3703,12 +3705,12 @@ Page({
3703 //--定义的保存图片方法,分享团--- 3705 //--定义的保存图片方法,分享团---
3704 saveImageToPhotosAlbumDef: function () { 3706 saveImageToPhotosAlbumDef: function () {
3705 //--先判断会员状态-- 3707 //--先判断会员状态--
3706 - var user_info = getApp().globalData.userInfo;  
3707 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
3708 - //getApp().my_warnning("请先登录",0,this);  
3709 - wx.navigateTo({url: '/packageE/pages/togoin/togoin',})  
3710 - return false;  
3711 - } 3708 + // var user_info = getApp().globalData.userInfo;
  3709 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  3710 + // //getApp().my_warnning("请先登录",0,this);
  3711 + // wx.navigateTo({url: '/packageE/pages/togoin/togoin',})
  3712 + // return false;
  3713 + // }
3712 3714
3713 if (this.data.share_hidden) { 3715 if (this.data.share_hidden) {
3714 this.setData({share_hidden: false,}); 3716 this.setData({share_hidden: false,});
@@ -3861,12 +3863,13 @@ Page({ @@ -3861,12 +3863,13 @@ Page({
3861 context.fillText(shopName, 277 * unit, 60 * unit); 3863 context.fillText(shopName, 277 * unit, 60 * unit);
3862 3864
3863 // 3.推荐来源 3865 // 3.推荐来源
3864 - let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;  
3865 - context.setTextAlign('center');  
3866 - context.setFontSize(22 * unit);  
3867 - context.setFillStyle('#96959a');  
3868 - context.fillText(fromText, 277 * unit, 105 * unit);  
3869 - 3866 + if(getApp().globalData.userInfo) {
  3867 + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;
  3868 + context.setTextAlign('center');
  3869 + context.setFontSize(22 * unit);
  3870 + context.setFillStyle('#96959a');
  3871 + context.fillText(fromText, 277 * unit, 105 * unit);
  3872 + }
3870 // 4.海报背景 3873 // 4.海报背景
3871 context.setFillStyle('white'); 3874 context.setFillStyle('white');
3872 context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit); 3875 context.fillRect(37 * unit, 157 * unit, 480 * unit, 673 * unit);
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -1456,6 +1456,11 @@ Page({ @@ -1456,6 +1456,11 @@ Page({
1456 return false; 1456 return false;
1457 } 1457 }
1458 1458
  1459 + if(!this.data.pre_arr){
  1460 + ut.m_toast('您未达到活动条件,不能购买此活动商品商品');
  1461 + return false;
  1462 + }
  1463 +
1459 var ind = t.currentTarget.dataset.ind; 1464 var ind = t.currentTarget.dataset.ind;
1460 1465
1461 //回调。判断是不是优惠促销 1466 //回调。判断是不是优惠促销
@@ -3223,12 +3228,12 @@ Page({ @@ -3223,12 +3228,12 @@ Page({
3223 //--定义的保存图片方法,分享团--- 3228 //--定义的保存图片方法,分享团---
3224 saveImageToPhotosAlbum: function () { 3229 saveImageToPhotosAlbum: function () {
3225 //--先判断会员状态-- 3230 //--先判断会员状态--
3226 - var user_info = getApp().globalData.userInfo;  
3227 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
3228 - //getApp().my_warnning("请先登录",0,this);  
3229 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
3230 - return false;  
3231 - } 3231 + // var user_info = getApp().globalData.userInfo;
  3232 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  3233 + // //getApp().my_warnning("请先登录",0,this);
  3234 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  3235 + // return false;
  3236 + // }
3232 3237
3233 if (this.data.share_hidden) { 3238 if (this.data.share_hidden) {
3234 this.setData({ 3239 this.setData({
@@ -3289,6 +3294,8 @@ Page({ @@ -3289,6 +3294,8 @@ Page({
3289 } 3294 }
3290 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit); 3295 context.drawImage(pg_path, 0, 0, 554 * unit, 899 * unit);
3291 3296
  3297 + let nick=app.globalData.userInfo?app.globalData.userInfo.nickname:'';
  3298 +
3292 //-- 是自定义海报的情况下 -- 3299 //-- 是自定义海报的情况下 --
3293 if (th.data.poster && parseInt(th.data.poster.style) == 2) { 3300 if (th.data.poster && parseInt(th.data.poster.style) == 2) {
3294 //在线上分享人的情况下 3301 //在线上分享人的情况下
@@ -3301,8 +3308,8 @@ Page({ @@ -3301,8 +3308,8 @@ Page({
3301 //--昵称--- 3308 //--昵称---
3302 context.setFontSize(24 * unit) 3309 context.setFontSize(24 * unit)
3303 context.setFillStyle("black") 3310 context.setFillStyle("black")
3304 - context.fillText(app.globalData.userInfo.nickname, x1, y1);  
3305 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; 3311 + context.fillText(nick, x1, y1);
  3312 + var width = 24 * nick.length * unit + 4 * unit;
3306 //强烈推荐 改许程 3313 //强烈推荐 改许程
3307 var tj_path = "../../../../images/share/q_tj.png"; 3314 var tj_path = "../../../../images/share/q_tj.png";
3308 context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); 3315 context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit);
@@ -3319,8 +3326,8 @@ Page({ @@ -3319,8 +3326,8 @@ Page({
3319 //--昵称--- 3326 //--昵称---
3320 context.setFontSize(24 * unit) 3327 context.setFontSize(24 * unit)
3321 context.setFillStyle("black") 3328 context.setFillStyle("black")
3322 - context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);  
3323 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; 3329 + context.fillText(nick, 152 * unit, 76 * unit);
  3330 + var width = 24 * nick.length * unit + 2 * unit;
3324 //强烈推荐 改许程 3331 //强烈推荐 改许程
3325 var tj_path = "../../../../images/share/q_tj.png"; 3332 var tj_path = "../../../../images/share/q_tj.png";
3326 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); 3333 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
@@ -3538,12 +3545,12 @@ Page({ @@ -3538,12 +3545,12 @@ Page({
3538 //--定义的保存图片方法,分享团--- 3545 //--定义的保存图片方法,分享团---
3539 saveImageToPhotosAlbumDef: function () { 3546 saveImageToPhotosAlbumDef: function () {
3540 //--先判断会员状态-- 3547 //--先判断会员状态--
3541 - var user_info = getApp().globalData.userInfo;  
3542 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
3543 - //getApp().my_warnning("请先登录",0,this);  
3544 - wx.navigateTo({url: '/packageE/pages/togoin/togoin',})  
3545 - return false;  
3546 - } 3548 + // var user_info = getApp().globalData.userInfo;
  3549 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  3550 + // //getApp().my_warnning("请先登录",0,this);
  3551 + // wx.navigateTo({url: '/packageE/pages/togoin/togoin',})
  3552 + // return false;
  3553 + // }
3547 3554
3548 if (this.data.share_hidden) { 3555 if (this.data.share_hidden) {
3549 this.setData({share_hidden: false,}); 3556 this.setData({share_hidden: false,});
@@ -3696,11 +3703,13 @@ Page({ @@ -3696,11 +3703,13 @@ Page({
3696 context.fillText(shopName, 277 * unit, 60 * unit); 3703 context.fillText(shopName, 277 * unit, 60 * unit);
3697 3704
3698 // 3.推荐来源 3705 // 3.推荐来源
3699 - let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;  
3700 - context.setTextAlign('center');  
3701 - context.setFontSize(22 * unit);  
3702 - context.setFillStyle('#96959a');  
3703 - context.fillText(fromText, 277 * unit, 105 * unit); 3706 + if(getApp().globalData.userInfo) {
  3707 + let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;
  3708 + context.setTextAlign('center');
  3709 + context.setFontSize(22 * unit);
  3710 + context.setFillStyle('#96959a');
  3711 + context.fillText(fromText, 277 * unit, 105 * unit);
  3712 + }
3704 3713
3705 // 4.海报背景 3714 // 4.海报背景
3706 context.setFillStyle('white'); 3715 context.setFillStyle('white');
@@ -3858,7 +3867,7 @@ Page({ @@ -3858,7 +3867,7 @@ Page({
3858 return false; 3867 return false;
3859 } 3868 }
3860 //---获取分享图片的本地地址,头像和商品图片---- 3869 //---获取分享图片的本地地址,头像和商品图片----
3861 - var path2 = getApp().globalData.userInfo.head_pic; 3870 + var path2 = getApp().globalData.userInfo?getApp().globalData.userInfo.head_pic:'';
3862 if (path2 == "") { 3871 if (path2 == "") {
3863 ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; 3872 ee.data.share_head = "../../../../images/share/hui_hear_pic.png";
3864 tt(func); 3873 tt(func);
@@ -4666,10 +4675,10 @@ Page({ @@ -4666,10 +4675,10 @@ Page({
4666 }, 4675 },
4667 4676
4668 clickShare() { 4677 clickShare() {
4669 - if (!getApp().globalData.user_id) {  
4670 - getApp().goto("/packageE/pages/togoin/togoin");  
4671 - return false;  
4672 - } 4678 + // if (!getApp().globalData.user_id) {
  4679 + // getApp().goto("/packageE/pages/togoin/togoin");
  4680 + // return false;
  4681 + // }
4673 this.setData({ share_hidden: true, }); 4682 this.setData({ share_hidden: true, });
4674 }, 4683 },
4675 4684
packageC/pages/presell/pregoodsInfo/goodsInfo.js
@@ -2863,12 +2863,12 @@ Page({ @@ -2863,12 +2863,12 @@ Page({
2863 //--定义的保存图片方法,分享团--- 2863 //--定义的保存图片方法,分享团---
2864 saveImageToPhotosAlbum: function () { 2864 saveImageToPhotosAlbum: function () {
2865 //--先判断会员状态-- 2865 //--先判断会员状态--
2866 - var user_info = getApp().globalData.userInfo;  
2867 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
2868 - //getApp().my_warnning("请先登录",0,this);  
2869 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
2870 - return false;  
2871 - } 2866 + // var user_info = getApp().globalData.userInfo;
  2867 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  2868 + // //getApp().my_warnning("请先登录",0,this);
  2869 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  2870 + // return false;
  2871 + // }
2872 2872
2873 if (this.data.share_hidden) { 2873 if (this.data.share_hidden) {
2874 this.setData({ 2874 this.setData({
@@ -4040,10 +4040,10 @@ Page({ @@ -4040,10 +4040,10 @@ Page({
4040 }, 4040 },
4041 4041
4042 clickShare() { 4042 clickShare() {
4043 - if(!getApp().globalData.user_id){  
4044 - getApp().goto("/packageE/pages/togoin/togoin");  
4045 - return false;  
4046 - } 4043 + // if(!getApp().globalData.user_id){
  4044 + // getApp().goto("/packageE/pages/togoin/togoin");
  4045 + // return false;
  4046 + // }
4047 this.setData({ share_hidden: true, }); 4047 this.setData({ share_hidden: true, });
4048 }, 4048 },
4049 4049
packageD/pages/AI-test-skin/success_result/success_result.js
@@ -844,11 +844,12 @@ Page({ @@ -844,11 +844,12 @@ Page({
844 var th = this; 844 var th = this;
845 var rpx = this.data.cWidth / 750 * 4; //基础单位, 845 var rpx = this.data.cWidth / 750 * 4; //基础单位,
846 //--先判断会员状态-- 846 //--先判断会员状态--
847 - var user_info = getApp().globalData.userInfo;  
848 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
849 - wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })  
850 - return false;  
851 - } 847 + // var user_info = getApp().globalData.userInfo;
  848 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  849 + // wx.navigateTo({ url: '/packageE/pages/togoin/togoin', })
  850 + // return false;
  851 + // }
  852 +
852 if (this.data.share_hidden) { 853 if (this.data.share_hidden) {
853 this.setData({ share_hidden: false, }); 854 this.setData({ share_hidden: false, });
854 } 855 }
packageE/pages/togoin/togoin.js
@@ -11,7 +11,8 @@ Page({ @@ -11,7 +11,8 @@ Page({
11 store_logo: '', 11 store_logo: '',
12 first_leader: '', //-- 邀请人 -- 12 first_leader: '', //-- 邀请人 --
13 config2: null, 13 config2: null,
14 - sub: 0 14 + sub: 0,
  15 + is_reg:1
15 }, 16 },
16 onLoad: function (options) { 17 onLoad: function (options) {
17 if (wx.getUserProfile) { 18 if (wx.getUserProfile) {
@@ -21,10 +22,9 @@ Page({ @@ -21,10 +22,9 @@ Page({
21 } 22 }
22 getApp().globalData.isLoad_ad = 1; 23 getApp().globalData.isLoad_ad = 1;
23 24
24 -  
25 - if(options.is_reg){  
26 - this.data.is_reg=1;  
27 - } 25 + // if(options.is_reg){
  26 + // this.data.is_reg=1;
  27 + // }
28 28
29 //-- 看一下隐私政策要不要显示 -- 29 //-- 看一下隐私政策要不要显示 --
30 var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id 30 var privacy_pop = this.selectComponent("#privacy_pop"); //组件的id
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
@@ -1460,10 +1460,10 @@ Page({ @@ -1460,10 +1460,10 @@ Page({
1460 1460
1461 1461
1462 clickShare() { 1462 clickShare() {
1463 - if (!getApp().globalData.user_id) {  
1464 - getApp().goto("/packageE/pages/togoin/togoin");  
1465 - return false;  
1466 - } 1463 + // if (!getApp().globalData.user_id) {
  1464 + // getApp().goto("/packageE/pages/togoin/togoin");
  1465 + // return false;
  1466 + // }
1467 this.setData({ 1467 this.setData({
1468 share_hidden: true, 1468 share_hidden: true,
1469 }); 1469 });
@@ -1485,12 +1485,12 @@ Page({ @@ -1485,12 +1485,12 @@ Page({
1485 //--定义的保存图片方法,分享团--- 1485 //--定义的保存图片方法,分享团---
1486 saveImageToPhotosAlbum: function () { 1486 saveImageToPhotosAlbum: function () {
1487 //--先判断会员状态-- 1487 //--先判断会员状态--
1488 - var user_info = getApp().globalData.userInfo;  
1489 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
1490 - //getApp().my_warnning("请先登录",0,this);  
1491 - wx.navigateTo({url: '/packageE/pages/togoin/togoin',})  
1492 - return false;  
1493 - } 1488 + // var user_info = getApp().globalData.userInfo;
  1489 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  1490 + // //getApp().my_warnning("请先登录",0,this);
  1491 + // wx.navigateTo({url: '/packageE/pages/togoin/togoin',})
  1492 + // return false;
  1493 + // }
1494 1494
1495 if (this.data.share_hidden) { 1495 if (this.data.share_hidden) {
1496 this.setData({share_hidden: false,}); 1496 this.setData({share_hidden: false,});
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js
@@ -1045,10 +1045,10 @@ Page({ @@ -1045,10 +1045,10 @@ Page({
1045 1045
1046 1046
1047 clickShare() { 1047 clickShare() {
1048 - if (!getApp().globalData.user_id) {  
1049 - getApp().goto("/packageE/pages/togoin/togoin");  
1050 - return false;  
1051 - } 1048 + // if (!getApp().globalData.user_id) {
  1049 + // getApp().goto("/packageE/pages/togoin/togoin");
  1050 + // return false;
  1051 + // }
1052 this.setData({ 1052 this.setData({
1053 share_hidden: true, 1053 share_hidden: true,
1054 }); 1054 });
@@ -1070,12 +1070,12 @@ Page({ @@ -1070,12 +1070,12 @@ Page({
1070 //--定义的保存图片方法,分享团--- 1070 //--定义的保存图片方法,分享团---
1071 saveImageToPhotosAlbum: function () { 1071 saveImageToPhotosAlbum: function () {
1072 //--先判断会员状态-- 1072 //--先判断会员状态--
1073 - var user_info = getApp().globalData.userInfo;  
1074 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
1075 - //getApp().my_warnning("请先登录",0,this);  
1076 - wx.navigateTo({url: '/packageE/pages/togoin/togoin',})  
1077 - return false;  
1078 - } 1073 + // var user_info = getApp().globalData.userInfo;
  1074 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  1075 + // //getApp().my_warnning("请先登录",0,this);
  1076 + // wx.navigateTo({url: '/packageE/pages/togoin/togoin',})
  1077 + // return false;
  1078 + // }
1079 1079
1080 if (this.data.share_hidden) { 1080 if (this.data.share_hidden) {
1081 this.setData({share_hidden: false,}); 1081 this.setData({share_hidden: false,});
packageG/pages/team/team_success/team_success.js
@@ -464,7 +464,7 @@ Page({ @@ -464,7 +464,7 @@ Page({
464 464
465 465
466 //先画背景 466 //先画背景
467 - var pg_path = "../../../images/share/share_bg.png"; 467 + var pg_path = "../../../../images/share/share_bg.png";
468 //-- 如果有自定义海报的时候,判断背景的图片 -- 468 //-- 如果有自定义海报的时候,判断背景的图片 --
469 if(th.data.share_b_img){ 469 if(th.data.share_b_img){
470 pg_path=th.data.share_b_img; 470 pg_path=th.data.share_b_img;
@@ -493,7 +493,7 @@ Page({ @@ -493,7 +493,7 @@ Page({
493 context.fillText(app.globalData.userInfo.nickname, x1, y1); 493 context.fillText(app.globalData.userInfo.nickname, x1, y1);
494 var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; 494 var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit;
495 //强烈推荐 改许程 495 //强烈推荐 改许程
496 - var tj_path = "../../../images/share/q_tj.png"; 496 + var tj_path = "../../../../images/share/q_tj.png";
497 context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit); 497 context.drawImage(tj_path, x1 + width, y1-22*unit, 85 * unit, 30 * unit);
498 context.setFontSize(16 * unit) 498 context.setFontSize(16 * unit)
499 context.setLineJoin('round'); //交点设置成圆角 499 context.setLineJoin('round'); //交点设置成圆角
@@ -508,7 +508,7 @@ Page({ @@ -508,7 +508,7 @@ Page({
508 context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit); 508 context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);
509 var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; 509 var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit;
510 //强烈推荐 510 //强烈推荐
511 - var tj_path = "../../../images/share/q_tj.png"; 511 + var tj_path = "../../../../images/share/q_tj.png";
512 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 110 * unit, 30 * unit); 512 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 110 * unit, 30 * unit);
513 context.setFontSize(18 * unit) 513 context.setFontSize(18 * unit)
514 context.setFillStyle("white") 514 context.setFillStyle("white")
@@ -579,7 +579,7 @@ Page({ @@ -579,7 +579,7 @@ Page({
579 context.fillText("好物拼起来,拼拼更划算", 40 * unit, 726 * unit); 579 context.fillText("好物拼起来,拼拼更划算", 40 * unit, 726 * unit);
580 580
581 //绘制成团图片 581 //绘制成团图片
582 - var ct_img ="../../../images/share/ct_num.png"; 582 + var ct_img ="../../../../images/share/ct_num.png";
583 context.drawImage(ct_img, 40 * unit, 740 * unit, 120 * unit, 30 * unit); 583 context.drawImage(ct_img, 40 * unit, 740 * unit, 120 * unit, 30 * unit);
584 var ct_num = th.data.teamlist.ct_num; 584 var ct_num = th.data.teamlist.ct_num;
585 context.setFontSize(14 * unit) 585 context.setFontSize(14 * unit)
@@ -772,7 +772,7 @@ Page({ @@ -772,7 +772,7 @@ Page({
772 //---获取分享图片的本地地址,头像和商品图片---- 772 //---获取分享图片的本地地址,头像和商品图片----
773 var path2 = getApp().globalData.userInfo.head_pic; 773 var path2 = getApp().globalData.userInfo.head_pic;
774 if(path2==""){ 774 if(path2==""){
775 - ee.data.share_head ="../../../images/share/hui_hear_pic.png"; 775 + ee.data.share_head ="../../../../images/share/hui_hear_pic.png";
776 tt(func); 776 tt(func);
777 }else { 777 }else {
778 path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn"); 778 path2=path2.replace("http://thirdwx.qlogo.cn","https://wx.qlogo.cn");
@@ -785,7 +785,7 @@ Page({ @@ -785,7 +785,7 @@ Page({
785 tt(func);; 785 tt(func);;
786 }, 786 },
787 fail: function (res) { 787 fail: function (res) {
788 - ee.data.share_head = "../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的 788 + ee.data.share_head = "../../../../images/share/hui_hear_pic.png"; //分享的图片不能用网络的
789 tt(func); 789 tt(func);
790 } 790 }
791 }); 791 });
@@ -864,10 +864,10 @@ Page({ @@ -864,10 +864,10 @@ Page({
864 }, 864 },
865 865
866 clickShare() { 866 clickShare() {
867 - if(!getApp().globalData.user_id){  
868 - getApp().goto("/packageE/pages/togoin/togoin");  
869 - return false;  
870 - } 867 + // if(!getApp().globalData.user_id){
  868 + // getApp().goto("/packageE/pages/togoin/togoin");
  869 + // return false;
  870 + // }
871 this.setData({ 871 this.setData({
872 share_hidden: true, 872 share_hidden: true,
873 }); 873 });
@@ -957,7 +957,7 @@ Page({ @@ -957,7 +957,7 @@ Page({
957 957
958 958
959 if (type == 1) { // 商家和会员团 959 if (type == 1) { // 商家和会员团
960 - src = '../../../images/share/ct_num.png'; 960 + src = '../../../../images/share/ct_num.png';
961 context.drawImage(src, 54 * unit, 648 * unit, 120 * unit, 30 * unit); 961 context.drawImage(src, 54 * unit, 648 * unit, 120 * unit, 30 * unit);
962 context.setTextAlign('left'); 962 context.setTextAlign('left');
963 963
pages/activity/seckill_list/seckill_list.js
@@ -17,7 +17,9 @@ Page({ @@ -17,7 +17,9 @@ Page({
17 isshow: 0, 17 isshow: 0,
18 ad_data: null, 18 ad_data: null,
19 max_sw_height: 200, 19 max_sw_height: 200,
20 - is_retail_price:0 20 + is_retail_price:0,
  21 +
  22 + timer_js:[]
21 }, 23 },
22 24
23 //------初始化加载---------- 25 //------初始化加载----------
@@ -101,6 +103,7 @@ Page({ @@ -101,6 +103,7 @@ Page({
101 onHide: function () { 103 onHide: function () {
102 //--清理定时器-- 104 //--清理定时器--
103 clearInterval(this.data.timer); 105 clearInterval(this.data.timer);
  106 + this.data.is_timer=0;
104 this.setData({ 107 this.setData({
105 isshow: 0 108 isshow: 0
106 }); 109 });
@@ -110,9 +113,10 @@ Page({ @@ -110,9 +113,10 @@ Page({
110 return param < 10 ? '0' + param : param; 113 return param < 10 ? '0' + param : param;
111 }, 114 },
112 115
113 - //----倒计时函数----- 116 + //----倒计时函数,优化定时器只显示在可视范围内的-----
114 countDown() { 117 countDown() {
115 if (!this.data.is_timer) return false; 118 if (!this.data.is_timer) return false;
  119 +
116 var th = this; 120 var th = this;
117 // 获取当前时间,同时得到活动结束时间数组 121 // 获取当前时间,同时得到活动结束时间数组
118 let newTime = ut.gettimestamp(); 122 let newTime = ut.gettimestamp();
@@ -120,45 +124,82 @@ Page({ @@ -120,45 +124,82 @@ Page({
120 if (endTimeList == null) return null 124 if (endTimeList == null) return null
121 // 对结束时间进行处理渲染到页面 125 // 对结束时间进行处理渲染到页面
122 for (var i = 0; i < endTimeList.length; i++) { 126 for (var i = 0; i < endTimeList.length; i++) {
  127 +
  128 + if (!this.data.is_timer) break;
  129 +
123 var o = endTimeList[i]; 130 var o = endTimeList[i];
124 if(!o) continue; 131 if(!o) continue;
125 var endTime = o.end_time; 132 var endTime = o.end_time;
126 if (th.data.type == 0) endTime = o.start_time; 133 if (th.data.type == 0) endTime = o.start_time;
127 - let obj = null;  
128 - // 如果活动未结束,对时间进行处理  
129 - if (endTime - newTime > 0) {  
130 - let time = (endTime - newTime);  
131 - // 获取天、时、分、秒  
132 - let day = parseInt(time / (60 * 60 * 24));  
133 - let hou = parseInt(time % (60 * 60 * 24) / 3600);  
134 - let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);  
135 - let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);  
136 - obj = {  
137 - day: this.timeFormat(day),  
138 - hou: this.timeFormat(hou),  
139 - min: this.timeFormat(min),  
140 - sec: this.timeFormat(sec),  
141 - hide: 1  
142 - }  
143 - } else {  
144 - //活动已结束,全部设置为'00'  
145 - obj = {  
146 - day: '00',  
147 - hou: '00',  
148 - min: '00',  
149 - sec: '00' 134 +
  135 + // 创建查询对象
  136 + let query = wx.createSelectorQuery();
  137 + // 获取目标元素,并获取目标元素的信息
  138 + query.select("#kill-item"+i).boundingClientRect();
  139 + // 获取视口,并获取视口信息
  140 + query.selectViewport().boundingClientRect();
  141 + //-- 执行查询,元素要在显示中的才显示定时器 --
  142 + query.exec(([target, view]) => {
  143 +
  144 + if (!th.data.is_timer) return;
  145 + if (!target) return;
  146 + if (!target.id) return;
  147 +
  148 + let idx= target.id.replace('kill-item','');
  149 + // 条件1:当目标顶部距离视口顶部距离小于视口的高度时
  150 + // 条件2:当目标底部距离视口顶部距离大于0时
  151 + // 当以上两个条件同时成立时,目标元素在视口中
  152 + if (target.top < view.height && target.bottom > 0) {
  153 + let obj = null;
  154 + // 如果活动未结束,对时间进行处理
  155 + if (endTime - newTime > 0) {
  156 + let time = (endTime - newTime);
  157 + // 获取天、时、分、秒
  158 + let day = parseInt(time / (60 * 60 * 24));
  159 + let hou = parseInt(time % (60 * 60 * 24) / 3600);
  160 + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  161 + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  162 + obj = {
  163 + day: this.timeFormat(day),
  164 + hou: this.timeFormat(hou),
  165 + min: this.timeFormat(min),
  166 + sec: this.timeFormat(sec),
  167 + hide: 1
  168 + }
  169 + } else {
  170 + //活动已结束,全部设置为'00'
  171 + obj = {
  172 + day: '00',
  173 + hou: '00',
  174 + min: '00',
  175 + sec: '00'
  176 + }
  177 + }
  178 + var txt = "timer_js[" + idx + "]";
  179 +
  180 + if (!th.data.is_timer) return;
  181 +
  182 + th.setData({
  183 + [txt]: obj
  184 + });
  185 + } else {
  186 + console.log("隐藏中");
150 } 187 }
151 - }  
152 - var txt = "goodlist[" + i + "].djs";  
153 - th.setData({  
154 - [txt]: obj  
155 }); 188 });
  189 +
  190 +
  191 +
156 } 192 }
157 }, 193 },
158 194
159 async requestSalelist() { 195 async requestSalelist() {
160 //--没有更多就不调用-- 196 //--没有更多就不调用--
161 if (!this.data.ismore) return false; 197 if (!this.data.ismore) return false;
  198 + if(this.data.lding) return false;
  199 + this.data.lding=1;
  200 + this.data.is_timer=0; //暂停一下定时器
  201 +
  202 +
162 var e = this, 203 var e = this,
163 th = e, 204 th = e,
164 i = "/api/ms/flash_sale/spikepage?page=" + e.data.currentPage; 205 i = "/api/ms/flash_sale/spikepage?page=" + e.data.currentPage;
@@ -173,7 +214,8 @@ Page({ @@ -173,7 +214,8 @@ Page({
173 timetype: th.data.type, 214 timetype: th.data.type,
174 is_end: 0, 215 is_end: 0,
175 is_show: 1, 216 is_show: 1,
176 - user_id: user_id 217 + user_id: user_id,
  218 + isRedis:1
177 }; 219 };
178 220
179 wx.showLoading(); 221 wx.showLoading();
@@ -190,6 +232,7 @@ Page({ @@ -190,6 +232,7 @@ Page({
190 wx.hideLoading(); 232 wx.hideLoading();
191 233
192 th.data.ismore = 0; 234 th.data.ismore = 0;
  235 + this.data.is_timer=1;
193 if (e.data.currentPage == 1 && this.data.type == 1) { 236 if (e.data.currentPage == 1 && this.data.type == 1) {
194 237
195 //-- 弄到即将开始 -- 238 //-- 弄到即将开始 --
@@ -223,6 +266,8 @@ Page({ @@ -223,6 +266,8 @@ Page({
223 getApp().showWarning("没有更多数据"); 266 getApp().showWarning("没有更多数据");
224 } 267 }
225 268
  269 + this.data.lding=0;
  270 + this.data.is_timer=1;
226 return false; 271 return false;
227 } 272 }
228 273
@@ -239,14 +284,22 @@ Page({ @@ -239,14 +284,22 @@ Page({
239 plist[i].price_n = price 284 plist[i].price_n = price
240 } 285 }
241 var prom_id = plist[i].id; 286 var prom_id = plist[i].id;
242 - await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +  
243 - os.stoid + "/1/" + prom_id, {}  
244 - ).then(res => {  
245 - if (res.data.code == 0) {  
246 - plist[i].status = 1;  
247 - if (res.data.data <= 0) plist[i].status = 3;  
248 - }  
249 - }) 287 +
  288 + // await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" +
  289 + // os.stoid + "/1/" + prom_id, {}
  290 + // ).then(res => {
  291 + // if (res.data.code == 0) {
  292 + // plist[i].status = 1;
  293 + // if (res.data.data <= 0) plist[i].status = 3;
  294 + // }
  295 + // })
  296 +
  297 + plist[i].status = 1;
  298 + if (plist[i].actLen <= 0) {
  299 + plist[i].status = 3;
  300 + }
  301 +
  302 +
250 alllist.push(plist[i]); 303 alllist.push(plist[i]);
251 } 304 }
252 e.data.currentPage++; 305 e.data.currentPage++;
@@ -258,7 +311,10 @@ Page({ @@ -258,7 +311,10 @@ Page({
258 311
259 setTimeout(()=>{ 312 setTimeout(()=>{
260 wx.hideLoading(); 313 wx.hideLoading();
261 - },500) 314 + },200)
  315 +
  316 + this.data.lding=0;
  317 + this.data.is_timer=1;
262 318
263 319
264 320
pages/activity/seckill_list/seckill_list.wxml
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 32
33 33
34 <view class="kill-list abs seckill_list"> 34 <view class="kill-list abs seckill_list">
35 - <view class="kill-item" wx:for="{{goodlist}}" wx:if="{{item.djs.hide}}" > 35 + <view id="kill-item{{index}}" class="kill-item" wx:for="{{goodlist}}" >
36 <!-- <navigator class="kill-pic rel" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.id}}&prom_type=1"> --> 36 <!-- <navigator class="kill-pic rel" url="/pages/goods/goodsInfo/goodsInfo?goods_id={{item.goods_id}}&prom_id={{item.id}}&prom_type=1"> -->
37 <navigator url="{{item.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id )}}" class="kill-pic rel"> 37 <navigator url="{{item.goods_type == 0 ? ('/pages/goods/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id):('/packageA/pages/goodsInfo/goodsInfo?goods_id=' + item.goods_id + '&prom_type=1&prom_id=' + item.id )}}" class="kill-pic rel">
38 <image class="abs xc-miaosha" src="{{url}}/miniapp/images/zms.png"></image> 38 <image class="abs xc-miaosha" src="{{url}}/miniapp/images/zms.png"></image>
@@ -59,12 +59,12 @@ @@ -59,12 +59,12 @@
59 59
60 <view class="goods-num"> 60 <view class="goods-num">
61 <view> 61 <view>
62 - <view class="{{type==1?'xc-wc':'blue_c'}}"> 62 + <view wx:if="{{timer_js[index].hide}}" class="{{type==1?'xc-wc':'blue_c'}}">
63 <text>剩余:</text> 63 <text>剩余:</text>
64 - <text class='tui-conutdown-box'> {{item.djs.day}}</text>天  
65 - <text class='tui-conutdown-box'>{{item.djs.hou}}</text>时  
66 - <text class='tui-conutdown-box'>{{item.djs.min}}</text>分  
67 - <text class='tui-conutdown-box tui-countdown-bg'>{{item.djs.sec}}</text>秒 64 + <text class='tui-conutdown-box'> {{timer_js[index].day}}</text>天
  65 + <text class='tui-conutdown-box'>{{timer_js[index].hou}}</text>时
  66 + <text class='tui-conutdown-box'>{{timer_js[index].min}}</text>分
  67 + <text class='tui-conutdown-box tui-countdown-bg'>{{timer_js[index].sec}}</text>秒
68 </view> 68 </view>
69 <view class="fs40 flex xc-buttom-money {{type==1?'xc-wc':'blue_c'}}" > 69 <view class="fs40 flex xc-buttom-money {{type==1?'xc-wc':'blue_c'}}" >
70 <view class="fs28" style="line-height: 16px;">¥</view> 70 <view class="fs28" style="line-height: 16px;">¥</view>
pages/giftpack/giftpacklist/giftpacklist.js
@@ -1138,10 +1138,10 @@ Page({ @@ -1138,10 +1138,10 @@ Page({
1138 1138
1139 1139
1140 clickShare() { 1140 clickShare() {
1141 - if (!getApp().globalData.user_id) {  
1142 - getApp().goto("/packageE/pages/togoin/togoin");  
1143 - return false;  
1144 - } 1141 + // if (!getApp().globalData.user_id) {
  1142 + // getApp().goto("/packageE/pages/togoin/togoin");
  1143 + // return false;
  1144 + // }
1145 this.setData({ 1145 this.setData({
1146 share_hidden: true, 1146 share_hidden: true,
1147 }); 1147 });
@@ -1163,12 +1163,12 @@ Page({ @@ -1163,12 +1163,12 @@ Page({
1163 //--定义的保存图片方法,分享团--- 1163 //--定义的保存图片方法,分享团---
1164 saveImageToPhotosAlbum: function () { 1164 saveImageToPhotosAlbum: function () {
1165 //--先判断会员状态-- 1165 //--先判断会员状态--
1166 - var user_info = getApp().globalData.userInfo;  
1167 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
1168 - //getApp().my_warnning("请先登录",0,this);  
1169 - wx.navigateTo({url: '/packageE/pages/togoin/togoin',})  
1170 - return false;  
1171 - } 1166 + // var user_info = getApp().globalData.userInfo;
  1167 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  1168 + // //getApp().my_warnning("请先登录",0,this);
  1169 + // wx.navigateTo({url: '/packageE/pages/togoin/togoin',})
  1170 + // return false;
  1171 + // }
1172 1172
1173 if (this.data.share_hidden) { 1173 if (this.data.share_hidden) {
1174 this.setData({share_hidden: false,}); 1174 this.setData({share_hidden: false,});
pages/goods/goodsInfo/goodsInfo.js
@@ -6355,12 +6355,15 @@ Page({ @@ -6355,12 +6355,15 @@ Page({
6355 context.setFillStyle('black'); 6355 context.setFillStyle('black');
6356 context.fillText(shopName, 277 * unit, 60 * unit); 6356 context.fillText(shopName, 277 * unit, 60 * unit);
6357 6357
6358 - // 3.推荐来源  
6359 - let fromText = `来自${getApp().globalData.userInfo.nickname}的推荐`;  
6360 - context.setTextAlign('center');  
6361 - context.setFontSize(22 * unit);  
6362 - context.setFillStyle('#96959a');  
6363 - context.fillText(fromText, 277 * unit, 105 * unit); 6358 + let nick=getApp().globalData.userInfo?getApp().globalData.userInfo.nickname:'';
  6359 + if(nick) {
  6360 + // 3.推荐来源
  6361 + let fromText = `来自${nick}的推荐`;
  6362 + context.setTextAlign('center');
  6363 + context.setFontSize(22 * unit);
  6364 + context.setFillStyle('#96959a');
  6365 + context.fillText(fromText, 277 * unit, 105 * unit);
  6366 + }
6364 6367
6365 // 4.海报背景 6368 // 4.海报背景
6366 context.setFillStyle('white'); 6369 context.setFillStyle('white');
@@ -6525,14 +6528,14 @@ Page({ @@ -6525,14 +6528,14 @@ Page({
6525 //--定义的保存图片方法,分享团--- 6528 //--定义的保存图片方法,分享团---
6526 saveImageToPhotosAlbum: function () { 6529 saveImageToPhotosAlbum: function () {
6527 //--先判断会员状态-- 6530 //--先判断会员状态--
6528 - var user_info = getApp().globalData.userInfo;  
6529 - if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {  
6530 - //getApp().my_warnning("请先登录",0,this);  
6531 - wx.navigateTo({  
6532 - url: '/packageE/pages/togoin/togoin',  
6533 - })  
6534 - return false;  
6535 - } 6531 + // var user_info = getApp().globalData.userInfo;
  6532 + // if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
  6533 + // //getApp().my_warnning("请先登录",0,this);
  6534 + // wx.navigateTo({
  6535 + // url: '/packageE/pages/togoin/togoin',
  6536 + // })
  6537 + // return false;
  6538 + // }
6536 6539
6537 if (this.data.share_hidden) { 6540 if (this.data.share_hidden) {
6538 this.setData({ 6541 this.setData({
@@ -6619,6 +6622,7 @@ Page({ @@ -6619,6 +6622,7 @@ Page({
6619 6622
6620 6623
6621 var act_time = ''; 6624 var act_time = '';
  6625 + let nick=app.globalData.userInfo?app.globalData.userInfo.nickname:'';
6622 6626
6623 //-- 是自定义海报的情况下 -- 6627 //-- 是自定义海报的情况下 --
6624 if (th.data.share_b_img || (type != 0 && type != 1 && type != 2 && type != 3)) { 6628 if (th.data.share_b_img || (type != 0 && type != 1 && type != 2 && type != 3)) {
@@ -6631,11 +6635,13 @@ Page({ @@ -6631,11 +6635,13 @@ Page({
6631 var y = parseFloat(th.data.poster.head_y) * 2; 6635 var y = parseFloat(th.data.poster.head_y) * 2;
6632 var x1 = (x + 90) * unit; 6636 var x1 = (x + 90) * unit;
6633 var y1 = (y + 50) * unit; 6637 var y1 = (y + 50) * unit;
  6638 +
  6639 +
6634 //--昵称--- 6640 //--昵称---
6635 context.setFontSize(24 * unit) 6641 context.setFontSize(24 * unit)
6636 context.setFillStyle("black") 6642 context.setFillStyle("black")
6637 - context.fillText(app.globalData.userInfo.nickname, x1, y1);  
6638 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 4 * unit; 6643 + context.fillText(nick, x1, y1);
  6644 + var width = 24 * nick.length * unit + 4 * unit;
6639 //强烈推荐 改许程 6645 //强烈推荐 改许程
6640 var tj_path = "../../../images/share/q_tj.png"; 6646 var tj_path = "../../../images/share/q_tj.png";
6641 context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit); 6647 context.drawImage(tj_path, x1 + width, y1 - 22 * unit, 85 * unit, 30 * unit);
@@ -6652,8 +6658,8 @@ Page({ @@ -6652,8 +6658,8 @@ Page({
6652 //--昵称--- 6658 //--昵称---
6653 context.setFontSize(24 * unit); 6659 context.setFontSize(24 * unit);
6654 context.setFillStyle("black"); 6660 context.setFillStyle("black");
6655 - context.fillText(app.globalData.userInfo.nickname, 152 * unit, 76 * unit);  
6656 - var width = 24 * app.globalData.userInfo.nickname.length * unit + 2 * unit; 6661 + context.fillText(nick, 152 * unit, 76 * unit);
  6662 + var width = 24 * nick.length * unit + 2 * unit;
6657 //强烈推荐 改许程 6663 //强烈推荐 改许程
6658 var tj_path = "../../../images/share/q_tj.png"; 6664 var tj_path = "../../../images/share/q_tj.png";
6659 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit); 6665 context.drawImage(tj_path, 152 * unit + width, 54 * unit, 85 * unit, 30 * unit);
@@ -7282,7 +7288,7 @@ Page({ @@ -7282,7 +7288,7 @@ Page({
7282 return false; 7288 return false;
7283 } 7289 }
7284 //---获取分享图片的本地地址,头像和商品图片---- 7290 //---获取分享图片的本地地址,头像和商品图片----
7285 - var path2 = getApp().globalData.userInfo.head_pic; 7291 + var path2 = getApp().globalData.userInfo?getApp().globalData.userInfo.head_pic:'';
7286 if (path2 == "") { 7292 if (path2 == "") {
7287 ee.data.share_head = "../../../images/share/hui_hear_pic.png"; 7293 ee.data.share_head = "../../../images/share/hui_hear_pic.png";
7288 tt(func); 7294 tt(func);
@@ -8686,10 +8692,10 @@ Page({ @@ -8686,10 +8692,10 @@ Page({
8686 }, 8692 },
8687 8693
8688 clickShare() { 8694 clickShare() {
8689 - if (!getApp().globalData.user_id) {  
8690 - getApp().goto("/packageE/pages/togoin/togoin");  
8691 - return false;  
8692 - } 8695 + // if (!getApp().globalData.user_id) {
  8696 + // getApp().goto("/packageE/pages/togoin/togoin");
  8697 + // return false;
  8698 + // }
8693 this.setData({ 8699 this.setData({
8694 share_hidden: true, 8700 share_hidden: true,
8695 }); 8701 });
pages/index/index/index.js
@@ -1534,11 +1534,11 @@ Page({ @@ -1534,11 +1534,11 @@ Page({
1534 }, 1534 },
1535 1535
1536 go_pre: function (e) { 1536 go_pre: function (e) {
1537 - var userInfo = getApp().globalData.userInfo;  
1538 - if (!userInfo) {  
1539 - getApp().goto("/packageE/pages/togoin/togoin");  
1540 - return false;  
1541 - } 1537 + // var userInfo = getApp().globalData.userInfo;
  1538 + // if (!userInfo) {
  1539 + // getApp().goto("/packageE/pages/togoin/togoin");
  1540 + // return false;
  1541 + // }
1542 var url = e.currentTarget.dataset.url; 1542 var url = e.currentTarget.dataset.url;
1543 getApp().goto(url); 1543 getApp().goto(url);
1544 }, 1544 },