Authored by yangyang

修改图片ajax请求

... ... @@ -221,8 +221,11 @@ class SearchModel
//组织数据结构
$data = HelperSearch::getProductPic($data['data']['product_list'], $options);
}
$data['isFavorite'] = $options['isFavorite'];
echo json_encode($data);
$res = array(
'pics'=>$data,
'isFavorite'=>$options['isFavorite']
);
echo json_encode($res);
}
/**
... ...
... ... @@ -110,11 +110,13 @@ class IndexController extends WebAction
}
//收藏品牌
public function favoriteBrandAction($uid = '', $brandId = '')
public function favoriteBrandAction()
{
if (!$this->isAjax()) {
return;
}
$uid = $this->post('uid');
$brandId = $this->post('brandId');
if ($uid && $brandId) {
//调用接口收藏或取消收藏
$result = FavoriteData::changeFavoriteBrand($uid, $brandId);
... ...