Authored by 周少峰

接口地址调整

@@ -25,6 +25,10 @@ class SearchData extends \LibModels\Wap\Product\SearchData @@ -25,6 +25,10 @@ class SearchData extends \LibModels\Wap\Product\SearchData
25 elseif ($type == 'recent') { 25 elseif ($type == 'recent') {
26 return 'http://100.98.132.63/yohosearch/recent.json'; 26 return 'http://100.98.132.63/yohosearch/recent.json';
27 } 27 }
  28 + elseif ($type == 'suggest') {
  29 + //return 'http://101.200.31.165/yohosearch/suggest.json';
  30 + return 'http://100.98.132.63/yohosearch/suggest.json';
  31 + }
28 elseif ($type == 'shop') { 32 elseif ($type == 'shop') {
29 return 'http://100.98.132.63/yohosearch/shops.json'; 33 return 'http://100.98.132.63/yohosearch/shops.json';
30 } 34 }
@@ -45,6 +49,10 @@ class SearchData extends \LibModels\Wap\Product\SearchData @@ -45,6 +49,10 @@ class SearchData extends \LibModels\Wap\Product\SearchData
45 //return 'http://101.200.31.165/yohosearch/recent.json'; 49 //return 'http://101.200.31.165/yohosearch/recent.json';
46 return 'http://192.168.10.64:8080/yohosearch/recent.json'; 50 return 'http://192.168.10.64:8080/yohosearch/recent.json';
47 } 51 }
  52 + elseif ($type == 'suggest') {
  53 +// return 'http://101.200.31.165/yohosearch/suggest.json';
  54 + return 'http://192.168.10.64:8080/yohosearch/suggest.json';
  55 + }
48 elseif ($type == 'shop') { 56 elseif ($type == 'shop') {
49 //return 'http://101.200.31.165/yohosearch/shops.json'; 57 //return 'http://101.200.31.165/yohosearch/shops.json';
50 return 'http://192.168.10.64:8080/yohosearch/shops.json'; 58 return 'http://192.168.10.64:8080/yohosearch/shops.json';
@@ -117,6 +117,9 @@ class HelperSearch @@ -117,6 +117,9 @@ class HelperSearch
117 { 117 {
118 $params = self::$params; 118 $params = self::$params;
119 $goods = array(); 119 $goods = array();
  120 + if (empty($product)) {
  121 + return $goods;
  122 + }
120 foreach($product as $key => $val){ 123 foreach($product as $key => $val){
121 //NEW 124 //NEW
122 $isNew = $val['is_new'] == 'Y' ? true : false; 125 $isNew = $val['is_new'] == 'Y' ? true : false;