|
@@ -16,11 +16,11 @@ use Plugin\Helpers; |
|
@@ -16,11 +16,11 @@ use Plugin\Helpers; |
16
|
*/
|
16
|
*/
|
17
|
class HomeController extends AbstractAction
|
17
|
class HomeController extends AbstractAction
|
18
|
{
|
18
|
{
|
|
|
19
|
+
|
19
|
/**
|
20
|
/**
|
20
|
* 个人中心入口
|
21
|
* 个人中心入口
|
21
|
*/
|
22
|
*/
|
22
|
- public function indexAction()
|
|
|
23
|
- {
|
23
|
+ public function indexAction() {
|
24
|
// 设置网站标题
|
24
|
// 设置网站标题
|
25
|
$this->setTitle('个人中心');
|
25
|
$this->setTitle('个人中心');
|
26
|
$this->setNavHeader('个人中心', true, SITE_MAIN);
|
26
|
$this->setNavHeader('个人中心', true, SITE_MAIN);
|
|
@@ -44,11 +44,9 @@ class HomeController extends AbstractAction |
|
@@ -44,11 +44,9 @@ class HomeController extends AbstractAction |
44
|
/**
|
44
|
/**
|
45
|
* 用户订单
|
45
|
* 用户订单
|
46
|
*/
|
46
|
*/
|
47
|
- public function ordersAction()
|
|
|
48
|
- {
|
47
|
+ public function ordersAction() {
|
49
|
// $uid = $this->getUid();
|
48
|
// $uid = $this->getUid();
|
50
|
// $type = $this->get('type', 1);
|
49
|
// $type = $this->get('type', 1);
|
51
|
-
|
|
|
52
|
// $orders = \Index\UserModel::getUserOrderData(967016, $type);
|
50
|
// $orders = \Index\UserModel::getUserOrderData(967016, $type);
|
53
|
|
51
|
|
54
|
$order = array(
|
52
|
$order = array(
|
|
@@ -91,8 +89,7 @@ class HomeController extends AbstractAction |
|
@@ -91,8 +89,7 @@ class HomeController extends AbstractAction |
91
|
/**
|
89
|
/**
|
92
|
* 用户收藏的商品
|
90
|
* 用户收藏的商品
|
93
|
*/
|
91
|
*/
|
94
|
- public function favoriteAction()
|
|
|
95
|
- {
|
92
|
+ public function favoriteAction() {
|
96
|
$uid = $this->getUid();
|
93
|
$uid = $this->getUid();
|
97
|
|
94
|
|
98
|
$favProducts = \Index\UserModel::getFavProductData($uid);
|
95
|
$favProducts = \Index\UserModel::getFavProductData($uid);
|
|
@@ -116,8 +113,7 @@ class HomeController extends AbstractAction |
|
@@ -116,8 +113,7 @@ class HomeController extends AbstractAction |
116
|
/**
|
113
|
/**
|
117
|
* 用户收藏的品牌
|
114
|
* 用户收藏的品牌
|
118
|
*/
|
115
|
*/
|
119
|
- public function favoritebrandAction()
|
|
|
120
|
- {
|
116
|
+ public function favoritebrandAction() {
|
121
|
$uid = $this->getUid();
|
117
|
$uid = $this->getUid();
|
122
|
$gender = Helpers::getGenderByCookie();
|
118
|
$gender = Helpers::getGenderByCookie();
|
123
|
|
119
|
|
|
@@ -129,8 +125,7 @@ class HomeController extends AbstractAction |
|
@@ -129,8 +125,7 @@ class HomeController extends AbstractAction |
129
|
/**
|
125
|
/**
|
130
|
* 个人信息
|
126
|
* 个人信息
|
131
|
*/
|
127
|
*/
|
132
|
- public function personalDetailsAction()
|
|
|
133
|
- {
|
128
|
+ public function personalDetailsAction() {
|
134
|
$this->setTitle('个人信息');
|
129
|
$this->setTitle('个人信息');
|
135
|
$this->setNavHeader('个人信息', true, SITE_MAIN);
|
130
|
$this->setNavHeader('个人信息', true, SITE_MAIN);
|
136
|
|
131
|
|
|
@@ -139,15 +134,12 @@ class HomeController extends AbstractAction |
|
@@ -139,15 +134,12 @@ class HomeController extends AbstractAction |
139
|
$data = \Index\UserModel::getUserProfileData($uid);
|
134
|
$data = \Index\UserModel::getUserProfileData($uid);
|
140
|
$data['pageFooter'] = true;
|
135
|
$data['pageFooter'] = true;
|
141
|
$this->_view->display('personal-details', $data);
|
136
|
$this->_view->display('personal-details', $data);
|
142
|
-
|
|
|
143
|
-
|
|
|
144
|
}
|
137
|
}
|
145
|
|
138
|
|
146
|
/**
|
139
|
/**
|
147
|
* YOHO币
|
140
|
* YOHO币
|
148
|
*/
|
141
|
*/
|
149
|
- public function currencyAction()
|
|
|
150
|
- {
|
142
|
+ public function currencyAction() {
|
151
|
// $uid = $this->getUid();
|
143
|
// $uid = $this->getUid();
|
152
|
$this->setNavHeader('YOHO币', true, false);
|
144
|
$this->setNavHeader('YOHO币', true, false);
|
153
|
|
145
|
|
|
@@ -160,8 +152,7 @@ class HomeController extends AbstractAction |
|
@@ -160,8 +152,7 @@ class HomeController extends AbstractAction |
160
|
/**
|
152
|
/**
|
161
|
* 优惠券
|
153
|
* 优惠券
|
162
|
*/
|
154
|
*/
|
163
|
- public function couponsAction()
|
|
|
164
|
- {
|
155
|
+ public function couponsAction() {
|
165
|
|
156
|
|
166
|
$this->setTitle('优惠券');
|
157
|
$this->setTitle('优惠券');
|
167
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
158
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
|
@@ -173,14 +164,12 @@ class HomeController extends AbstractAction |
|
@@ -173,14 +164,12 @@ class HomeController extends AbstractAction |
173
|
'couponsPage' => true
|
164
|
'couponsPage' => true
|
174
|
);
|
165
|
);
|
175
|
$this->_view->display('coupons', $coupons);
|
166
|
$this->_view->display('coupons', $coupons);
|
176
|
-
|
|
|
177
|
}
|
167
|
}
|
178
|
|
168
|
|
179
|
/**
|
169
|
/**
|
180
|
* 我的消息
|
170
|
* 我的消息
|
181
|
*/
|
171
|
*/
|
182
|
- public function messageAction()
|
|
|
183
|
- {
|
172
|
+ public function messageAction() {
|
184
|
// $uid = $this->getUid();
|
173
|
// $uid = $this->getUid();
|
185
|
$page = $this->get('page', 0);
|
174
|
$page = $this->get('page', 0);
|
186
|
$size = $this->get('size', 10);
|
175
|
$size = $this->get('size', 10);
|
|
@@ -189,14 +178,12 @@ class HomeController extends AbstractAction |
|
@@ -189,14 +178,12 @@ class HomeController extends AbstractAction |
189
|
$messages = \Index\UserModel::getMessageData($uid, $page, $size);
|
178
|
$messages = \Index\UserModel::getMessageData($uid, $page, $size);
|
190
|
|
179
|
|
191
|
print_r($messages);
|
180
|
print_r($messages);
|
192
|
-
|
|
|
193
|
}
|
181
|
}
|
194
|
|
182
|
|
195
|
/**
|
183
|
/**
|
196
|
* 地址管理
|
184
|
* 地址管理
|
197
|
*/
|
185
|
*/
|
198
|
- public function addressAction()
|
|
|
199
|
- {
|
186
|
+ public function addressAction() {
|
200
|
// 设置网站标题
|
187
|
// 设置网站标题
|
201
|
$this->setTitle('地址管理');
|
188
|
$this->setTitle('地址管理');
|
202
|
$this->setNavHeader('地址管理', true, SITE_MAIN);
|
189
|
$this->setNavHeader('地址管理', true, SITE_MAIN);
|
|
@@ -218,8 +205,7 @@ class HomeController extends AbstractAction |
|
@@ -218,8 +205,7 @@ class HomeController extends AbstractAction |
218
|
/**
|
205
|
/**
|
219
|
* 修改地址
|
206
|
* 修改地址
|
220
|
*/
|
207
|
*/
|
221
|
- public function editAddressAction()
|
|
|
222
|
- {
|
208
|
+ public function editAddressAction() {
|
223
|
// 设置网站标题
|
209
|
// 设置网站标题
|
224
|
$this->setTitle('修改地址');
|
210
|
$this->setTitle('修改地址');
|
225
|
$this->setNavHeader('修改地址', true, SITE_MAIN);
|
211
|
$this->setNavHeader('修改地址', true, SITE_MAIN);
|
|
@@ -241,8 +227,7 @@ class HomeController extends AbstractAction |
|
@@ -241,8 +227,7 @@ class HomeController extends AbstractAction |
241
|
/**
|
227
|
/**
|
242
|
* 在线客服
|
228
|
* 在线客服
|
243
|
*/
|
229
|
*/
|
244
|
- public function onlineServiceAction()
|
|
|
245
|
- {
|
230
|
+ public function onlineServiceAction() {
|
246
|
$service = \Index\UserModel::getOnlineServiceData();
|
231
|
$service = \Index\UserModel::getOnlineServiceData();
|
247
|
|
232
|
|
248
|
print_r($service);
|
233
|
print_r($service);
|
|
@@ -251,16 +236,14 @@ class HomeController extends AbstractAction |
|
@@ -251,16 +236,14 @@ class HomeController extends AbstractAction |
251
|
/**
|
236
|
/**
|
252
|
* 我的逛
|
237
|
* 我的逛
|
253
|
*/
|
238
|
*/
|
254
|
- public function myGuangAction()
|
|
|
255
|
- {
|
239
|
+ public function myGuangAction() {
|
256
|
echo 'My Guang';
|
240
|
echo 'My Guang';
|
257
|
}
|
241
|
}
|
258
|
|
242
|
|
259
|
/**
|
243
|
/**
|
260
|
* 意见反馈
|
244
|
* 意见反馈
|
261
|
*/
|
245
|
*/
|
262
|
- public function suggestAction()
|
|
|
263
|
- {
|
246
|
+ public function suggestAction() {
|
264
|
$udid = $this->getUdid();
|
247
|
$udid = $this->getUdid();
|
265
|
$page = $this->get('page', 1);
|
248
|
$page = $this->get('page', 1);
|
266
|
$limit = $this->get('limit', 30);
|
249
|
$limit = $this->get('limit', 30);
|
|
@@ -297,15 +280,13 @@ class HomeController extends AbstractAction |
|
@@ -297,15 +280,13 @@ class HomeController extends AbstractAction |
297
|
'bad' => false)
|
280
|
'bad' => false)
|
298
|
)
|
281
|
)
|
299
|
));
|
282
|
));
|
300
|
-
|
|
|
301
|
}
|
283
|
}
|
302
|
|
284
|
|
303
|
/**
|
285
|
/**
|
304
|
* 异步保存意见反馈数据
|
286
|
* 异步保存意见反馈数据
|
305
|
*/
|
287
|
*/
|
306
|
- public function savesuggestAction()
|
|
|
307
|
- {
|
|
|
308
|
- if($this->isAjax()) {
|
288
|
+ public function savesuggestAction() {
|
|
|
289
|
+ if ($this->isAjax()) {
|
309
|
$uid = $this->getUid();
|
290
|
$uid = $this->getUid();
|
310
|
$content = $this->post('content', '');
|
291
|
$content = $this->post('content', '');
|
311
|
$suggest_type = $this->get('suggest_type', 2);
|
292
|
$suggest_type = $this->get('suggest_type', 2);
|
|
@@ -314,13 +295,12 @@ class HomeController extends AbstractAction |
|
@@ -314,13 +295,12 @@ class HomeController extends AbstractAction |
314
|
|
295
|
|
315
|
$this->echoJson($result);
|
296
|
$this->echoJson($result);
|
316
|
}
|
297
|
}
|
317
|
-
|
|
|
318
|
}
|
298
|
}
|
319
|
|
299
|
|
320
|
/**
|
300
|
/**
|
321
|
* 会员等级展示页
|
301
|
* 会员等级展示页
|
322
|
*/
|
302
|
*/
|
323
|
- public function gradeAction(){
|
303
|
+ public function gradeAction() {
|
324
|
//设置网站seo信息
|
304
|
//设置网站seo信息
|
325
|
$this->setTitle('会员等级');
|
305
|
$this->setTitle('会员等级');
|
326
|
//显示网站导航头部信息
|
306
|
//显示网站导航头部信息
|
|
@@ -328,53 +308,57 @@ class HomeController extends AbstractAction |
|
@@ -328,53 +308,57 @@ class HomeController extends AbstractAction |
328
|
|
308
|
|
329
|
$gender = Helpers::getGenderByCookie();
|
309
|
$gender = Helpers::getGenderByCookie();
|
330
|
$channel = Helpers::getChannelByCookie();
|
310
|
$channel = Helpers::getChannelByCookie();
|
331
|
- $uid = $this -> getUid();
|
|
|
332
|
- $uid = '7566245';//临时测试用
|
|
|
333
|
- $data = GradeModel::getGrade($gender,$channel,$uid);
|
311
|
+ $uid = $this->getUid();
|
|
|
312
|
+ $uid = '7566245'; //临时测试用
|
|
|
313
|
+ $data = GradeModel::getGrade($gender, $channel, $uid);
|
334
|
$data['pageFooter'] = true;
|
314
|
$data['pageFooter'] = true;
|
335
|
- $this -> _view -> display('vip-grade',$data);
|
315
|
+ $this->_view->display('vip-grade', $data);
|
336
|
}
|
316
|
}
|
|
|
317
|
+
|
337
|
/*
|
318
|
/*
|
338
|
- *会员特权查看页
|
319
|
+ * 会员特权查看页
|
339
|
*/
|
320
|
*/
|
340
|
- public function preferentialAction(){
|
321
|
+
|
|
|
322
|
+ public function preferentialAction() {
|
341
|
//设置网站seo信息
|
323
|
//设置网站seo信息
|
342
|
$this->setTitle('会员等级');
|
324
|
$this->setTitle('会员等级');
|
343
|
//显示网站导航头部信息
|
325
|
//显示网站导航头部信息
|
344
|
$this->setNavHeader('会员特权详情');
|
326
|
$this->setNavHeader('会员特权详情');
|
345
|
|
327
|
|
346
|
$channel = Helpers::getChannelByCookie();
|
328
|
$channel = Helpers::getChannelByCookie();
|
347
|
- $uid = $this -> getUid();
|
|
|
348
|
- $data = GradeModel::getPreferential($channel,$uid);
|
329
|
+ $uid = $this->getUid();
|
|
|
330
|
+ $data = GradeModel::getPreferential($channel, $uid);
|
349
|
$data['pageFooter'] = true;
|
331
|
$data['pageFooter'] = true;
|
350
|
- $this -> _view -> display('privilege',$data);
|
332
|
+ $this->_view->display('privilege', $data);
|
351
|
}
|
333
|
}
|
352
|
|
334
|
|
353
|
/*
|
335
|
/*
|
354
|
- *我的订单页面
|
336
|
+ * 我的订单页面
|
355
|
*/
|
337
|
*/
|
356
|
- public function orderAction(){
|
|
|
357
|
|
338
|
|
358
|
- do{
|
|
|
359
|
- //判断是不是ajax请求
|
339
|
+ public function orderAction() {
|
|
|
340
|
+
|
|
|
341
|
+// do {
|
|
|
342
|
+// //判断是不是ajax请求
|
360
|
// if(!$this -> isAjax()){
|
343
|
// if(!$this -> isAjax()){
|
361
|
// break;
|
344
|
// break;
|
362
|
// }
|
345
|
// }
|
363
|
//判断参数是否有效
|
346
|
//判断参数是否有效
|
364
|
- $type = $this -> get('type',1);
|
|
|
365
|
- $page = $this -> get('page',1);
|
|
|
366
|
- $limit = $this -> get('limit',10);
|
347
|
+ $type = $this->get('type', 1);
|
|
|
348
|
+ $page = $this->get('page', 1);
|
|
|
349
|
+ $limit = $this->get('limit', 10);
|
367
|
$gender = Helpers::getGenderByCookie();
|
350
|
$gender = Helpers::getGenderByCookie();
|
368
|
- $yh_channel = $this -> get('yh_channel',1);
|
|
|
369
|
- $uid = $this -> getUid();
|
|
|
370
|
- if(!empty($type) && !is_numeric($type)){
|
351
|
+ $yh_channel = $this->get('yh_channel', 1);
|
|
|
352
|
+ //$uid = $this->getUid();
|
|
|
353
|
+ $uid = '7566245';
|
|
|
354
|
+ if (!empty($type) && !is_numeric($type)) {
|
371
|
break;
|
355
|
break;
|
372
|
}
|
356
|
}
|
373
|
//$data = OrderModel::getOrder();
|
357
|
//$data = OrderModel::getOrder();
|
374
|
- $data = OrderModel::getOrder($type,$page,$limit,$gender,$yh_channel,$uid);
|
|
|
375
|
- //print_r($data);
|
|
|
376
|
- }
|
|
|
377
|
- while(false);
|
358
|
+ $data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid);
|
|
|
359
|
+ print_r($data);
|
|
|
360
|
+ //} while (false);
|
378
|
//$this -> _view -> display('order',$data);
|
361
|
//$this -> _view -> display('order',$data);
|
379
|
}
|
362
|
}
|
|
|
363
|
+
|
380
|
} |
364
|
} |