Commit 564c5e00f9538c4cc15f3e46f4004dd5d858f214

Authored by abson
1 parent 0a6617c4

拼单分享

pages/goods/goodsInfo/goodsInfo.js
@@ -3439,7 +3439,7 @@ Page({ @@ -3439,7 +3439,7 @@ Page({
3439 return false 3439 return false
3440 } 3440 }
3441 3441
3442 - await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1",{ 3442 + await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/2",{
3443 data:{ 3443 data:{
3444 store_id: os.stoid, 3444 store_id: os.stoid,
3445 is_end: 0, 3445 is_end: 0,
pages/team/team_show/team_show.js
@@ -433,11 +433,36 @@ Page({ @@ -433,11 +433,36 @@ Page({
433 //获取活动表的信息根据活动team_id 433 //获取活动表的信息根据活动team_id
434 await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + teamgroup.team_id, { 434 await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + teamgroup.team_id, {
435 data: {} 435 data: {}
436 - }).then(res => { 436 + }).then(async res => {
  437 + var flag=null;
437 if (res.data.code == 0) { 438 if (res.data.code == 0) {
438 teamlist = res.data.data; 439 teamlist = res.data.data;
439 goods_id = res.data.data.goods_id; 440 goods_id = res.data.data.goods_id;
440 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 +
441 //----------查看阶梯团------------ 466 //----------查看阶梯团------------
442 if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined) { 467 if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined) {
443 var ct_rylist = JSON.parse(teamlist.ct_rylist); 468 var ct_rylist = JSON.parse(teamlist.ct_rylist);
pages/team/team_success/team_success.js
@@ -182,40 +182,8 @@ Page({ @@ -182,40 +182,8 @@ Page({
182 //获取活动表的信息根据活动pt_prom_id 182 //获取活动表的信息根据活动pt_prom_id
183 await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + pt_prom_id, { 183 await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + pt_prom_id, {
184 data: { } 184 data: { }
185 - }).then(async res => {  
186 - var flag=null;  
187 - if (res.data.code==0){  
188 - teamlist = res.data.data;  
189 - this.setData({teamlist: teamlist});  
190 - //获取当前时间,并且判断剩余时间  
191 - var nt = ut.gettimestamp();  
192 - teamlist.status = 0;  
193 -  
194 - await getApp().request.promiseGet("/api/weshop/teamlist/pageteam/1",{  
195 - data:{  
196 - store_id: os.stoid,  
197 - is_end: 0,  
198 - is_show: 1,  
199 - user_id: getApp().globalData.user_id,  
200 - pageSize:1000  
201 - }  
202 - }).then(res=>{  
203 - let pd_list=res.data.data.pageData;  
204 - if(res.data.code==0 && pd_list.length>0){  
205 - flag =pd_list.some(pd=>{  
206 - return pd.goods_id==teamlist['goods_id']  
207 - })  
208 - }  
209 - })  
210 - if(!flag){  
211 - wx.showToast({title: "当前会员身份不符,无法参与", icon: 'none', duration: 3000});  
212 - setTimeout(function () {  
213 - ut.wx_back();  
214 - }, 2000)  
215 - return false;  
216 - } 185 + }).then(res => {
217 if (nt >= teamlist.start_time) teamlist.status = 1; 186 if (nt >= teamlist.start_time) teamlist.status = 1;
218 -  
219 goods_id = res.data.data.goods_id; 187 goods_id = res.data.data.goods_id;
220 id = res.data.data.id; 188 id = res.data.data.id;
221 share_img = ee.data.imageurl + res.data.data.share_imgurl; 189 share_img = ee.data.imageurl + res.data.data.share_imgurl;
@@ -856,7 +824,7 @@ Page({ @@ -856,7 +824,7 @@ Page({
856 if(th.data.teamlist.share_title){ 824 if(th.data.teamlist.share_title){
857 share_title=th.data.teamlist.share_title; 825 share_title=th.data.teamlist.share_title;
858 } 826 }
859 - 827 + console.log(url,3000);
860 return { 828 return {
861 path:url, 829 path:url,
862 title: share_title, 830 title: share_title,