Commit 564c5e00f9538c4cc15f3e46f4004dd5d858f214

Authored by abson
1 parent 0a6617c4

拼单分享

pages/goods/goodsInfo/goodsInfo.js
... ... @@ -3439,7 +3439,7 @@ Page({
3439 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 3443 data:{
3444 3444 store_id: os.stoid,
3445 3445 is_end: 0,
... ...
pages/team/team_show/team_show.js
... ... @@ -433,11 +433,36 @@ Page({
433 433 //获取活动表的信息根据活动team_id
434 434 await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + teamgroup.team_id, {
435 435 data: {}
436   - }).then(res => {
  436 + }).then(async res => {
  437 + var flag=null;
437 438 if (res.data.code == 0) {
438 439 teamlist = res.data.data;
439 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 467 if (teamlist.ct_rylist != "" && teamlist.ct_rylist != null && teamlist.ct_rylist != undefined) {
443 468 var ct_rylist = JSON.parse(teamlist.ct_rylist);
... ...
pages/team/team_success/team_success.js
... ... @@ -182,40 +182,8 @@ Page({
182 182 //获取活动表的信息根据活动pt_prom_id
183 183 await getApp().request.promiseGet("/api/weshop/teamlist/get/" + os.stoid + "/" + pt_prom_id, {
184 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 186 if (nt >= teamlist.start_time) teamlist.status = 1;
218   -
219 187 goods_id = res.data.data.goods_id;
220 188 id = res.data.data.id;
221 189 share_img = ee.data.imageurl + res.data.data.share_imgurl;
... ... @@ -856,7 +824,7 @@ Page({
856 824 if(th.data.teamlist.share_title){
857 825 share_title=th.data.teamlist.share_title;
858 826 }
859   -
  827 + console.log(url,3000);
860 828 return {
861 829 path:url,
862 830 title: share_title,
... ...