Authored by whb

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

... ... @@ -1248,7 +1248,7 @@ class HelperSearch
$result[$key]['isVedio'] = true;
$result[$key]['src'] = $vo;
}else{
$result[$key]['href'] = $href[1][$key];
$result[$key]['href'] = isset($href[1][$key]) ? $href[1][$key] : '';
$result[$key]['src'] = $vo;
}
}
... ...
... ... @@ -97,8 +97,9 @@ exports.init = function(num) {
$.ajax({
type: 'POST',
url: '/product/list/getProductPic',
dataType: 'json',
url: 'http://list.yohobuy.com/product/list/getProductPic',
dataType: 'jsonp',
jsonp: 'callback',
data: {
skn: event.target.attr('data-skn')
}
... ...
... ... @@ -95,17 +95,16 @@ class ListController extends WebAction
*/
public function getProductPicAction()
{
$res = array(
'code' => 400
);
$res = array();
$callback = $this->post('callback');
if (!$this->isAjax()) {
$this ->echoJson($res);
$this->helpJsonCallbackResult($callback, 400, 'Not a Ajax request');
return;
}
$productSkn = $this->post('skn');
$uid = $this->getUid();
if (!$productSkn) {
$this ->echoJson($res);
$this->helpJsonCallbackResult($callback, 412, '商品skn为空');
return ;
}
$rowNum = $this->post('rowNum');
... ... @@ -131,7 +130,7 @@ class ListController extends WebAction
}
$options['isFavorite'] = $isFavorite;
$res = SearchModel::getProductPic($productSkn, $options);
$this ->echoJson($res);
$this->helpJsonCallbackResult($callback, 200, 'success', $res);
}
/**
... ...