Commit 23650d5ea6cbcadcb7972f9d26236ab8cf81ae31

Authored by abson
1 parent 0e2bcd18

chaol

components/diy_pingd_buy/diy_pingd_buy.js
@@ -104,7 +104,11 @@ Component({ @@ -104,7 +104,11 @@ Component({
104 var url= "/api/weshop/teamlist/pageteam/2?page=1&pageSize=9"; 104 var url= "/api/weshop/teamlist/pageteam/2?page=1&pageSize=9";
105 getApp().request.promiseGet(url, { 105 getApp().request.promiseGet(url, {
106 data: { 106 data: {
107 - store_id: os.stoid,is_end: 0,is_show: 1, 107 + store_id:
  108 + os.stoid,
  109 + is_end: 0,
  110 + is_show: 1,
  111 + user_id: getApp().globalData.user_id,
108 } 112 }
109 }).then(res => { 113 }).then(res => {
110 if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){ 114 if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0){
@@ -139,7 +143,7 @@ Component({ @@ -139,7 +143,7 @@ Component({
139 //--三个三个一组--- 143 //--三个三个一组---
140 for(var i=0;i< all_array.length;i+=3){ 144 for(var i=0;i< all_array.length;i+=3){
141 arr.push(all_array.slice(i,i+3)); 145 arr.push(all_array.slice(i,i+3));
142 - } 146 + }
143 /*--熏染到前台--*/ 147 /*--熏染到前台--*/
144 th.setData({goods_array:arr}); 148 th.setData({goods_array:arr});
145 var newTime = ut.gettimestamp(); 149 var newTime = ut.gettimestamp();
packageB/pages/zuhegou/index/index.js
@@ -1972,15 +1972,8 @@ Page({ @@ -1972,15 +1972,8 @@ Page({
1972 if (this.data.act.is_bzyh && zhqty_bz.length > 0) { 1972 if (this.data.act.is_bzyh && zhqty_bz.length > 0) {
1973 if (zhqty_bz.length > 1) { 1973 if (zhqty_bz.length > 1) {
1974 let zhqty_bz_arr = []; 1974 let zhqty_bz_arr = [];
1975 - let zhqty_bz_flag = zhqty_bz.every((item1, i) => {  
1976 - var bz_num = be * item1['zhqty']; //超量倍增  
1977 - var num = item1['num'] - item1['zhqty']; //购买数量减去超量  
1978 - if (bz_num > num) {  
1979 - zhqty_bz_arr.push(item1);  
1980 - zhqty_bz.splice(i, 1)  
1981 - }  
1982 - return bz_num <= num;  
1983 - }) 1975 + let zhqty_bz_flag=this.zhqty_bz_fun(zhqty_bz,be,zhqty_bz_arr);
  1976 +
1984 if (zhqty_bz_flag) { 1977 if (zhqty_bz_flag) {
1985 for (let i = 0; i < zhqty_bz.length; i++) { 1978 for (let i = 0; i < zhqty_bz.length; i++) {
1986 var vv = zhqty_bz[i]; 1979 var vv = zhqty_bz[i];
@@ -1995,11 +1988,12 @@ Page({ @@ -1995,11 +1988,12 @@ Page({
1995 } 1988 }
1996 } 1989 }
1997 } else { 1990 } else {
  1991 + zhqty_len=1;
1998 let min_bz_num = Math.min.apply(Math, zhqty_bz_arr.map(function (o) { 1992 let min_bz_num = Math.min.apply(Math, zhqty_bz_arr.map(function (o) {
1999 - return o['num'] 1993 + return o['num'];
2000 })); 1994 }));
2001 let new_arr = zhqty_bz_arr.filter(ii => { 1995 let new_arr = zhqty_bz_arr.filter(ii => {
2002 - return ii['num'] == min_bz_num 1996 + return ii['num'] == min_bz_num;
2003 }) 1997 })
2004 var vv = new_arr[0]; 1998 var vv = new_arr[0];
2005 var bz_num = be * new_arr[0].zhqty; //超量倍增 1999 var bz_num = be * new_arr[0].zhqty; //超量倍增
@@ -2018,16 +2012,20 @@ Page({ @@ -2018,16 +2012,20 @@ Page({
2018 } 2012 }
2019 bz_num_ok = be * vv.zhqty; 2013 bz_num_ok = be * vv.zhqty;
2020 } 2014 }
2021 -  
2022 - for (let j = 0; j < bz_num_ok; j++) {  
2023 - let index = no_in_arr.findIndex(i => {  
2024 - return vv.goods_id === i.goods_id  
2025 - })  
2026 - if (index > -1) {  
2027 - delete_num++  
2028 - no_in_arr.splice(index, 1) 2015 +
  2016 + for(let i = 0; i < zhqty_bz.length; i++){
  2017 + let item1=zhqty_bz[i];
  2018 + for (let j = 0; j < be * item1['zhqty']; j++) {
  2019 + let index = no_in_arr.findIndex(i => {
  2020 + return item1.goods_id === i.goods_id
  2021 + })
  2022 + if (index > -1) {
  2023 + // delete_num++
  2024 + no_in_arr.splice(index, 1)
  2025 + }
2029 } 2026 }
2030 } 2027 }
  2028 + aprice += be * aprice;
2031 } 2029 }
2032 } else { 2030 } else {
2033 var vv = zhqty_bz[0]; 2031 var vv = zhqty_bz[0];
@@ -2258,6 +2256,20 @@ Page({ @@ -2258,6 +2256,20 @@ Page({
2258 } 2256 }
2259 if (func) func(list) 2257 if (func) func(list)
2260 2258
2261 - } 2259 + },
2262 2260
  2261 + zhqty_bz_fun(zhqty_bz,be,zhqty_bz_arr){
  2262 + let zhqty_bz_flag =true;
  2263 + for(let i=0;i<zhqty_bz.length;i++){
  2264 + let item=zhqty_bz[i];
  2265 + let bz_num = be * item['zhqty']; //超量倍增
  2266 + let num = item['num'] - item['zhqty']; //购买数量减去超量
  2267 + if (bz_num > num) {
  2268 + zhqty_bz_flag=false;
  2269 + zhqty_bz_arr.push(item);
  2270 + // zhqty_bz.splice(i,1)
  2271 + }
  2272 + }
  2273 + return zhqty_bz_flag;
  2274 + }
2263 }) 2275 })
2264 \ No newline at end of file 2276 \ No newline at end of file
packageC/pages/presell/cart/cart2.js
@@ -1693,7 +1693,7 @@ Page({ @@ -1693,7 +1693,7 @@ Page({
1693 item = item.config; 1693 item = item.config;
1694 if (item == null) return o_shipping_price; 1694 if (item == null) return o_shipping_price;
1695 //------按重量---------- 1695 //------按重量----------
1696 - if (goods_weight >= 0 && item['money'] && out_of_weight > 0) { 1696 + if (goods_weight >= 0 && item['money'] && out_of_weight >= 0) {
1697 fw_price = parseFloat(item['money']); 1697 fw_price = parseFloat(item['money']);
1698 if (goods_weight > item['first_weight']) { 1698 if (goods_weight > item['first_weight']) {
1699 var fw = goods_weight - item['first_weight']; 1699 var fw = goods_weight - item['first_weight'];
pages/cart/cart/zh_calculate.js
@@ -239,15 +239,8 @@ module.exports = { @@ -239,15 +239,8 @@ module.exports = {
239 if (act.is_bzyh && zhqty_bz.length > 0) { 239 if (act.is_bzyh && zhqty_bz.length > 0) {
240 if (zhqty_bz.length > 1) { 240 if (zhqty_bz.length > 1) {
241 let zhqty_bz_arr = []; 241 let zhqty_bz_arr = [];
242 - let zhqty_bz_flag = zhqty_bz.every((item1, i) => {  
243 - var bz_num = be * item1['zhqty']; //超量倍增  
244 - var num = item1['num'] - item1['zhqty']; //购买数量减去超量  
245 - if (bz_num > num) {  
246 - zhqty_bz_arr.push(item1);  
247 - zhqty_bz.splice(i, 1)  
248 - }  
249 - return bz_num <= num;  
250 - }) 242 + let zhqty_bz_flag=this.zhqty_bz_fun(zhqty_bz,be,zhqty_bz_arr);
  243 +
251 if (zhqty_bz_flag) { 244 if (zhqty_bz_flag) {
252 for (let i = 0; i < zhqty_bz.length; i++) { 245 for (let i = 0; i < zhqty_bz.length; i++) {
253 var vv = zhqty_bz[i]; 246 var vv = zhqty_bz[i];
@@ -262,11 +255,12 @@ module.exports = { @@ -262,11 +255,12 @@ module.exports = {
262 } 255 }
263 } 256 }
264 } else { 257 } else {
  258 + zhqty_len=1;
265 let min_bz_num = Math.min.apply(Math, zhqty_bz_arr.map(function (o) { 259 let min_bz_num = Math.min.apply(Math, zhqty_bz_arr.map(function (o) {
266 - return o['num'] 260 + return o['num'];
267 })); 261 }));
268 let new_arr = zhqty_bz_arr.filter(ii => { 262 let new_arr = zhqty_bz_arr.filter(ii => {
269 - return ii['num'] == min_bz_num 263 + return ii['num'] == min_bz_num;
270 }) 264 })
271 var vv = new_arr[0]; 265 var vv = new_arr[0];
272 var bz_num = be * new_arr[0].zhqty; //超量倍增 266 var bz_num = be * new_arr[0].zhqty; //超量倍增
@@ -285,18 +279,22 @@ module.exports = { @@ -285,18 +279,22 @@ module.exports = {
285 } 279 }
286 bz_num_ok = be * vv.zhqty; 280 bz_num_ok = be * vv.zhqty;
287 } 281 }
288 -  
289 - for (let j = 0; j < bz_num_ok; j++) {  
290 - let index = no_in_arr.findIndex(i => {  
291 - return vv.goods_id === i.goods_id  
292 - })  
293 - if (index > -1) {  
294 - delete_num++  
295 - no_in_arr.splice(index, 1) 282 +
  283 + for(let i = 0; i < zhqty_bz.length; i++){
  284 + let item1=zhqty_bz[i];
  285 + for (let j = 0; j < be * item1['zhqty']; j++) {
  286 + let index = no_in_arr.findIndex(i => {
  287 + return item1.goods_id === i.goods_id
  288 + })
  289 + if (index > -1) {
  290 + // delete_num++
  291 + no_in_arr.splice(index, 1)
  292 + }
296 } 293 }
297 } 294 }
  295 + aprice += be * aprice;
298 } 296 }
299 - } else { 297 + } else {
300 var vv = zhqty_bz[0]; 298 var vv = zhqty_bz[0];
301 var bz_num = be * vv.zhqty; //超量倍增 299 var bz_num = be * vv.zhqty; //超量倍增
302 var num = vv['num'] - vv.zhqty; //购买数量减去超量 300 var num = vv['num'] - vv.zhqty; //购买数量减去超量
@@ -310,14 +308,11 @@ module.exports = { @@ -310,14 +308,11 @@ module.exports = {
310 // be=be-bz_num_ok; 308 // be=be-bz_num_ok;
311 if (num % vv.zhqty == 0) { 309 if (num % vv.zhqty == 0) {
312 be = num / vv.zhqty; 310 be = num / vv.zhqty;
313 - // bz_num_ok = num;  
314 } else { 311 } else {
315 be = Math.floor(num / vv.zhqty) 312 be = Math.floor(num / vv.zhqty)
316 - // bz_num_ok = num - (be * vv.zhqty);  
317 } 313 }
318 bz_num_ok = be * vv.zhqty; 314 bz_num_ok = be * vv.zhqty;
319 } 315 }
320 - // be=vv.num;  
321 for (let j = 0; j < bz_num_ok; j++) { 316 for (let j = 0; j < bz_num_ok; j++) {
322 let index = no_in_arr.findIndex(i => { 317 let index = no_in_arr.findIndex(i => {
323 return vv.goods_id === i.goods_id 318 return vv.goods_id === i.goods_id
@@ -496,7 +491,22 @@ module.exports = { @@ -496,7 +491,22 @@ module.exports = {
496 } 491 }
497 } 492 }
498 return dest; 493 return dest;
499 - } 494 + },
  495 +
  496 + zhqty_bz_fun(zhqty_bz,be,zhqty_bz_arr){
  497 + let zhqty_bz_flag =true;
  498 + for(let i=0;i<zhqty_bz.length;i++){
  499 + let item=zhqty_bz[i];
  500 + let bz_num = be * item['zhqty']; //超量倍增
  501 + let num = item['num'] - item['zhqty']; //购买数量减去超量
  502 + if (bz_num > num) {
  503 + zhqty_bz_flag=false;
  504 + zhqty_bz_arr.push(item);
  505 + // zhqty_bz.splice(i,1)
  506 + }
  507 + }
  508 + return zhqty_bz_flag;
  509 + }
500 510
501 511
502 } 512 }
503 \ No newline at end of file 513 \ No newline at end of file
pages/cart/cart2/cart2.js
@@ -3055,7 +3055,7 @@ Page({ @@ -3055,7 +3055,7 @@ Page({
3055 item = item.config; 3055 item = item.config;
3056 if (item == null) return o_shipping_price; 3056 if (item == null) return o_shipping_price;
3057 //------按重量---------- 3057 //------按重量----------
3058 - if (goods_weight >= 0 && item['money'] && out_of_weight > 0) { 3058 + if (goods_weight >= 0 && item['money'] && out_of_weight >= 0) {
3059 fw_price = parseFloat(item['money']); 3059 fw_price = parseFloat(item['money']);
3060 if (goods_weight > item['first_weight']) { 3060 if (goods_weight > item['first_weight']) {
3061 var fw = goods_weight - item['first_weight']; 3061 var fw = goods_weight - item['first_weight'];
pages/cart/cart2/zh_calculate.js
@@ -152,15 +152,8 @@ module.exports = { @@ -152,15 +152,8 @@ module.exports = {
152 if (act.is_bzyh && zhqty_bz.length > 0) { 152 if (act.is_bzyh && zhqty_bz.length > 0) {
153 if (zhqty_bz.length > 1) { 153 if (zhqty_bz.length > 1) {
154 let zhqty_bz_arr = []; 154 let zhqty_bz_arr = [];
155 - let zhqty_bz_flag = zhqty_bz.every((item1, i) => {  
156 - var bz_num = be * item1['zhqty']; //超量倍增  
157 - var num = item1['num'] - item1['zhqty']; //购买数量减去超量  
158 - if (bz_num > num) {  
159 - zhqty_bz_arr.push(item1);  
160 - zhqty_bz.splice(i, 1)  
161 - }  
162 - return bz_num <= num;  
163 - }) 155 + let zhqty_bz_flag=this.zhqty_bz_fun(zhqty_bz,be,zhqty_bz_arr);
  156 +
164 if (zhqty_bz_flag) { 157 if (zhqty_bz_flag) {
165 for (let i = 0; i < zhqty_bz.length; i++) { 158 for (let i = 0; i < zhqty_bz.length; i++) {
166 var vv = zhqty_bz[i]; 159 var vv = zhqty_bz[i];
@@ -175,11 +168,12 @@ module.exports = { @@ -175,11 +168,12 @@ module.exports = {
175 } 168 }
176 } 169 }
177 } else { 170 } else {
  171 + zhqty_len=1;
178 let min_bz_num = Math.min.apply(Math, zhqty_bz_arr.map(function (o) { 172 let min_bz_num = Math.min.apply(Math, zhqty_bz_arr.map(function (o) {
179 - return o['num'] 173 + return o['num'];
180 })); 174 }));
181 let new_arr = zhqty_bz_arr.filter(ii => { 175 let new_arr = zhqty_bz_arr.filter(ii => {
182 - return ii['num'] == min_bz_num 176 + return ii['num'] == min_bz_num;
183 }) 177 })
184 var vv = new_arr[0]; 178 var vv = new_arr[0];
185 var bz_num = be * new_arr[0].zhqty; //超量倍增 179 var bz_num = be * new_arr[0].zhqty; //超量倍增
@@ -198,18 +192,22 @@ module.exports = { @@ -198,18 +192,22 @@ module.exports = {
198 } 192 }
199 bz_num_ok = be * vv.zhqty; 193 bz_num_ok = be * vv.zhqty;
200 } 194 }
201 -  
202 - for (let j = 0; j < bz_num_ok; j++) {  
203 - let index = no_in_arr.findIndex(i => {  
204 - return vv.goods_id === i.goods_id  
205 - })  
206 - if (index > -1) {  
207 - delete_num++  
208 - no_in_arr.splice(index, 1) 195 +
  196 + for(let i = 0; i < zhqty_bz.length; i++){
  197 + let item1=zhqty_bz[i];
  198 + for (let j = 0; j < be * item1['zhqty']; j++) {
  199 + let index = no_in_arr.findIndex(i => {
  200 + return item1.goods_id === i.goods_id
  201 + })
  202 + if (index > -1) {
  203 + // delete_num++
  204 + no_in_arr.splice(index, 1)
  205 + }
209 } 206 }
210 } 207 }
  208 + aprice += be * aprice;
211 } 209 }
212 - } else { 210 + } else {
213 var vv = zhqty_bz[0]; 211 var vv = zhqty_bz[0];
214 var bz_num = be * vv.zhqty; //超量倍增 212 var bz_num = be * vv.zhqty; //超量倍增
215 var num = vv['num'] - vv.zhqty; //购买数量减去超量 213 var num = vv['num'] - vv.zhqty; //购买数量减去超量
@@ -223,19 +221,16 @@ module.exports = { @@ -223,19 +221,16 @@ module.exports = {
223 // be=be-bz_num_ok; 221 // be=be-bz_num_ok;
224 if (num % vv.zhqty == 0) { 222 if (num % vv.zhqty == 0) {
225 be = num / vv.zhqty; 223 be = num / vv.zhqty;
226 - // bz_num_ok = num;  
227 } else { 224 } else {
228 be = Math.floor(num / vv.zhqty) 225 be = Math.floor(num / vv.zhqty)
229 - // bz_num_ok = num - (be * vv.zhqty);  
230 } 226 }
231 bz_num_ok = be * vv.zhqty; 227 bz_num_ok = be * vv.zhqty;
232 } 228 }
233 - // be=vv.num;  
234 for (let j = 0; j < bz_num_ok; j++) { 229 for (let j = 0; j < bz_num_ok; j++) {
235 let index = no_in_arr.findIndex(i => { 230 let index = no_in_arr.findIndex(i => {
236 return vv.goods_id === i.goods_id 231 return vv.goods_id === i.goods_id
237 }) 232 })
238 - if(index > -1){ 233 + if (index > -1) {
239 delete_num++ 234 delete_num++
240 no_in_arr.splice(index, 1) 235 no_in_arr.splice(index, 1)
241 } 236 }
@@ -515,6 +510,20 @@ module.exports = { @@ -515,6 +510,20 @@ module.exports = {
515 } 510 }
516 511
517 512
  513 + },
  514 + zhqty_bz_fun(zhqty_bz,be,zhqty_bz_arr){
  515 + let zhqty_bz_flag =true;
  516 + for(let i=0;i<zhqty_bz.length;i++){
  517 + let item=zhqty_bz[i];
  518 + let bz_num = be * item['zhqty']; //超量倍增
  519 + let num = item['num'] - item['zhqty']; //购买数量减去超量
  520 + if (bz_num > num) {
  521 + zhqty_bz_flag=false;
  522 + zhqty_bz_arr.push(item);
  523 + // zhqty_bz.splice(i,1)
  524 + }
  525 + }
  526 + return zhqty_bz_flag;
518 } 527 }
519 528
520 529
pages/team/team_show/team_show.js
@@ -94,18 +94,29 @@ Page({ @@ -94,18 +94,29 @@ Page({
94 94
95 }, 95 },
96 onLoad: function(options) { 96 onLoad: function(options) {
97 -  
98 wx.setNavigationBarTitle({ title: "拼团订单",}) 97 wx.setNavigationBarTitle({ title: "拼团订单",})
99 //var postdata=getApp().globalData.to_group; 98 //var postdata=getApp().globalData.to_group;
100 var postdata=options; 99 var postdata=options;
101 - var tg_id = postdata.tg_id, first_leader=options.first_leader; 100 + var tg_id = postdata.tg_id, first_leader=options.first_leader,goods_id=options.goods_id;
102 //如果tg_id是空的话 101 //如果tg_id是空的话
103 - if(tg_id==undefined || tg_id==null || tg_id==""){ 102 + if(tg_id==null ||goods_id==null){
104 var tg_id_str=decodeURIComponent(postdata.scene); 103 var tg_id_str=decodeURIComponent(postdata.scene);
105 tg_id_str=tg_id_str.split("_"); 104 tg_id_str=tg_id_str.split("_");
106 - tg_id=tg_id_str[0];  
107 - if(tg_id_str.length>1){  
108 - first_leader=tg_id_str[1]; 105 + console.log(tg_id_str.length);
  106 + //tg_id_str[0] teamgroup.id tg_id_str[1] user_id tg_id_str[2] goods_id
  107 + switch(tg_id_str.length){
  108 + case 1:
  109 + tg_id=tg_id_str[0];
  110 + break;
  111 + case 2:
  112 + tg_id=tg_id_str[0];
  113 + first_leader=tg_id_str[1];
  114 + break;
  115 + case 3:
  116 + tg_id=tg_id_str[0];
  117 + first_leader=tg_id_str[1];
  118 + goods_id=tg_id_str[2];
  119 + break;
109 } 120 }
110 } 121 }
111 //--判断一下是不是导购-- 122 //--判断一下是不是导购--
@@ -118,14 +129,13 @@ Page({ @@ -118,14 +129,13 @@ Page({
118 } 129 }
119 }) 130 })
120 } 131 }
121 -  
122 - this.setData({tg_id: tg_id }); 132 + this.setData({tg_id: tg_id,goods_id});
123 getApp().globalData.to_group=null; 133 getApp().globalData.to_group=null;
124 134
125 - var th=this;  
126 - getApp().getConfig2(function(e) {  
127 - th.setData({ bconfig: e,});  
128 - th.wait_for_store_config(); //获取默认的门店 135 + var th=this;
  136 + getApp().getConfig2(function(e) {
  137 + th.setData({ bconfig: e,});
  138 + th.wait_for_store_config(); //获取默认的门店
129 }) 139 })
130 140
131 }, 141 },
@@ -358,17 +368,47 @@ Page({ @@ -358,17 +368,47 @@ Page({
358 max_num = 0, 368 max_num = 0,
359 min_price = 0, 369 min_price = 0,
360 th=this, 370 th=this,
361 - that=th; 371 + that=th,
  372 + flag=null;
  373 + await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/2",{
  374 + data:{
  375 + store_id: os.stoid,
  376 + is_end: 0,
  377 + is_show: 1,
  378 + user_id: getApp().globalData.user_id,
  379 + pageSize:1000
  380 + }
  381 + }).then(res=>{
  382 + let pd_list=res.data.data.pageData;
  383 + if(res.data.code==0 && pd_list.length>0){
  384 + flag =pd_list.some(pd=>{
  385 + // if(th.data.goods_id){
  386 + return pd.goods_id==th.data.goods_id;
  387 + // }
  388 + })
  389 + }
  390 + })
  391 + if(!flag){
  392 + wx.showToast({title: "当前会员身份不符,无法参与", icon: 'none', duration: 3000});
  393 + setTimeout(function () {
  394 + ut.wx_back();
  395 + }, 1000)
  396 + return false;
  397 + }
362 398
363 //获取活动从表信息team_id,listno团编号(券号) 399 //获取活动从表信息team_id,listno团编号(券号)
364 await getApp().request.promiseGet("/api/weshop/teamgroup/get/"+os.stoid+"/"+tg_id, { 400 await getApp().request.promiseGet("/api/weshop/teamgroup/get/"+os.stoid+"/"+tg_id, {
365 }).then(res => { 401 }).then(res => {
  402 +
  403 + if(res.data.code !=0 ){
  404 + getApp().showWarning(res.data.msg);
  405 + th.go_back();
  406 + return false;
  407 + }
366 408
367 -  
368 - if(res.data.code==0 && res.data && res.data.data ) { 409 + if(res.data && res.data.data ) {
369 410
370 teamgroup = res.data.data; 411 teamgroup = res.data.data;
371 -  
372 //获取当前时间,并且判断剩余时间 412 //获取当前时间,并且判断剩余时间
373 var nt = ut.gettimestamp(); 413 var nt = ut.gettimestamp();
374 var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss"); 414 var buy_start_date = ut.formatTime(teamgroup.buy_start_date, "yyyy-MM-dd hh:mm:ss");
@@ -388,7 +428,6 @@ Page({ @@ -388,7 +428,6 @@ Page({
388 } 428 }
389 429
390 } 430 }
391 -  
392 }) 431 })
393 432
394 //判断是不是要继续的开关 433 //判断是不是要继续的开关
@@ -433,36 +472,10 @@ Page({ @@ -433,36 +472,10 @@ Page({
433 //获取活动表的信息根据活动team_id 472 //获取活动表的信息根据活动team_id
434 await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + teamgroup.team_id, { 473 await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + teamgroup.team_id, {
435 data: {} 474 data: {}
436 - }).then(async res => {  
437 - var flag=null; 475 + }).then(res => {
438 if (res.data.code == 0) { 476 if (res.data.code == 0) {
439 teamlist = res.data.data; 477 teamlist = res.data.data;
440 goods_id = res.data.data.goods_id; 478 goods_id = res.data.data.goods_id;
441 -  
442 - await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1",{  
443 - data:{  
444 - store_id: os.stoid,  
445 - is_end: 0,  
446 - is_show: 1,  
447 - user_id: getApp().globalData.user_id,  
448 - pageSize:1000  
449 - }  
450 - }).then(res=>{  
451 - let pd_list=res.data.data.pageData;  
452 - if(res.data.code==0 && pd_list.length>0){  
453 - flag =pd_list.some(pd=>{  
454 - return pd.goods_id==teamlist['goods_id']  
455 - })  
456 - }  
457 - })  
458 - if(!flag){  
459 - wx.showToast({title: "当前会员身份不符,无法参与", icon: 'none', duration: 3000});  
460 - // setTimeout(function () {  
461 - ut.wx_back();  
462 - // }, 2000)  
463 - return false;  
464 - }  
465 -  
466 //----------查看阶梯团------------ 479 //----------查看阶梯团------------
467 if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined) { 480 if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined) {
468 var ct_rylist = JSON.parse(teamlist.ct_rylist); 481 var ct_rylist = JSON.parse(teamlist.ct_rylist);
pages/team/team_success/team_success.js
@@ -398,19 +398,26 @@ Page({ @@ -398,19 +398,26 @@ Page({
398 var app = getApp(); 398 var app = getApp();
399 var unit = that.data.screenWidth / 750 * 1.35; 399 var unit = that.data.screenWidth / 750 * 1.35;
400 var scene=th.data.teamgroup.id; 400 var scene=th.data.teamgroup.id;
  401 + var goods_id=th.data.teamlist.goods_id;
401 var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0; 402 var user_id=getApp().globalData.user_id?getApp().globalData.user_id:0;
402 if(user_id>0){ 403 if(user_id>0){
403 scene+="_"+user_id; 404 scene+="_"+user_id;
404 } 405 }
  406 + if(goods_id !==""){
  407 + scene+="_"+goods_id;
  408 + }
405 409
406 //二微码 410 //二微码
407 var path3 = os.url+ "/api/wx/open/app/user/getWeAppEwm/"+ 411 var path3 = os.url+ "/api/wx/open/app/user/getWeAppEwm/"+
408 os.stoid+"?sceneValue="+scene+"&pageValue=pages/team/team_show/team_show"; 412 os.stoid+"?sceneValue="+scene+"&pageValue=pages/team/team_show/team_show";
409 413
  414 + console.log(path3,6000);
  415 +
410 //读取文件成功则OK-- 416 //读取文件成功则OK--
411 wx.getImageInfo({ 417 wx.getImageInfo({
412 src: path3, 418 src: path3,
413 success:function (res) { 419 success:function (res) {
  420 + console.log(res,5000);
414 //回调写法 421 //回调写法
415 th.get_head_temp(th.get_goods_temp,function () { 422 th.get_head_temp(th.get_goods_temp,function () {
416 var vpath = res.path; 423 var vpath = res.path;
@@ -812,7 +819,8 @@ Page({ @@ -812,7 +819,8 @@ Page({
812 onShareAppMessage: function (e) { 819 onShareAppMessage: function (e) {
813 var th=this; 820 var th=this;
814 var scene=this.data.teamgroup.id; 821 var scene=this.data.teamgroup.id;
815 - var url="/pages/team/team_show/team_show?tg_id="+scene; 822 + var goods_id=this.data.teamlist.goods_id;
  823 + var url="/pages/team/team_show/team_show?tg_id="+scene+"&goods_id"+goods_id;
816 //--分享图片-- 824 //--分享图片--
817 var img=th.data.iurl+th.data.teamlist.share_imgurl; 825 var img=th.data.iurl+th.data.teamlist.share_imgurl;
818 //--把会员分享出去-- 826 //--把会员分享出去--
@@ -828,7 +836,6 @@ Page({ @@ -828,7 +836,6 @@ Page({
828 if(th.data.teamlist.share_title){ 836 if(th.data.teamlist.share_title){
829 share_title=th.data.teamlist.share_title; 837 share_title=th.data.teamlist.share_title;
830 } 838 }
831 - console.log(url,3000);  
832 return { 839 return {
833 path:url, 840 path:url,
834 title: share_title, 841 title: share_title,