diff --git a/pages/team/team_ping/team_ping.js b/pages/team/team_ping/team_ping.js index fdf5ece..acbbd3b 100644 --- a/pages/team/team_ping/team_ping.js +++ b/pages/team/team_ping/team_ping.js @@ -104,6 +104,8 @@ Page({ if(order && order.length){ for (i = 0; i < order.length; i++) { + //编号空,就进入下个循环 + if(!order[i].pt_listno) continue; //获取teamgroup中的值 await getApp().request.promiseGet("/api/weshop/teamgroup/page", { data: { store_id: os.stoid, listno: order[i].pt_listno,pageSize:1,page:1} diff --git a/pages/team/team_show/team_show.js b/pages/team/team_show/team_show.js index ea894dd..74118b9 100644 --- a/pages/team/team_show/team_show.js +++ b/pages/team/team_show/team_show.js @@ -433,6 +433,12 @@ Page({ } }) + if(!teamgroup || !teamgroup.listno){ + ut.m_toast('未找到团号'); + th.go_back(); + return false; + } + //判断是不是要继续的开关 var is_ok=1; diff --git a/pages/team/team_success/team_success.js b/pages/team/team_success/team_success.js index cff77c5..68053c5 100644 --- a/pages/team/team_success/team_success.js +++ b/pages/team/team_success/team_success.js @@ -171,6 +171,8 @@ Page({ pt_listno = order.pt_listno; }) + + if (this.data.payf || order.pt_status == 3) p_status = 3; //失败 if (order.pt_status == 2 || order.pt_status == 4 || order.pt_status == 5) p_status = 2; //成功 @@ -178,21 +180,22 @@ Page({ p_status = 1; //正在进行 if ( order.pt_status == 6) p_status = 4; //支付尾款失败 - //多少人参团头像 - await getApp().request.promiseGet("/api/weshop/order/pagePtList", { - data: { store_id: o.stoid, pt_listno: pt_listno, } - }).then(res => { - ordertx = res.data.data.pageData; - }) - var team_g=null; - //获取teamgroup中的值 - await getApp().request.promiseGet("/api/weshop/teamgroup/page", { - data: { store_id: os.stoid, listno: pt_listno,pageSize:1,page:1} - }).then(res => { - team_g = res.data.data.pageData[0] - - }) + if(pt_listno) { + //多少人参团头像 + await getApp().request.promiseGet("/api/weshop/order/pagePtList", { + data: {store_id: o.stoid, pt_listno: pt_listno,} + }).then(res => { + ordertx = res.data.data.pageData; + }) + + //获取teamgroup中的值 + await getApp().request.promiseGet("/api/weshop/teamgroup/page", { + data: { store_id: os.stoid, listno: pt_listno,pageSize:1,page:1} + }).then(res => { + team_g = res.data.data.pageData[0] + }) + } var min_price=0; @@ -239,21 +242,25 @@ Page({ }) - //只装5个 - var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num; - if(max_num && !team_g.is_xuni_ct){ - ct_nun=parseInt(max_num); - if (ct_nun < ordertx.length) ct_nun = ordertx.length; - } + if(ordertx && ordertx.length){ + //只装5个 + var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num; + if(max_num && !team_g.is_xuni_ct){ + ct_nun=parseInt(max_num); + if (ct_nun < ordertx.length) ct_nun = ordertx.length; + } - if(ct_nun>5) ct_nun=5; - for(var i=0;i= ordertx.length) sf_num++ - else - ordertx2.push(ordertx[i]); + if(ct_nun>5) ct_nun=5; + for(var i=0;i= ordertx.length) sf_num++ + else + ordertx2.push(ordertx[i]); + } } + + var head=[]; if(team_g.is_xuni_ct) { head=team_g.xuni_head_id.split(","); @@ -287,8 +294,8 @@ Page({ }) - var ct_price = 0, - num_0 = ordertx.length; + var ct_price = 0; + var num_0 = ordertx?ordertx.length:0; if (teamlist.kttype == 3){ var js_data = JSON.parse(teamlist.ct_rylist); js_data.forEach(function (val,ind) {