...
|
...
|
@@ -45,7 +45,10 @@ class ListController extends WebAction |
|
|
$newData = NewModel::getNewSearchData($condition, $options);
|
|
|
$data = array(
|
|
|
'productListPage' => true,
|
|
|
'newSale' => $newData
|
|
|
'newSale' => $newData,
|
|
|
'title' => '潮流商品搜索 | YOHO!有货',
|
|
|
'keywords' => 'Yoho! 有货,潮流,时尚,流行,购物,B2C,正品,购物网站,网上购物,货到付款,品牌服饰,男士护肤,黑框眼镜,匡威,板鞋,i.t,izzue,5cm,eastpak,vans,lylescott,g-shock,new balance,lacoste,melissa,casio,卡西欧手表,舒雅,jasonwood,odm,AAAA,香港购物,日本潮流',
|
|
|
'description' => '潮流商品搜索,上衣,衬衫,TEE,卫衣,冲锋衣,风衣,羽绒服,裤子,休闲鞋,板鞋,配饰,复古眼镜'
|
|
|
);
|
|
|
$this->setWebNavHeader();
|
|
|
//渲染模板
|
...
|
...
|
@@ -72,7 +75,10 @@ class ListController extends WebAction |
|
|
$data = array(
|
|
|
//初始化js
|
|
|
'productListPage' => true,
|
|
|
'list' => $list
|
|
|
'list' => $list,
|
|
|
'title' => '潮流商品搜索 | YOHO!有货',
|
|
|
'keywords' => 'Yoho! 有货,潮流,时尚,流行,购物,B2C,正品,购物网站,网上购物,货到付款,品牌服饰,男士护肤,黑框眼镜,匡威,板鞋,i.t,izzue,5cm,eastpak,vans,lylescott,g-shock,new balance,lacoste,melissa,casio,卡西欧手表,舒雅,jasonwood,odm,AAAA,香港购物,日本潮流',
|
|
|
'description' => '潮流商品搜索,上衣,衬衫,TEE,卫衣,冲锋衣,风衣,羽绒服,裤子,休闲鞋,板鞋,配饰,复古眼镜'
|
|
|
);
|
|
|
$this->setWebNavHeader();
|
|
|
$this->_view->display('list', $data);
|
...
|
...
|
@@ -85,13 +91,18 @@ class ListController extends WebAction |
|
|
*/
|
|
|
public function getProductPicAction()
|
|
|
{
|
|
|
$res = array(
|
|
|
'code' => 400
|
|
|
);
|
|
|
if (!$this->isAjax()) {
|
|
|
$this ->echoJson($res);
|
|
|
return;
|
|
|
}
|
|
|
$product_skn = $this->post('skn');//TODO
|
|
|
$productSkn = $this->post('skn');
|
|
|
$uid = $this->getUid();
|
|
|
|
|
|
if (!$product_skn) {
|
|
|
if (!$productSkn) {
|
|
|
$this ->echoJson($res);
|
|
|
return ;
|
|
|
}
|
|
|
//大图
|
...
|
...
|
@@ -114,43 +125,46 @@ class ListController extends WebAction |
|
|
|
|
|
$isFavorite = false;
|
|
|
if ($uid) {
|
|
|
$favorite = FavoriteData::getUidProductFav($uid, $product_skn);
|
|
|
$favorite = FavoriteData::getUidProductFav($uid, $productSkn);
|
|
|
if (isset($favorite['code']) && $favorite['code'] == 200) {
|
|
|
$isFavorite = true;
|
|
|
}
|
|
|
}
|
|
|
$options['isFavorite'] = $isFavorite;
|
|
|
SearchModel::getProductPic($product_skn, $options);//TODO
|
|
|
$res = SearchModel::getProductPic($productSkn, $options);
|
|
|
$this ->echoJson($res);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据product_skn收藏
|
|
|
* 根据productSkn收藏
|
|
|
* @author
|
|
|
* @return json
|
|
|
*/
|
|
|
public function changeFavoriteAction()
|
|
|
{
|
|
|
$result = array(
|
|
|
'code'=>400
|
|
|
);
|
|
|
if (!$this->isAjax()) {
|
|
|
$this->echoJson($resut);
|
|
|
return;
|
|
|
}
|
|
|
$product_skn = $this->post('skn');
|
|
|
$productSkn = $this->post('skn');
|
|
|
$isFavorite = $this->post('isFavorite');
|
|
|
$uid = $this->getUid();
|
|
|
|
|
|
do {
|
|
|
if (!$product_skn && !$uid) {
|
|
|
break;//TODO
|
|
|
if (!$productSkn && !$uid) {
|
|
|
break;
|
|
|
}
|
|
|
if ($isFavorite) {
|
|
|
$result = FavoriteData::delUidProductFav($uid, $product_skn);
|
|
|
$this->echoJson($result);
|
|
|
$result = FavoriteData::delUidProductFav($uid, $productSkn);
|
|
|
break;
|
|
|
}else{
|
|
|
$result = FavoriteData::addUidProductFav($uid, $product_skn);
|
|
|
$this->echoJson($result);
|
|
|
$result = FavoriteData::addUidProductFav($uid, $productSkn);
|
|
|
break;
|
|
|
}
|
|
|
} while(false);
|
|
|
|
|
|
$this->echoJson($result);
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|