Authored by hongweigao

没有套餐时,隐藏

@@ -1023,7 +1023,7 @@ function fetchComment() { @@ -1023,7 +1023,7 @@ function fetchComment() {
1023 $consultNum.text(res[0].total); 1023 $consultNum.text(res[0].total);
1024 1024
1025 totalnum = Math.ceil(res[0].total / 10) * 20; 1025 totalnum = Math.ceil(res[0].total / 10) * 20;
1026 - 1026 +
1027 $consultsUl.empty().append(consultsTpl({ 1027 $consultsUl.empty().append(consultsTpl({
1028 consults: res 1028 consults: res
1029 })); 1029 }));
@@ -1349,10 +1349,10 @@ $(function() { @@ -1349,10 +1349,10 @@ $(function() {
1349 type: 'GET', 1349 type: 'GET',
1350 url: '/product/detail/getPacakge', 1350 url: '/product/detail/getPacakge',
1351 data: { 1351 data: {
1352 - skn: '51127118' 1352 + skn: skn
1353 } 1353 }
1354 }).then(function(result) { 1354 }).then(function(result) {
1355 - if (result.code === 200) { 1355 + if (result.code === 200 && result.data.packageData.length > 0) {
1356 var packageTpl = require('hbs/product/package.hbs'); // eslint-disable-line 1356 var packageTpl = require('hbs/product/package.hbs'); // eslint-disable-line
1357 1357
1358 pkgData = result.data; 1358 pkgData = result.data;
@@ -1362,6 +1362,8 @@ $(function() { @@ -1362,6 +1362,8 @@ $(function() {
1362 $('.good-info .good-detail-text > a').dotdotdot({ 1362 $('.good-info .good-detail-text > a').dotdotdot({
1363 wrap: 'letter' 1363 wrap: 'letter'
1364 }); 1364 });
  1365 + } else {
  1366 + $('#package').addClass('hide');
1365 } 1367 }
1366 }); 1368 });
1367 1369