Showing
2 changed files
with
8 additions
and
3 deletions
@@ -221,8 +221,11 @@ class SearchModel | @@ -221,8 +221,11 @@ class SearchModel | ||
221 | //组织数据结构 | 221 | //组织数据结构 |
222 | $data = HelperSearch::getProductPic($data['data']['product_list'], $options); | 222 | $data = HelperSearch::getProductPic($data['data']['product_list'], $options); |
223 | } | 223 | } |
224 | - $data['isFavorite'] = $options['isFavorite']; | ||
225 | - echo json_encode($data); | 224 | + $res = array( |
225 | + 'pics'=>$data, | ||
226 | + 'isFavorite'=>$options['isFavorite'] | ||
227 | + ); | ||
228 | + echo json_encode($res); | ||
226 | } | 229 | } |
227 | 230 | ||
228 | /** | 231 | /** |
@@ -110,11 +110,13 @@ class IndexController extends WebAction | @@ -110,11 +110,13 @@ class IndexController extends WebAction | ||
110 | } | 110 | } |
111 | 111 | ||
112 | //收藏品牌 | 112 | //收藏品牌 |
113 | - public function favoriteBrandAction($uid = '', $brandId = '') | 113 | + public function favoriteBrandAction() |
114 | { | 114 | { |
115 | if (!$this->isAjax()) { | 115 | if (!$this->isAjax()) { |
116 | return; | 116 | return; |
117 | } | 117 | } |
118 | + $uid = $this->post('uid'); | ||
119 | + $brandId = $this->post('brandId'); | ||
118 | if ($uid && $brandId) { | 120 | if ($uid && $brandId) { |
119 | //调用接口收藏或取消收藏 | 121 | //调用接口收藏或取消收藏 |
120 | $result = FavoriteData::changeFavoriteBrand($uid, $brandId); | 122 | $result = FavoriteData::changeFavoriteBrand($uid, $brandId); |
-
Please register or login to post a comment