|
@@ -24,8 +24,7 @@ class HomeController extends AbstractAction |
|
@@ -24,8 +24,7 @@ class HomeController extends AbstractAction |
24
|
/**
|
24
|
/**
|
25
|
* 初始化
|
25
|
* 初始化
|
26
|
*/
|
26
|
*/
|
27
|
- public function init()
|
|
|
28
|
- {
|
27
|
+ public function init() {
|
29
|
// 检查用户是否登录, 未登录则跳转到登录页
|
28
|
// 检查用户是否登录, 未登录则跳转到登录页
|
30
|
$uid = 8826435; //$this->getUid(true);
|
29
|
$uid = 8826435; //$this->getUid(true);
|
31
|
$action = $this->getRequest()->getActionName();
|
30
|
$action = $this->getRequest()->getActionName();
|
|
@@ -39,8 +38,7 @@ class HomeController extends AbstractAction |
|
@@ -39,8 +38,7 @@ class HomeController extends AbstractAction |
39
|
/**
|
38
|
/**
|
40
|
* 个人中心入口
|
39
|
* 个人中心入口
|
41
|
*/
|
40
|
*/
|
42
|
- public function indexAction()
|
|
|
43
|
- {
|
41
|
+ public function indexAction() {
|
44
|
// 设置网站标题
|
42
|
// 设置网站标题
|
45
|
$this->setTitle('个人中心');
|
43
|
$this->setTitle('个人中心');
|
46
|
$this->setNavHeader('个人中心');
|
44
|
$this->setNavHeader('个人中心');
|
|
@@ -66,8 +64,7 @@ class HomeController extends AbstractAction |
|
@@ -66,8 +64,7 @@ class HomeController extends AbstractAction |
66
|
/**
|
64
|
/**
|
67
|
* 用户收藏的商品
|
65
|
* 用户收藏的商品
|
68
|
*/
|
66
|
*/
|
69
|
- public function favoriteAction()
|
|
|
70
|
- {
|
67
|
+ public function favoriteAction() {
|
71
|
// 设置网站标题
|
68
|
// 设置网站标题
|
72
|
$this->setTitle('我的收藏');
|
69
|
$this->setTitle('我的收藏');
|
73
|
$this->setNavHeader('我的收藏', true, SITE_MAIN);
|
70
|
$this->setNavHeader('我的收藏', true, SITE_MAIN);
|
|
@@ -98,8 +95,7 @@ class HomeController extends AbstractAction |
|
@@ -98,8 +95,7 @@ class HomeController extends AbstractAction |
98
|
/**
|
95
|
/**
|
99
|
* 用户收藏的商品-删除
|
96
|
* 用户收藏的商品-删除
|
100
|
*/
|
97
|
*/
|
101
|
- public function favoriteDelAction()
|
|
|
102
|
- {
|
98
|
+ public function favoriteDelAction() {
|
103
|
$result = array();
|
99
|
$result = array();
|
104
|
|
100
|
|
105
|
if ($this->isAjax()) {
|
101
|
if ($this->isAjax()) {
|
|
@@ -119,8 +115,7 @@ class HomeController extends AbstractAction |
|
@@ -119,8 +115,7 @@ class HomeController extends AbstractAction |
119
|
/**
|
115
|
/**
|
120
|
* 个人信息
|
116
|
* 个人信息
|
121
|
*/
|
117
|
*/
|
122
|
- public function personalDetailsAction()
|
|
|
123
|
- {
|
118
|
+ public function personalDetailsAction() {
|
124
|
$this->setTitle('个人信息');
|
119
|
$this->setTitle('个人信息');
|
125
|
$this->setNavHeader('个人信息', true, SITE_MAIN);
|
120
|
$this->setNavHeader('个人信息', true, SITE_MAIN);
|
126
|
|
121
|
|
|
@@ -134,8 +129,7 @@ class HomeController extends AbstractAction |
|
@@ -134,8 +129,7 @@ class HomeController extends AbstractAction |
134
|
/**
|
129
|
/**
|
135
|
* YOHO币
|
130
|
* YOHO币
|
136
|
*/
|
131
|
*/
|
137
|
- public function currencyAction()
|
|
|
138
|
- {
|
132
|
+ public function currencyAction() {
|
139
|
$this->setTitle('YOHO币');
|
133
|
$this->setTitle('YOHO币');
|
140
|
$this->setNavHeader('YOHO币', true, false);
|
134
|
$this->setNavHeader('YOHO币', true, false);
|
141
|
|
135
|
|
|
@@ -149,8 +143,7 @@ class HomeController extends AbstractAction |
|
@@ -149,8 +143,7 @@ class HomeController extends AbstractAction |
149
|
/**
|
143
|
/**
|
150
|
* 优惠券
|
144
|
* 优惠券
|
151
|
*/
|
145
|
*/
|
152
|
- public function couponsAction()
|
|
|
153
|
- {
|
146
|
+ public function couponsAction() {
|
154
|
$this->setTitle('优惠券');
|
147
|
$this->setTitle('优惠券');
|
155
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
148
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
156
|
|
149
|
|
|
@@ -170,8 +163,7 @@ class HomeController extends AbstractAction |
|
@@ -170,8 +163,7 @@ class HomeController extends AbstractAction |
170
|
/**
|
163
|
/**
|
171
|
* 我的消息
|
164
|
* 我的消息
|
172
|
*/
|
165
|
*/
|
173
|
- public function messageAction()
|
|
|
174
|
- {
|
166
|
+ public function messageAction() {
|
175
|
$uid = $this->getUid();
|
167
|
$uid = $this->getUid();
|
176
|
$page = $this->get('page', 0);
|
168
|
$page = $this->get('page', 0);
|
177
|
$size = $this->get('size', 10);
|
169
|
$size = $this->get('size', 10);
|
|
@@ -184,8 +176,7 @@ class HomeController extends AbstractAction |
|
@@ -184,8 +176,7 @@ class HomeController extends AbstractAction |
184
|
/**
|
176
|
/**
|
185
|
* 地址管理
|
177
|
* 地址管理
|
186
|
*/
|
178
|
*/
|
187
|
- public function addressAction()
|
|
|
188
|
- {
|
179
|
+ public function addressAction() {
|
189
|
// 设置网站标题
|
180
|
// 设置网站标题
|
190
|
$this->setTitle('地址管理');
|
181
|
$this->setTitle('地址管理');
|
191
|
$this->setNavHeader('地址管理');
|
182
|
$this->setNavHeader('地址管理');
|
|
@@ -205,8 +196,7 @@ class HomeController extends AbstractAction |
|
@@ -205,8 +196,7 @@ class HomeController extends AbstractAction |
205
|
/**
|
196
|
/**
|
206
|
* 修改地址或者添加新地址
|
197
|
* 修改地址或者添加新地址
|
207
|
*/
|
198
|
*/
|
208
|
- public function saveAddressAction()
|
|
|
209
|
- {
|
199
|
+ public function saveAddressAction() {
|
210
|
$result = array();
|
200
|
$result = array();
|
211
|
|
201
|
|
212
|
if ($this->isAjax()) {
|
202
|
if ($this->isAjax()) {
|
|
@@ -232,8 +222,7 @@ class HomeController extends AbstractAction |
|
@@ -232,8 +222,7 @@ class HomeController extends AbstractAction |
232
|
/**
|
222
|
/**
|
233
|
* 设置默认地址
|
223
|
* 设置默认地址
|
234
|
*/
|
224
|
*/
|
235
|
- public function defaultAddressAction()
|
|
|
236
|
- {
|
225
|
+ public function defaultAddressAction() {
|
237
|
$result = array();
|
226
|
$result = array();
|
238
|
|
227
|
|
239
|
if ($this->isAjax()) {
|
228
|
if ($this->isAjax()) {
|
|
@@ -252,8 +241,7 @@ class HomeController extends AbstractAction |
|
@@ -252,8 +241,7 @@ class HomeController extends AbstractAction |
252
|
/**
|
241
|
/**
|
253
|
* 删除地址
|
242
|
* 删除地址
|
254
|
*/
|
243
|
*/
|
255
|
- public function delAddressAction()
|
|
|
256
|
- {
|
244
|
+ public function delAddressAction() {
|
257
|
$result = array();
|
245
|
$result = array();
|
258
|
|
246
|
|
259
|
if ($this->isAjax()) {
|
247
|
if ($this->isAjax()) {
|
|
@@ -271,8 +259,7 @@ class HomeController extends AbstractAction |
|
@@ -271,8 +259,7 @@ class HomeController extends AbstractAction |
271
|
}
|
259
|
}
|
272
|
|
260
|
|
273
|
//在线客服
|
261
|
//在线客服
|
274
|
- public function onlineServiceAction()
|
|
|
275
|
- {
|
262
|
+ public function onlineServiceAction() {
|
276
|
// 设置网站标题
|
263
|
// 设置网站标题
|
277
|
$this->setTitle('在线客服');
|
264
|
$this->setTitle('在线客服');
|
278
|
$this->setNavHeader('在线客服', true, SITE_MAIN);
|
265
|
$this->setNavHeader('在线客服', true, SITE_MAIN);
|
|
@@ -287,8 +274,7 @@ class HomeController extends AbstractAction |
|
@@ -287,8 +274,7 @@ class HomeController extends AbstractAction |
287
|
}
|
274
|
}
|
288
|
|
275
|
|
289
|
//在线客服-具体详情
|
276
|
//在线客服-具体详情
|
290
|
- public function onlineServiceDetailAction()
|
|
|
291
|
- {
|
277
|
+ public function onlineServiceDetailAction() {
|
292
|
$service = array();
|
278
|
$service = array();
|
293
|
$cateId = $this->get('cateId', 0);
|
279
|
$cateId = $this->get('cateId', 0);
|
294
|
$cateName = $this->get('cateName', '');
|
280
|
$cateName = $this->get('cateName', '');
|
|
@@ -303,8 +289,7 @@ class HomeController extends AbstractAction |
|
@@ -303,8 +289,7 @@ class HomeController extends AbstractAction |
303
|
/**
|
289
|
/**
|
304
|
* 我的逛
|
290
|
* 我的逛
|
305
|
*/
|
291
|
*/
|
306
|
- public function myGuangAction()
|
|
|
307
|
- {
|
292
|
+ public function myGuangAction() {
|
308
|
$page = $this->get('page', 1);
|
293
|
$page = $this->get('page', 1);
|
309
|
$limit = $this->get('limit', 10);
|
294
|
$limit = $this->get('limit', 10);
|
310
|
$uid = $this->getUid();
|
295
|
$uid = $this->getUid();
|
|
@@ -327,8 +312,7 @@ class HomeController extends AbstractAction |
|
@@ -327,8 +312,7 @@ class HomeController extends AbstractAction |
327
|
/**
|
312
|
/**
|
328
|
* 意见反馈
|
313
|
* 意见反馈
|
329
|
*/
|
314
|
*/
|
330
|
- public function suggestAction()
|
|
|
331
|
- {
|
315
|
+ public function suggestAction() {
|
332
|
// 设置网站标题
|
316
|
// 设置网站标题
|
333
|
$this->setTitle('意见反馈');
|
317
|
$this->setTitle('意见反馈');
|
334
|
$this->setNavHeader('意见反馈', true, SITE_MAIN);
|
318
|
$this->setNavHeader('意见反馈', true, SITE_MAIN);
|
|
@@ -350,8 +334,7 @@ class HomeController extends AbstractAction |
|
@@ -350,8 +334,7 @@ class HomeController extends AbstractAction |
350
|
/**
|
334
|
/**
|
351
|
* 意见反馈-提交表单页面
|
335
|
* 意见反馈-提交表单页面
|
352
|
*/
|
336
|
*/
|
353
|
- public function suggestSubAction()
|
|
|
354
|
- {
|
337
|
+ public function suggestSubAction() {
|
355
|
// 设置网站标题
|
338
|
// 设置网站标题
|
356
|
$this->setTitle('反馈问题');
|
339
|
$this->setTitle('反馈问题');
|
357
|
|
340
|
|
|
@@ -372,8 +355,7 @@ class HomeController extends AbstractAction |
|
@@ -372,8 +355,7 @@ class HomeController extends AbstractAction |
372
|
/**
|
355
|
/**
|
373
|
* 异步上传图片
|
356
|
* 异步上传图片
|
374
|
*/
|
357
|
*/
|
375
|
- public function suggestimgUploadAction()
|
|
|
376
|
- {
|
358
|
+ public function suggestimgUploadAction() {
|
377
|
//$filename = $this->post('filename', '');
|
359
|
//$filename = $this->post('filename', '');
|
378
|
$result = UserModel::saveSuggestImg('fileData');
|
360
|
$result = UserModel::saveSuggestImg('fileData');
|
379
|
|
361
|
|
|
@@ -383,8 +365,7 @@ class HomeController extends AbstractAction |
|
@@ -383,8 +365,7 @@ class HomeController extends AbstractAction |
383
|
/**
|
365
|
/**
|
384
|
* 异步保存意见反馈数据
|
366
|
* 异步保存意见反馈数据
|
385
|
*/
|
367
|
*/
|
386
|
- public function savesuggestAction()
|
|
|
387
|
- {
|
368
|
+ public function savesuggestAction() {
|
388
|
if ($this->isAjax()) {
|
369
|
if ($this->isAjax()) {
|
389
|
$uid = $this->getUid();
|
370
|
$uid = $this->getUid();
|
390
|
$content = $this->post('content', '');
|
371
|
$content = $this->post('content', '');
|
|
@@ -399,8 +380,7 @@ class HomeController extends AbstractAction |
|
@@ -399,8 +380,7 @@ class HomeController extends AbstractAction |
399
|
/**
|
380
|
/**
|
400
|
* 异步点击靠谱或者不靠谱
|
381
|
* 异步点击靠谱或者不靠谱
|
401
|
*/
|
382
|
*/
|
402
|
- public function upAndDownAction()
|
|
|
403
|
- {
|
383
|
+ public function upAndDownAction() {
|
404
|
if ($this->isAjax()) {
|
384
|
if ($this->isAjax()) {
|
405
|
$uid = $this->getUid();
|
385
|
$uid = $this->getUid();
|
406
|
$udid = $this->getUdid();
|
386
|
$udid = $this->getUdid();
|
|
@@ -414,8 +394,7 @@ class HomeController extends AbstractAction |
|
@@ -414,8 +394,7 @@ class HomeController extends AbstractAction |
414
|
/**
|
394
|
/**
|
415
|
* 会员等级展示页
|
395
|
* 会员等级展示页
|
416
|
*/
|
396
|
*/
|
417
|
- public function gradeAction()
|
|
|
418
|
- {
|
397
|
+ public function gradeAction() {
|
419
|
//设置网站seo信息
|
398
|
//设置网站seo信息
|
420
|
$this->setTitle('会员等级');
|
399
|
$this->setTitle('会员等级');
|
421
|
//显示网站导航头部信息
|
400
|
//显示网站导航头部信息
|
|
@@ -430,8 +409,8 @@ class HomeController extends AbstractAction |
|
@@ -430,8 +409,8 @@ class HomeController extends AbstractAction |
430
|
/*
|
409
|
/*
|
431
|
* 会员特权查看页
|
410
|
* 会员特权查看页
|
432
|
*/
|
411
|
*/
|
433
|
- public function preferentialAction()
|
|
|
434
|
- {
|
412
|
+
|
|
|
413
|
+ public function preferentialAction() {
|
435
|
//设置网站seo信息
|
414
|
//设置网站seo信息
|
436
|
$this->setTitle('会员等级');
|
415
|
$this->setTitle('会员等级');
|
437
|
//显示网站导航头部信息
|
416
|
//显示网站导航头部信息
|
|
@@ -445,8 +424,8 @@ class HomeController extends AbstractAction |
|
@@ -445,8 +424,8 @@ class HomeController extends AbstractAction |
445
|
/*
|
424
|
/*
|
446
|
* 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders)
|
425
|
* 我的订单页面,获得nav导航条焦点。并且异步请求订单详情列表页(getOrders)
|
447
|
*/
|
426
|
*/
|
448
|
- public function orderAction()
|
|
|
449
|
- {
|
427
|
+
|
|
|
428
|
+ public function orderAction() {
|
450
|
//获得type值,type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论。
|
429
|
//获得type值,type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论。
|
451
|
$type = $this->get('type', 1);
|
430
|
$type = $this->get('type', 1);
|
452
|
$this->setTitle('我的订单');
|
431
|
$this->setTitle('我的订单');
|
|
@@ -466,17 +445,17 @@ class HomeController extends AbstractAction |
|
@@ -466,17 +445,17 @@ class HomeController extends AbstractAction |
466
|
}
|
445
|
}
|
467
|
|
446
|
|
468
|
//ajax请求订单页面
|
447
|
//ajax请求订单页面
|
469
|
- public function getOrdersAction()
|
|
|
470
|
- {
|
448
|
+ public function getOrdersAction() {
|
471
|
//判断是不是ajax请求
|
449
|
//判断是不是ajax请求
|
472
|
if (!$this->isAjax()) {
|
450
|
if (!$this->isAjax()) {
|
473
|
$this->error();
|
451
|
$this->error();
|
474
|
}
|
452
|
}
|
475
|
- //获取基本参数:type:1=>全部,2=>待付款,3=>待发货,4=>待收货,5=>待评论
|
453
|
+ //获取基本参数:type 1:全部 2:待付款 3:待发货 4:待收货 5:待评论 7:失败 取消 订单
|
476
|
$type = $this->get('type', 1);
|
454
|
$type = $this->get('type', 1);
|
477
|
$page = $this->get('page', 1);
|
455
|
$page = $this->get('page', 1);
|
478
|
$limit = $this->get('limit', 10);
|
456
|
$limit = $this->get('limit', 10);
|
479
|
$uid = $this->getUid();
|
457
|
$uid = $this->getUid();
|
|
|
458
|
+ $uid = '12';//测试数据
|
480
|
//调用模型层getOrder方法获得并处理数据
|
459
|
//调用模型层getOrder方法获得并处理数据
|
481
|
$data = OrderModel::getOrder($type, $page, $limit, $uid);
|
460
|
$data = OrderModel::getOrder($type, $page, $limit, $uid);
|
482
|
/* 如果取不到订单数据时,分两种情况:
|
461
|
/* 如果取不到订单数据时,分两种情况:
|
|
@@ -501,8 +480,7 @@ class HomeController extends AbstractAction |
|
@@ -501,8 +480,7 @@ class HomeController extends AbstractAction |
501
|
* 我的订单-取消订单
|
480
|
* 我的订单-取消订单
|
502
|
*/
|
481
|
*/
|
503
|
|
482
|
|
504
|
- public function cancelOrderAction()
|
|
|
505
|
- {
|
483
|
+ public function cancelOrderAction() {
|
506
|
|
484
|
|
507
|
//判断是不是ajax请求
|
485
|
//判断是不是ajax请求
|
508
|
if (!$this->isAjax()) {
|
486
|
if (!$this->isAjax()) {
|
|
@@ -524,8 +502,7 @@ class HomeController extends AbstractAction |
|
@@ -524,8 +502,7 @@ class HomeController extends AbstractAction |
524
|
* 我的订单-删除订单
|
502
|
* 我的订单-删除订单
|
525
|
*/
|
503
|
*/
|
526
|
|
504
|
|
527
|
- public function delOrderAction()
|
|
|
528
|
- {
|
505
|
+ public function delOrderAction() {
|
529
|
//判断是不是ajax请求
|
506
|
//判断是不是ajax请求
|
530
|
if (!$this->isAjax()) {
|
507
|
if (!$this->isAjax()) {
|
531
|
$this->error();
|
508
|
$this->error();
|
|
@@ -546,8 +523,7 @@ class HomeController extends AbstractAction |
|
@@ -546,8 +523,7 @@ class HomeController extends AbstractAction |
546
|
* 我的订单-支付链接获取
|
523
|
* 我的订单-支付链接获取
|
547
|
*/
|
524
|
*/
|
548
|
|
525
|
|
549
|
- private function paymentAction()
|
|
|
550
|
- {
|
526
|
+ private function paymentAction() {
|
551
|
$gender = Helpers::getGenderByCookie();
|
527
|
$gender = Helpers::getGenderByCookie();
|
552
|
$yh_channel = $this->get('yh_channel', 1);
|
528
|
$yh_channel = $this->get('yh_channel', 1);
|
553
|
OrderModel::payment($gender, $yh_channel);
|
529
|
OrderModel::payment($gender, $yh_channel);
|
|
@@ -557,8 +533,7 @@ class HomeController extends AbstractAction |
|
@@ -557,8 +533,7 @@ class HomeController extends AbstractAction |
557
|
* 我的订单-随便逛逛链接获取
|
533
|
* 我的订单-随便逛逛链接获取
|
558
|
*/
|
534
|
*/
|
559
|
|
535
|
|
560
|
- private function strollAction()
|
|
|
561
|
- {
|
536
|
+ private function strollAction() {
|
562
|
//获取性别、频道数据
|
537
|
//获取性别、频道数据
|
563
|
$gender = Helpers::getGenderByCookie();
|
538
|
$gender = Helpers::getGenderByCookie();
|
564
|
$yh_channel = $this->get('yh_channel', 1);
|
539
|
$yh_channel = $this->get('yh_channel', 1);
|
|
@@ -570,8 +545,7 @@ class HomeController extends AbstractAction |
|
@@ -570,8 +545,7 @@ class HomeController extends AbstractAction |
570
|
/**
|
545
|
/**
|
571
|
* 订单详情页
|
546
|
* 订单详情页
|
572
|
*/
|
547
|
*/
|
573
|
- public function orderDetailAction()
|
|
|
574
|
- {
|
548
|
+ public function orderDetailAction() {
|
575
|
$data = array(
|
549
|
$data = array(
|
576
|
'name' => '毛毛莉Lydia',
|
550
|
'name' => '毛毛莉Lydia',
|
577
|
'phoneNum' => '18600001133',
|
551
|
'phoneNum' => '18600001133',
|