|
@@ -45,7 +45,10 @@ class ListController extends WebAction |
|
@@ -45,7 +45,10 @@ class ListController extends WebAction |
45
|
$newData = NewModel::getNewSearchData($condition, $options);
|
45
|
$newData = NewModel::getNewSearchData($condition, $options);
|
46
|
$data = array(
|
46
|
$data = array(
|
47
|
'productListPage' => true,
|
47
|
'productListPage' => true,
|
48
|
- 'newSale' => $newData
|
48
|
+ 'newSale' => $newData,
|
|
|
49
|
+ 'title' => '潮流商品搜索 | YOHO!有货',
|
|
|
50
|
+ 'keywords' => 'Yoho! 有货,潮流,时尚,流行,购物,B2C,正品,购物网站,网上购物,货到付款,品牌服饰,男士护肤,黑框眼镜,匡威,板鞋,i.t,izzue,5cm,eastpak,vans,lylescott,g-shock,new balance,lacoste,melissa,casio,卡西欧手表,舒雅,jasonwood,odm,AAAA,香港购物,日本潮流',
|
|
|
51
|
+ 'description' => '潮流商品搜索,上衣,衬衫,TEE,卫衣,冲锋衣,风衣,羽绒服,裤子,休闲鞋,板鞋,配饰,复古眼镜'
|
49
|
);
|
52
|
);
|
50
|
$this->setWebNavHeader();
|
53
|
$this->setWebNavHeader();
|
51
|
//渲染模板
|
54
|
//渲染模板
|
|
@@ -72,7 +75,10 @@ class ListController extends WebAction |
|
@@ -72,7 +75,10 @@ class ListController extends WebAction |
72
|
$data = array(
|
75
|
$data = array(
|
73
|
//初始化js
|
76
|
//初始化js
|
74
|
'productListPage' => true,
|
77
|
'productListPage' => true,
|
75
|
- 'list' => $list
|
78
|
+ 'list' => $list,
|
|
|
79
|
+ 'title' => '潮流商品搜索 | YOHO!有货',
|
|
|
80
|
+ 'keywords' => 'Yoho! 有货,潮流,时尚,流行,购物,B2C,正品,购物网站,网上购物,货到付款,品牌服饰,男士护肤,黑框眼镜,匡威,板鞋,i.t,izzue,5cm,eastpak,vans,lylescott,g-shock,new balance,lacoste,melissa,casio,卡西欧手表,舒雅,jasonwood,odm,AAAA,香港购物,日本潮流',
|
|
|
81
|
+ 'description' => '潮流商品搜索,上衣,衬衫,TEE,卫衣,冲锋衣,风衣,羽绒服,裤子,休闲鞋,板鞋,配饰,复古眼镜'
|
76
|
);
|
82
|
);
|
77
|
$this->setWebNavHeader();
|
83
|
$this->setWebNavHeader();
|
78
|
$this->_view->display('list', $data);
|
84
|
$this->_view->display('list', $data);
|
|
@@ -85,13 +91,18 @@ class ListController extends WebAction |
|
@@ -85,13 +91,18 @@ class ListController extends WebAction |
85
|
*/
|
91
|
*/
|
86
|
public function getProductPicAction()
|
92
|
public function getProductPicAction()
|
87
|
{
|
93
|
{
|
|
|
94
|
+ $res = array(
|
|
|
95
|
+ 'code' => 400
|
|
|
96
|
+ );
|
88
|
if (!$this->isAjax()) {
|
97
|
if (!$this->isAjax()) {
|
|
|
98
|
+ $this ->echoJson($res);
|
89
|
return;
|
99
|
return;
|
90
|
}
|
100
|
}
|
91
|
- $product_skn = $this->post('skn');//TODO
|
101
|
+ $productSkn = $this->post('skn');
|
92
|
$uid = $this->getUid();
|
102
|
$uid = $this->getUid();
|
93
|
|
103
|
|
94
|
- if (!$product_skn) {
|
104
|
+ if (!$productSkn) {
|
|
|
105
|
+ $this ->echoJson($res);
|
95
|
return ;
|
106
|
return ;
|
96
|
}
|
107
|
}
|
97
|
//大图
|
108
|
//大图
|
|
@@ -114,43 +125,46 @@ class ListController extends WebAction |
|
@@ -114,43 +125,46 @@ class ListController extends WebAction |
114
|
|
125
|
|
115
|
$isFavorite = false;
|
126
|
$isFavorite = false;
|
116
|
if ($uid) {
|
127
|
if ($uid) {
|
117
|
- $favorite = FavoriteData::getUidProductFav($uid, $product_skn);
|
128
|
+ $favorite = FavoriteData::getUidProductFav($uid, $productSkn);
|
118
|
if (isset($favorite['code']) && $favorite['code'] == 200) {
|
129
|
if (isset($favorite['code']) && $favorite['code'] == 200) {
|
119
|
$isFavorite = true;
|
130
|
$isFavorite = true;
|
120
|
}
|
131
|
}
|
121
|
}
|
132
|
}
|
122
|
$options['isFavorite'] = $isFavorite;
|
133
|
$options['isFavorite'] = $isFavorite;
|
123
|
- SearchModel::getProductPic($product_skn, $options);//TODO
|
134
|
+ $res = SearchModel::getProductPic($productSkn, $options);
|
|
|
135
|
+ $this ->echoJson($res);
|
124
|
}
|
136
|
}
|
125
|
|
137
|
|
126
|
/**
|
138
|
/**
|
127
|
- * 根据product_skn收藏
|
139
|
+ * 根据productSkn收藏
|
128
|
* @author
|
140
|
* @author
|
129
|
* @return json
|
141
|
* @return json
|
130
|
*/
|
142
|
*/
|
131
|
public function changeFavoriteAction()
|
143
|
public function changeFavoriteAction()
|
132
|
{
|
144
|
{
|
|
|
145
|
+ $result = array(
|
|
|
146
|
+ 'code'=>400
|
|
|
147
|
+ );
|
133
|
if (!$this->isAjax()) {
|
148
|
if (!$this->isAjax()) {
|
|
|
149
|
+ $this->echoJson($resut);
|
134
|
return;
|
150
|
return;
|
135
|
}
|
151
|
}
|
136
|
- $product_skn = $this->post('skn');
|
152
|
+ $productSkn = $this->post('skn');
|
137
|
$isFavorite = $this->post('isFavorite');
|
153
|
$isFavorite = $this->post('isFavorite');
|
138
|
$uid = $this->getUid();
|
154
|
$uid = $this->getUid();
|
139
|
|
155
|
|
140
|
do {
|
156
|
do {
|
141
|
- if (!$product_skn && !$uid) {
|
|
|
142
|
- break;//TODO
|
157
|
+ if (!$productSkn && !$uid) {
|
|
|
158
|
+ break;
|
143
|
}
|
159
|
}
|
144
|
if ($isFavorite) {
|
160
|
if ($isFavorite) {
|
145
|
- $result = FavoriteData::delUidProductFav($uid, $product_skn);
|
|
|
146
|
- $this->echoJson($result);
|
161
|
+ $result = FavoriteData::delUidProductFav($uid, $productSkn);
|
147
|
break;
|
162
|
break;
|
148
|
}else{
|
163
|
}else{
|
149
|
- $result = FavoriteData::addUidProductFav($uid, $product_skn);
|
|
|
150
|
- $this->echoJson($result);
|
164
|
+ $result = FavoriteData::addUidProductFav($uid, $productSkn);
|
151
|
break;
|
165
|
break;
|
152
|
}
|
166
|
}
|
153
|
} while(false);
|
167
|
} while(false);
|
154
|
-
|
168
|
+ $this->echoJson($result);
|
155
|
}
|
169
|
}
|
156
|
} |
170
|
} |