Authored by hf

merge release code to fixes bugs

@@ -14,10 +14,12 @@ @@ -14,10 +14,12 @@
14 <p id="intro" class="intro"> 14 <p id="intro" class="intro">
15 {{intro}} 15 {{intro}}
16 </p> 16 </p>
  17 + {{#if intro}}
17 <span id="more-intro" class="more-intro"> 18 <span id="more-intro" class="more-intro">
18 <span id="intro-more-txt">more</span> 19 <span id="intro-more-txt">more</span>
19 <i class="icon iconfont">&#xe609;</i> 20 <i class="icon iconfont">&#xe609;</i>
20 </span> 21 </span>
  22 + {{/if}}
21 </div> 23 </div>
22 </div> 24 </div>
23 {{# newArrival}} 25 {{# newArrival}}
@@ -64,7 +64,9 @@ class BrandModel @@ -64,7 +64,9 @@ class BrandModel
64 if (!empty($brand['brandTop'][0]['data']['list'])) { 64 if (!empty($brand['brandTop'][0]['data']['list'])) {
65 $build = array(); 65 $build = array();
66 foreach ($brand['brandTop'][0]['data']['list'] as $value) { 66 foreach ($brand['brandTop'][0]['data']['list'] as $value) {
  67 + if (isset($value['url'])) {
67 $build['url'] = Helpers::getFilterUrl($value['url']); 68 $build['url'] = Helpers::getFilterUrl($value['url']);
  69 + }
68 $build['img'] = Helpers::getImageUrl($value['src'], 144, 144); 70 $build['img'] = Helpers::getImageUrl($value['src'], 144, 144);
69 $build['name'] = $value['name']; 71 $build['name'] = $value['name'];
70 $result['hotBrand']['list'][] = $build; 72 $result['hotBrand']['list'][] = $build;
@@ -74,7 +76,9 @@ class BrandModel @@ -74,7 +76,9 @@ class BrandModel
74 elseif (!empty($brand['brandTop'][0]['data'])) { 76 elseif (!empty($brand['brandTop'][0]['data'])) {
75 $build = array(); 77 $build = array();
76 foreach ($brand['brandTop'][0]['data'] as $value) { 78 foreach ($brand['brandTop'][0]['data'] as $value) {
  79 + if (isset($value['url'])) {
77 $build['url'] = Helpers::getFilterUrl($value['url']); 80 $build['url'] = Helpers::getFilterUrl($value['url']);
  81 + }
78 $build['img'] = Helpers::getImageUrl($value['src'], 640, 310); 82 $build['img'] = Helpers::getImageUrl($value['src'], 640, 310);
79 $build['title'] = $value['title']; 83 $build['title'] = $value['title'];
80 $result['bannerTop']['list'][] = $build; 84 $result['bannerTop']['list'][] = $build;
@@ -85,7 +89,9 @@ class BrandModel @@ -85,7 +89,9 @@ class BrandModel
85 if (!empty($brand['brandTop'][1]['data']['list'])) { 89 if (!empty($brand['brandTop'][1]['data']['list'])) {
86 $build = array(); 90 $build = array();
87 foreach ($brand['brandTop'][1]['data']['list'] as $value) { 91 foreach ($brand['brandTop'][1]['data']['list'] as $value) {
  92 + if (isset($value['url'])) {
88 $build['url'] = Helpers::getFilterUrl($value['url']); 93 $build['url'] = Helpers::getFilterUrl($value['url']);
  94 + }
89 $build['img'] = Helpers::getImageUrl($value['src'], 144, 144); 95 $build['img'] = Helpers::getImageUrl($value['src'], 144, 144);
90 $build['name'] = $value['name']; 96 $build['name'] = $value['name'];
91 $result['hotBrand']['list'][] = $build; 97 $result['hotBrand']['list'][] = $build;
@@ -134,7 +134,7 @@ class PlusstarController extends AbstractAction @@ -134,7 +134,7 @@ class PlusstarController extends AbstractAction
134 $data['ps']['logo'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['brand_ico'], 160, 160); 134 $data['ps']['logo'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['brand_ico'], 160, 160);
135 $data['ps']['name'] = $brandInfo['getBrandInfo']['data']['brand_name']; 135 $data['ps']['name'] = $brandInfo['getBrandInfo']['data']['brand_name'];
136 $data['ps']['isLike'] = $brandInfo['getUidBrandFav']; 136 $data['ps']['isLike'] = $brandInfo['getUidBrandFav'];
137 - $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? '' : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' ')); 137 + $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? false : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' '));
138 $data['ps']['newArrival'] = array(); 138 $data['ps']['newArrival'] = array();
139 $data['ps']['newArrival']['moreUrl'] = $url; 139 $data['ps']['newArrival']['moreUrl'] = $url;
140 $data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct']; 140 $data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct'];