Commit 229114839489eb6a1601fda9424b25145dc0d505

Authored by WXD-SEASON\season
2 parents 90b87324 ca0898ce

Merge branch 'dev_oa_fu15' into dev

pages/team/team_ping/team_ping.js
... ... @@ -104,6 +104,8 @@ Page({
104 104 if(order && order.length){
105 105 for (i = 0; i < order.length; i++) {
106 106  
  107 + //编号空,就进入下个循环
  108 + if(!order[i].pt_listno) continue;
107 109 //获取teamgroup中的值
108 110 await getApp().request.promiseGet("/api/weshop/teamgroup/page", {
109 111 data: { store_id: os.stoid, listno: order[i].pt_listno,pageSize:1,page:1}
... ...
pages/team/team_show/team_show.js
... ... @@ -433,6 +433,12 @@ Page({
433 433 }
434 434 })
435 435  
  436 + if(!teamgroup || !teamgroup.listno){
  437 + ut.m_toast('未找到团号');
  438 + th.go_back();
  439 + return false;
  440 + }
  441 +
436 442 //判断是不是要继续的开关
437 443 var is_ok=1;
438 444  
... ...
pages/team/team_success/team_success.js
... ... @@ -171,6 +171,8 @@ Page({
171 171 pt_listno = order.pt_listno;
172 172 })
173 173  
  174 +
  175 +
174 176 if (this.data.payf || order.pt_status == 3) p_status = 3; //失败
175 177 if (order.pt_status == 2 || order.pt_status == 4 || order.pt_status == 5)
176 178 p_status = 2; //成功
... ... @@ -178,21 +180,22 @@ Page({
178 180 p_status = 1; //正在进行
179 181 if ( order.pt_status == 6) p_status = 4; //支付尾款失败
180 182  
181   - //多少人参团头像
182   - await getApp().request.promiseGet("/api/weshop/order/pagePtList", {
183   - data: { store_id: o.stoid, pt_listno: pt_listno, }
184   - }).then(res => {
185   - ordertx = res.data.data.pageData;
186   - })
187   -
188 183 var team_g=null;
189   - //获取teamgroup中的值
190   - await getApp().request.promiseGet("/api/weshop/teamgroup/page", {
191   - data: { store_id: os.stoid, listno: pt_listno,pageSize:1,page:1}
192   - }).then(res => {
193   - team_g = res.data.data.pageData[0]
194   -
195   - })
  184 + if(pt_listno) {
  185 + //多少人参团头像
  186 + await getApp().request.promiseGet("/api/weshop/order/pagePtList", {
  187 + data: {store_id: o.stoid, pt_listno: pt_listno,}
  188 + }).then(res => {
  189 + ordertx = res.data.data.pageData;
  190 + })
  191 +
  192 + //获取teamgroup中的值
  193 + await getApp().request.promiseGet("/api/weshop/teamgroup/page", {
  194 + data: { store_id: os.stoid, listno: pt_listno,pageSize:1,page:1}
  195 + }).then(res => {
  196 + team_g = res.data.data.pageData[0]
  197 + })
  198 + }
196 199  
197 200  
198 201 var min_price=0;
... ... @@ -239,21 +242,25 @@ Page({
239 242  
240 243 })
241 244  
242   - //只装5个
243   - var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num;
244   - if(max_num && !team_g.is_xuni_ct){
245   - ct_nun=parseInt(max_num);
246   - if (ct_nun < ordertx.length) ct_nun = ordertx.length;
247   - }
  245 + if(ordertx && ordertx.length){
  246 + //只装5个
  247 + var ordertx2=[],sf_num=0,ct_nun=teamlist.ct_num;
  248 + if(max_num && !team_g.is_xuni_ct){
  249 + ct_nun=parseInt(max_num);
  250 + if (ct_nun < ordertx.length) ct_nun = ordertx.length;
  251 + }
248 252  
249   - if(ct_nun>5) ct_nun=5;
250   - for(var i=0;i<ct_nun;i++){
251   - if (i >= ordertx.length) sf_num++
252   - else
253   - ordertx2.push(ordertx[i]);
  253 + if(ct_nun>5) ct_nun=5;
  254 + for(var i=0;i<ct_nun;i++){
  255 + if (i >= ordertx.length) sf_num++
  256 + else
  257 + ordertx2.push(ordertx[i]);
  258 + }
254 259 }
255 260  
256 261  
  262 +
  263 +
257 264 var head=[];
258 265 if(team_g.is_xuni_ct) {
259 266 head=team_g.xuni_head_id.split(",");
... ... @@ -287,8 +294,8 @@ Page({
287 294 })
288 295  
289 296  
290   - var ct_price = 0,
291   - num_0 = ordertx.length;
  297 + var ct_price = 0;
  298 + var num_0 = ordertx?ordertx.length:0;
292 299 if (teamlist.kttype == 3){
293 300 var js_data = JSON.parse(teamlist.ct_rylist);
294 301 js_data.forEach(function (val,ind) {
... ...