|
@@ -82,7 +82,8 @@ class HomeController extends AbstractAction |
|
@@ -82,7 +82,8 @@ class HomeController extends AbstractAction |
82
|
|
82
|
|
83
|
if (empty($result)) {
|
83
|
if (empty($result)) {
|
84
|
echo ' ';
|
84
|
echo ' ';
|
85
|
- } else {
|
85
|
+ }
|
|
|
86
|
+ else {
|
86
|
$this->_view->display('recommend-content', $result);
|
87
|
$this->_view->display('recommend-content', $result);
|
87
|
}
|
88
|
}
|
88
|
}
|
89
|
}
|
|
@@ -127,9 +128,11 @@ class HomeController extends AbstractAction |
|
@@ -127,9 +128,11 @@ class HomeController extends AbstractAction |
127
|
|
128
|
|
128
|
if (empty($result)) {
|
129
|
if (empty($result)) {
|
129
|
echo ' ';
|
130
|
echo ' ';
|
130
|
- } else if (isset($result['end'])) {
|
131
|
+ }
|
|
|
132
|
+ else if (isset($result['end'])) {
|
131
|
echo 'end';
|
133
|
echo 'end';
|
132
|
- } else {
|
134
|
+ }
|
|
|
135
|
+ else {
|
133
|
$this->_view->display('favorite_product', $result);
|
136
|
$this->_view->display('favorite_product', $result);
|
134
|
}
|
137
|
}
|
135
|
}
|
138
|
}
|
|
@@ -150,9 +153,11 @@ class HomeController extends AbstractAction |
|
@@ -150,9 +153,11 @@ class HomeController extends AbstractAction |
150
|
|
153
|
|
151
|
if (empty($result)) {
|
154
|
if (empty($result)) {
|
152
|
echo ' ';
|
155
|
echo ' ';
|
153
|
- } else if (isset($result['end'])) {
|
156
|
+ }
|
|
|
157
|
+ else if (isset($result['end'])) {
|
154
|
echo 'end';
|
158
|
echo 'end';
|
155
|
- } else {
|
159
|
+ }
|
|
|
160
|
+ else {
|
156
|
$this->_view->display('favorite_brand', $result);
|
161
|
$this->_view->display('favorite_brand', $result);
|
157
|
}
|
162
|
}
|
158
|
}
|
163
|
}
|
|
@@ -172,7 +177,8 @@ class HomeController extends AbstractAction |
|
@@ -172,7 +177,8 @@ class HomeController extends AbstractAction |
172
|
|
177
|
|
173
|
if (empty($result)) {
|
178
|
if (empty($result)) {
|
174
|
echo ' ';
|
179
|
echo ' ';
|
175
|
- } else {
|
180
|
+ }
|
|
|
181
|
+ else {
|
176
|
$this->echoJson($result);
|
182
|
$this->echoJson($result);
|
177
|
}
|
183
|
}
|
178
|
}
|
184
|
}
|
|
@@ -211,7 +217,8 @@ class HomeController extends AbstractAction |
|
@@ -211,7 +217,8 @@ class HomeController extends AbstractAction |
211
|
|
217
|
|
212
|
if (empty($result)) {
|
218
|
if (empty($result)) {
|
213
|
echo ' ';
|
219
|
echo ' ';
|
214
|
- } else {
|
220
|
+ }
|
|
|
221
|
+ else {
|
215
|
$this->_view->display('browse-record-content', $result);
|
222
|
$this->_view->display('browse-record-content', $result);
|
216
|
}
|
223
|
}
|
217
|
}
|
224
|
}
|
|
@@ -289,6 +296,7 @@ class HomeController extends AbstractAction |
|
@@ -289,6 +296,7 @@ class HomeController extends AbstractAction |
289
|
/*
|
296
|
/*
|
290
|
* 异步获取我的消息
|
297
|
* 异步获取我的消息
|
291
|
*/
|
298
|
*/
|
|
|
299
|
+
|
292
|
public function ajaxMessageAction()
|
300
|
public function ajaxMessageAction()
|
293
|
{
|
301
|
{
|
294
|
$result = array();
|
302
|
$result = array();
|
|
@@ -301,7 +309,8 @@ class HomeController extends AbstractAction |
|
@@ -301,7 +309,8 @@ class HomeController extends AbstractAction |
301
|
|
309
|
|
302
|
if (empty($result)) {
|
310
|
if (empty($result)) {
|
303
|
echo ' ';
|
311
|
echo ' ';
|
304
|
- } else {
|
312
|
+ }
|
|
|
313
|
+ else {
|
305
|
$this->_view->display('message-list', $result);
|
314
|
$this->_view->display('message-list', $result);
|
306
|
}
|
315
|
}
|
307
|
}
|
316
|
}
|
|
@@ -309,6 +318,7 @@ class HomeController extends AbstractAction |
|
@@ -309,6 +318,7 @@ class HomeController extends AbstractAction |
309
|
/*
|
318
|
/*
|
310
|
* 异步删除我的消息
|
319
|
* 异步删除我的消息
|
311
|
*/
|
320
|
*/
|
|
|
321
|
+
|
312
|
public function ajaxDelMesAction()
|
322
|
public function ajaxDelMesAction()
|
313
|
{
|
323
|
{
|
314
|
$result = array();
|
324
|
$result = array();
|
|
@@ -395,7 +405,8 @@ class HomeController extends AbstractAction |
|
@@ -395,7 +405,8 @@ class HomeController extends AbstractAction |
395
|
|
405
|
|
396
|
if (empty($result)) {
|
406
|
if (empty($result)) {
|
397
|
echo ' ';
|
407
|
echo ' ';
|
398
|
- } else {
|
408
|
+ }
|
|
|
409
|
+ else {
|
399
|
$this->_view->display('coupon_list', $result);
|
410
|
$this->_view->display('coupon_list', $result);
|
400
|
}
|
411
|
}
|
401
|
}
|
412
|
}
|
|
@@ -414,7 +425,8 @@ class HomeController extends AbstractAction |
|
@@ -414,7 +425,8 @@ class HomeController extends AbstractAction |
414
|
|
425
|
|
415
|
if (empty($result)) {
|
426
|
if (empty($result)) {
|
416
|
echo ' ';
|
427
|
echo ' ';
|
417
|
- } else {
|
428
|
+ }
|
|
|
429
|
+ else {
|
418
|
$this->_view->display('location-list', $result);
|
430
|
$this->_view->display('location-list', $result);
|
419
|
}
|
431
|
}
|
420
|
}
|
432
|
}
|
|
@@ -491,7 +503,8 @@ class HomeController extends AbstractAction |
|
@@ -491,7 +503,8 @@ class HomeController extends AbstractAction |
491
|
$data['id'] = $id;
|
503
|
$data['id'] = $id;
|
492
|
// 获取特定地址的数据
|
504
|
// 获取特定地址的数据
|
493
|
$data['address'] = UserModel::getAddressDataById($uid, $id);
|
505
|
$data['address'] = UserModel::getAddressDataById($uid, $id);
|
494
|
- } else {
|
506
|
+ }
|
|
|
507
|
+ else {
|
495
|
// 设置网站标题
|
508
|
// 设置网站标题
|
496
|
$this->setTitle('添加地址');
|
509
|
$this->setTitle('添加地址');
|
497
|
$this->setNavHeader('添加地址', true, false);
|
510
|
$this->setNavHeader('添加地址', true, false);
|
|
@@ -522,7 +535,8 @@ class HomeController extends AbstractAction |
|
@@ -522,7 +535,8 @@ class HomeController extends AbstractAction |
522
|
|
535
|
|
523
|
if (empty($result)) {
|
536
|
if (empty($result)) {
|
524
|
echo ' ';
|
537
|
echo ' ';
|
525
|
- } else {
|
538
|
+ }
|
|
|
539
|
+ else {
|
526
|
$this->echoJson($result);
|
540
|
$this->echoJson($result);
|
527
|
}
|
541
|
}
|
528
|
}
|
542
|
}
|
|
@@ -542,7 +556,8 @@ class HomeController extends AbstractAction |
|
@@ -542,7 +556,8 @@ class HomeController extends AbstractAction |
542
|
|
556
|
|
543
|
if (empty($result)) {
|
557
|
if (empty($result)) {
|
544
|
echo ' ';
|
558
|
echo ' ';
|
545
|
- } else {
|
559
|
+ }
|
|
|
560
|
+ else {
|
546
|
$this->echoJson($result);
|
561
|
$this->echoJson($result);
|
547
|
}
|
562
|
}
|
548
|
}
|
563
|
}
|
|
@@ -562,7 +577,8 @@ class HomeController extends AbstractAction |
|
@@ -562,7 +577,8 @@ class HomeController extends AbstractAction |
562
|
|
577
|
|
563
|
if (empty($result)) {
|
578
|
if (empty($result)) {
|
564
|
echo ' ';
|
579
|
echo ' ';
|
565
|
- } else {
|
580
|
+ }
|
|
|
581
|
+ else {
|
566
|
$this->echoJson($result);
|
582
|
$this->echoJson($result);
|
567
|
}
|
583
|
}
|
568
|
}
|
584
|
}
|
|
@@ -633,9 +649,11 @@ class HomeController extends AbstractAction |
|
@@ -633,9 +649,11 @@ class HomeController extends AbstractAction |
633
|
$this->setTitle('我收藏的');
|
649
|
$this->setTitle('我收藏的');
|
634
|
$this->setNavHeader('我收藏的', true, '');
|
650
|
$this->setNavHeader('我收藏的', true, '');
|
635
|
$this->_view->display('my-guang', array('myGuangPage' => true, 'myGuang' => array('infos' => $guangInfo), 'pageFooter' => true));
|
651
|
$this->_view->display('my-guang', array('myGuangPage' => true, 'myGuang' => array('infos' => $guangInfo), 'pageFooter' => true));
|
636
|
- } else if ($page > 1 && $page <= $totalPage) {
|
652
|
+ }
|
|
|
653
|
+ else if ($page > 1 && $page <= $totalPage) {
|
637
|
$this->_view->display('my-guang-partial', array('infos' => $guangInfo));
|
654
|
$this->_view->display('my-guang-partial', array('infos' => $guangInfo));
|
638
|
- } else if ($page > 1 && $page > $totalPage) {
|
655
|
+ }
|
|
|
656
|
+ else if ($page > 1 && $page > $totalPage) {
|
639
|
echo ' '; //退出循环
|
657
|
echo ' '; //退出循环
|
640
|
}
|
658
|
}
|
641
|
}
|
659
|
}
|
|
@@ -818,9 +836,11 @@ class HomeController extends AbstractAction |
|
@@ -818,9 +836,11 @@ class HomeController extends AbstractAction |
818
|
$order = array();
|
836
|
$order = array();
|
819
|
if (!empty($data)) {
|
837
|
if (!empty($data)) {
|
820
|
$order['orders'] = $data;
|
838
|
$order['orders'] = $data;
|
821
|
- } else if ($page == 1) {
|
839
|
+ }
|
|
|
840
|
+ else if ($page == 1) {
|
822
|
$order['walkwayUrl'] = Helpers::url('/product/new');
|
841
|
$order['walkwayUrl'] = Helpers::url('/product/new');
|
823
|
- } else {
|
842
|
+ }
|
|
|
843
|
+ else {
|
824
|
echo ' ';
|
844
|
echo ' ';
|
825
|
exit();
|
845
|
exit();
|
826
|
}
|
846
|
}
|
|
@@ -850,9 +870,11 @@ class HomeController extends AbstractAction |
|
@@ -850,9 +870,11 @@ class HomeController extends AbstractAction |
850
|
//将取消状态返回至浏览器
|
870
|
//将取消状态返回至浏览器
|
851
|
if (!$data) {
|
871
|
if (!$data) {
|
852
|
$this->echoJson(array('message' => '取消订单失败'));
|
872
|
$this->echoJson(array('message' => '取消订单失败'));
|
853
|
- } else if (empty($data['code']) && empty($data['message'])) {
|
873
|
+ }
|
|
|
874
|
+ else if (empty($data['code']) && empty($data['message'])) {
|
854
|
$this->echoJson(array('code' => 200));
|
875
|
$this->echoJson(array('code' => 200));
|
855
|
- } else {
|
876
|
+ }
|
|
|
877
|
+ else {
|
856
|
$this->echoJson($data);
|
878
|
$this->echoJson($data);
|
857
|
}
|
879
|
}
|
858
|
}
|
880
|
}
|
|
@@ -878,7 +900,8 @@ class HomeController extends AbstractAction |
|
@@ -878,7 +900,8 @@ class HomeController extends AbstractAction |
878
|
//将订单删除状态返回至浏览器
|
900
|
//将订单删除状态返回至浏览器
|
879
|
if (empty($data['code']) && empty($data['message'])) {
|
901
|
if (empty($data['code']) && empty($data['message'])) {
|
880
|
$this->echoJson(array('code' => 200));
|
902
|
$this->echoJson(array('code' => 200));
|
881
|
- } else {
|
903
|
+ }
|
|
|
904
|
+ else {
|
882
|
$this->echoJson($data);
|
905
|
$this->echoJson($data);
|
883
|
}
|
906
|
}
|
884
|
}
|
907
|
}
|
|
@@ -1008,8 +1031,8 @@ class HomeController extends AbstractAction |
|
@@ -1008,8 +1031,8 @@ class HomeController extends AbstractAction |
1008
|
$input->SetBody('有货订单号:' . $orderCode);
|
1031
|
$input->SetBody('有货订单号:' . $orderCode);
|
1009
|
$input->SetOut_trade_no('YOHOBuy_' . $orderCode); // 商户订单号
|
1032
|
$input->SetOut_trade_no('YOHOBuy_' . $orderCode); // 商户订单号
|
1010
|
$input->SetTotal_fee($totalFee);
|
1033
|
$input->SetTotal_fee($totalFee);
|
1011
|
- $input->SetTime_start(date("YmdHis", (int)$orderDetail['data']['create_time']));
|
|
|
1012
|
- $input->SetTime_expire(date("YmdHis", (int)$orderDetail['data']['create_time'] + 7200));
|
1034
|
+ $input->SetTime_start(date("YmdHis", (int) $orderDetail['data']['create_time']));
|
|
|
1035
|
+ $input->SetTime_expire(date("YmdHis", (int) $orderDetail['data']['create_time'] + 7200));
|
1013
|
$input->SetNotify_url(WxPayConfig::NOTIFY_URL);
|
1036
|
$input->SetNotify_url(WxPayConfig::NOTIFY_URL);
|
1014
|
$input->SetTrade_type("JSAPI");
|
1037
|
$input->SetTrade_type("JSAPI");
|
1015
|
$input->SetOpenid($openId);
|
1038
|
$input->SetOpenid($openId);
|
|
@@ -1017,7 +1040,8 @@ class HomeController extends AbstractAction |
|
@@ -1017,7 +1040,8 @@ class HomeController extends AbstractAction |
1017
|
$jsApiParameters = $tools->GetJsApiParameters($order);
|
1040
|
$jsApiParameters = $tools->GetJsApiParameters($order);
|
1018
|
|
1041
|
|
1019
|
$this->echoJson(array('code' => 200, 'data' => array('jsApiParameters' => json_decode($jsApiParameters))));
|
1042
|
$this->echoJson(array('code' => 200, 'data' => array('jsApiParameters' => json_decode($jsApiParameters))));
|
1020
|
- } while (false);
|
1043
|
+ }
|
|
|
1044
|
+ while (false);
|
1021
|
}
|
1045
|
}
|
1022
|
|
1046
|
|
1023
|
// /*
|
1047
|
// /*
|
|
@@ -1059,19 +1083,6 @@ class HomeController extends AbstractAction |
|
@@ -1059,19 +1083,6 @@ class HomeController extends AbstractAction |
1059
|
//以下是添加的测试数据
|
1083
|
//以下是添加的测试数据
|
1060
|
$orderDetail['hasChanged'] = 'false';
|
1084
|
$orderDetail['hasChanged'] = 'false';
|
1061
|
|
1085
|
|
1062
|
- //以下是判断能否修改地址
|
|
|
1063
|
- if ($orderDetail['orderStatus'] === '待付款' || $orderDetail['orderStatus'] === '备货中' ) {
|
|
|
1064
|
- if ($orderDetail['hasChanged'] === 'false') {
|
|
|
1065
|
- $changeable = 'true';
|
|
|
1066
|
- }else{
|
|
|
1067
|
- $changeable = 'false';
|
|
|
1068
|
- }
|
|
|
1069
|
- }else{
|
|
|
1070
|
- $changeable = 'false';
|
|
|
1071
|
- }
|
|
|
1072
|
-
|
|
|
1073
|
- $orderDetail['changeable'] = $changeable;
|
|
|
1074
|
-
|
|
|
1075
|
$this->_view->display('order-detail', array(
|
1086
|
$this->_view->display('order-detail', array(
|
1076
|
'orderDetailPage' => true,
|
1087
|
'orderDetailPage' => true,
|
1077
|
'serviceUrl' => 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=',
|
1088
|
'serviceUrl' => 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&info=',
|
|
@@ -1086,6 +1097,35 @@ class HomeController extends AbstractAction |
|
@@ -1086,6 +1097,35 @@ class HomeController extends AbstractAction |
1086
|
}
|
1097
|
}
|
1087
|
|
1098
|
|
1088
|
/**
|
1099
|
/**
|
|
|
1100
|
+ * 订单详情页地址修改
|
|
|
1101
|
+ */
|
|
|
1102
|
+ public function selectAddress()
|
|
|
1103
|
+ {
|
|
|
1104
|
+ $result = array('code' => 400, 'message' => '', 'data' => '');
|
|
|
1105
|
+
|
|
|
1106
|
+ do {
|
|
|
1107
|
+ /* 判断是不是AJAX请求 */
|
|
|
1108
|
+ if (!$this->isAjax()) {
|
|
|
1109
|
+ break;
|
|
|
1110
|
+ }
|
|
|
1111
|
+ //获取相关参数
|
|
|
1112
|
+ $uid = $this->getUid(true);
|
|
|
1113
|
+ $id = $this->get('id', '');
|
|
|
1114
|
+ if (!$uid || !$id) {
|
|
|
1115
|
+ $result = array('code' => 400, 'message' => '缺失必填项', 'data' => '');
|
|
|
1116
|
+ break;
|
|
|
1117
|
+ }
|
|
|
1118
|
+ $result = AddressData::deleteAddress($uid, $id);
|
|
|
1119
|
+ if (!isset($result['code'])) {
|
|
|
1120
|
+ break;
|
|
|
1121
|
+ }
|
|
|
1122
|
+ }
|
|
|
1123
|
+ while (false);
|
|
|
1124
|
+
|
|
|
1125
|
+ $this->echoJson($result);
|
|
|
1126
|
+ }
|
|
|
1127
|
+
|
|
|
1128
|
+ /**
|
1089
|
* 帮助中心列表页
|
1129
|
* 帮助中心列表页
|
1090
|
*/
|
1130
|
*/
|
1091
|
public function helpAction()
|
1131
|
public function helpAction()
|
|
@@ -1154,8 +1194,10 @@ class HomeController extends AbstractAction |
|
@@ -1154,8 +1194,10 @@ class HomeController extends AbstractAction |
1154
|
'pageFooter' => true,
|
1194
|
'pageFooter' => true,
|
1155
|
'currencyDetailPage' => true
|
1195
|
'currencyDetailPage' => true
|
1156
|
));
|
1196
|
));
|
1157
|
- } else {
|
1197
|
+ }
|
|
|
1198
|
+ else {
|
1158
|
echo ' ';
|
1199
|
echo ' ';
|
1159
|
}
|
1200
|
}
|
1160
|
}
|
1201
|
}
|
|
|
1202
|
+
|
1161
|
} |
1203
|
} |