Commit 3629eed0bf23e7ca66850dd2ad142a587165556a

Authored by yvan.ni
1 parent 067af865

要判断 商品详情广告是不是有值。否则会报错

packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
@@ -467,18 +467,20 @@ Page({ @@ -467,18 +467,20 @@ Page({
467 ee.init(gid); 467 ee.init(gid);
468 //------几人评价------- 468 //------几人评价-------
469 //n.init(th, "", "comments"); 469 //n.init(th, "", "comments");
470 - //商品详情广告----  
471 - a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);  
472 - common.wxParseAddFullImageUrl(ee, "goodInfo_ad"); 470 +
  471 + if(e && e.goods_bottomconent){
  472 + //商品详情广告----
  473 + a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);
  474 + common.wxParseAddFullImageUrl(ee, "goodInfo_ad");
  475 + }
  476 +
  477 +
473 //------- 478 //-------
474 th.requestCardNum(), wx.pageScrollTo && th.setData({ 479 th.requestCardNum(), wx.pageScrollTo && th.setData({
475 supportPageScroll: !0 480 supportPageScroll: !0
476 }); 481 });
477 482
478 483
479 -  
480 -  
481 -  
482 //计算等级价相关 484 //计算等级价相关
483 var swithc_list = e.switch_list; 485 var swithc_list = e.switch_list;
484 var sw_arr = JSON.parse(swithc_list); 486 var sw_arr = JSON.parse(swithc_list);
packageC/pages/presell/goodsInfo/goodsInfo.js
@@ -402,10 +402,14 @@ Page({ @@ -402,10 +402,14 @@ Page({
402 appoint_pick_keyid: json_d.appoint_pick_keyid 402 appoint_pick_keyid: json_d.appoint_pick_keyid
403 403
404 }); 404 });
405 - //商品详情广告----  
406 - a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);  
407 - common.wxParseAddFullImageUrl(ee, "goodInfo_ad");  
408 - //------- 405 +
  406 + if(e && e.goods_bottomconent){
  407 + //商品详情广告----
  408 + a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);
  409 + common.wxParseAddFullImageUrl(ee, "goodInfo_ad");
  410 + //-------
  411 + }
  412 +
409 // ee.init(gid); 413 // ee.init(gid);
410 //------几人评价------- 414 //------几人评价-------
411 //n.init(th, "", "comments"); 415 //n.init(th, "", "comments");
pages/goods/goodsInfo/goodsInfo.js
@@ -489,10 +489,13 @@ Page({ @@ -489,10 +489,13 @@ Page({
489 // goods_bottomconent:e.goods_bottomconent 489 // goods_bottomconent:e.goods_bottomconent
490 }); 490 });
491 491
492 - //商品详情广告----  
493 - a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);  
494 - common.wxParseAddFullImageUrl(ee, "goodInfo_ad");  
495 - //------- 492 + //判断商品详情要有东西
  493 + if(e && e.goods_bottomconent) {
  494 + //商品详情广告----
  495 + a.wxParse("goodInfo_ad", "html", ut.format_content(e.goods_bottomconent), ee, 6);
  496 + common.wxParseAddFullImageUrl(ee, "goodInfo_ad");
  497 + //-------
  498 + }
496 499
497 //------几人评价------- 500 //------几人评价-------
498 //n.init(th, "", "comments"); 501 //n.init(th, "", "comments");
@@ -504,6 +507,7 @@ Page({ @@ -504,6 +507,7 @@ Page({
504 //计算等级价相关 507 //计算等级价相关
505 var swithc_list = e.switch_list; 508 var swithc_list = e.switch_list;
506 var sw_arr = JSON.parse(swithc_list); 509 var sw_arr = JSON.parse(swithc_list);
  510 + console.log('plus-111')
507 //---如果后台又开等级卡的开关--- 511 //---如果后台又开等级卡的开关---
508 ut.get_plus_name_price(sw_arr, th); 512 ut.get_plus_name_price(sw_arr, th);
509 513
@@ -7692,6 +7696,7 @@ Page({ @@ -7692,6 +7696,7 @@ Page({
7692 }) 7696 })
7693 }, 7697 },
7694 7698
  7699 +
7695 go_plus: function () { 7700 go_plus: function () {
7696 getApp().goto("/pages/user/plus/plus"); 7701 getApp().goto("/pages/user/plus/plus");
7697 }, 7702 },