Commit 3629eed0bf23e7ca66850dd2ad142a587165556a

Authored by yvan.ni
1 parent 067af865

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

packageC/pages/luckyGo/luckyGo_goodsInfo/luckyGo_goodsInfo.js
... ... @@ -467,18 +467,20 @@ Page({
467 467 ee.init(gid);
468 468 //------几人评价-------
469 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 479 th.requestCardNum(), wx.pageScrollTo && th.setData({
475 480 supportPageScroll: !0
476 481 });
477 482  
478 483  
479   -
480   -
481   -
482 484 //计算等级价相关
483 485 var swithc_list = e.switch_list;
484 486 var sw_arr = JSON.parse(swithc_list);
... ...
packageC/pages/presell/goodsInfo/goodsInfo.js
... ... @@ -402,10 +402,14 @@ Page({
402 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 413 // ee.init(gid);
410 414 //------几人评价-------
411 415 //n.init(th, "", "comments");
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -489,10 +489,13 @@ Page({
489 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 501 //n.init(th, "", "comments");
... ... @@ -504,6 +507,7 @@ Page({
504 507 //计算等级价相关
505 508 var swithc_list = e.switch_list;
506 509 var sw_arr = JSON.parse(swithc_list);
  510 + console.log('plus-111')
507 511 //---如果后台又开等级卡的开关---
508 512 ut.get_plus_name_price(sw_arr, th);
509 513  
... ... @@ -7692,6 +7696,7 @@ Page({
7692 7696 })
7693 7697 },
7694 7698  
  7699 +
7695 7700 go_plus: function () {
7696 7701 getApp().goto("/pages/user/plus/plus");
7697 7702 },
... ...