|
@@ -18,10 +18,27 @@ use LibModels\Wap\Home\OrderData; |
|
@@ -18,10 +18,27 @@ use LibModels\Wap\Home\OrderData; |
18
|
class HomeController extends AbstractAction
|
18
|
class HomeController extends AbstractAction
|
19
|
{
|
19
|
{
|
20
|
|
20
|
|
|
|
21
|
+ protected $_uid;
|
|
|
22
|
+
|
|
|
23
|
+// /**
|
|
|
24
|
+// * 初始化
|
|
|
25
|
+// */
|
|
|
26
|
+// public function init()
|
|
|
27
|
+// {
|
|
|
28
|
+// // 检查用户是否登录, 未登录则跳转到登录页
|
|
|
29
|
+// $uid = $this->getUid(true);
|
|
|
30
|
+// if (!$uid) {
|
|
|
31
|
+// $this->go(Helpers::url('/signin.html'));
|
|
|
32
|
+// }
|
|
|
33
|
+//
|
|
|
34
|
+// parent::init();
|
|
|
35
|
+// }
|
|
|
36
|
+
|
21
|
/**
|
37
|
/**
|
22
|
* 个人中心入口
|
38
|
* 个人中心入口
|
23
|
*/
|
39
|
*/
|
24
|
- public function indexAction() {
|
40
|
+ public function indexAction()
|
|
|
41
|
+ {
|
25
|
// 设置网站标题
|
42
|
// 设置网站标题
|
26
|
$this->setTitle('个人中心');
|
43
|
$this->setTitle('个人中心');
|
27
|
$this->setNavHeader('个人中心', true, SITE_MAIN);
|
44
|
$this->setNavHeader('个人中心', true, SITE_MAIN);
|
|
@@ -45,131 +62,54 @@ class HomeController extends AbstractAction |
|
@@ -45,131 +62,54 @@ class HomeController extends AbstractAction |
45
|
/**
|
62
|
/**
|
46
|
* 用户收藏的商品
|
63
|
* 用户收藏的商品
|
47
|
*/
|
64
|
*/
|
48
|
- public function favoriteAction() {
|
65
|
+ public function favoriteAction()
|
|
|
66
|
+ {
|
|
|
67
|
+ // 设置网站标题
|
|
|
68
|
+ $this->setTitle('我的收藏');
|
|
|
69
|
+ $this->setNavHeader('我的收藏', true, SITE_MAIN);
|
|
|
70
|
+
|
49
|
$uid = $this->getUid();
|
71
|
$uid = $this->getUid();
|
|
|
72
|
+ $uid = 8826435;
|
|
|
73
|
+ $gender = Helpers::getGenderByCookie();
|
50
|
|
74
|
|
51
|
$favProducts = \Index\UserModel::getFavProductData($uid);
|
75
|
$favProducts = \Index\UserModel::getFavProductData($uid);
|
52
|
-
|
|
|
53
|
- //print_r($favProducts);
|
76
|
+ $favBrands = \Index\UserModel::getFavBrandData($uid, $gender);
|
54
|
|
77
|
|
55
|
$this->_view->display('favorite', array(
|
78
|
$this->_view->display('favorite', array(
|
56
|
'favPage' => true, //加载js
|
79
|
'favPage' => true, //加载js
|
57
|
- 'pageHeader' => array(
|
|
|
58
|
- 'navBack' => true,
|
|
|
59
|
- 'navTitle' => '我的收藏',
|
|
|
60
|
- 'navHome' => true
|
|
|
61
|
- ),
|
|
|
62
|
'pageFooter' => true,
|
80
|
'pageFooter' => true,
|
63
|
'favorite' => true,
|
81
|
'favorite' => true,
|
64
|
- 'hasFavProduct' => array(
|
|
|
65
|
- '0' => array(
|
|
|
66
|
- 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
67
|
- 'title' => 'adidas Originals ZX FLUXM22508 ',
|
|
|
68
|
- 'price' => '¥800',
|
|
|
69
|
- 'discountPrice' => false,
|
|
|
70
|
- 'savePrice' => false,
|
|
|
71
|
- 'sellOut' => true
|
|
|
72
|
- ),
|
|
|
73
|
- '1' => array(
|
|
|
74
|
- 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
75
|
- 'title' => 'adidas Originals ZX FLUXM22508 ',
|
|
|
76
|
- 'price' => '¥800',
|
|
|
77
|
- 'discountPrice' => '¥500',
|
|
|
78
|
- 'savePrice' => '¥300',
|
|
|
79
|
- 'sellOut' => false
|
|
|
80
|
- )
|
|
|
81
|
- ),
|
|
|
82
|
- 'hasFavBrand' => array(
|
|
|
83
|
- '0' => array(
|
|
|
84
|
- 'id' => '1',
|
|
|
85
|
- 'brandImg' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
86
|
- 'brandName' => 'VANS',
|
|
|
87
|
- 'update' => 12,
|
|
|
88
|
- 'discount' => 10,
|
|
|
89
|
- 'link' => '#',
|
|
|
90
|
- 'productList' => array(
|
|
|
91
|
- '0' => array(
|
|
|
92
|
- 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
93
|
- 'price' => '¥240',
|
|
|
94
|
- 'discount' => '¥240'
|
|
|
95
|
- ),
|
|
|
96
|
- '1' => array(
|
|
|
97
|
- 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
98
|
- 'price' => '¥240',
|
|
|
99
|
- 'discount' => '¥240'
|
|
|
100
|
- ),
|
|
|
101
|
- '2' => array(
|
|
|
102
|
- 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
103
|
- 'price' => '¥240',
|
|
|
104
|
- 'discount' => '¥240'
|
|
|
105
|
- ),
|
|
|
106
|
- '3' => array(
|
|
|
107
|
- 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
108
|
- 'price' => '¥240',
|
|
|
109
|
- 'discount' => '¥240'
|
|
|
110
|
- )
|
|
|
111
|
- )
|
|
|
112
|
- ),
|
|
|
113
|
- '1' => array(
|
|
|
114
|
- 'id' => '2',
|
|
|
115
|
- 'brandImg' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
116
|
- 'brandName' => 'VANS',
|
|
|
117
|
- 'update' => 12,
|
|
|
118
|
- 'discount' => 10,
|
|
|
119
|
- 'link' => '#',
|
|
|
120
|
- 'productList' => array(
|
|
|
121
|
- '0' => array(
|
|
|
122
|
- 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
123
|
- 'price' => '¥240',
|
|
|
124
|
- 'discount' => '¥240'
|
|
|
125
|
- ),
|
|
|
126
|
- '1' => array(
|
|
|
127
|
- 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
128
|
- 'price' => '¥240',
|
|
|
129
|
- 'discount' => '¥240'
|
|
|
130
|
- ),
|
|
|
131
|
- '2' => array(
|
|
|
132
|
- 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
133
|
- 'price' => '¥240',
|
|
|
134
|
- 'discount' => '¥240'
|
|
|
135
|
- ),
|
|
|
136
|
- '3' => array(
|
|
|
137
|
- 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
138
|
- 'price' => '¥240',
|
|
|
139
|
- 'discount' => '¥240'
|
|
|
140
|
- )
|
|
|
141
|
- )
|
|
|
142
|
- ),
|
|
|
143
|
- '2' => array(
|
|
|
144
|
- 'id' => '3',
|
|
|
145
|
- 'brandImg' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
146
|
- 'brandName' => 'VANS',
|
|
|
147
|
- 'update' => 12,
|
|
|
148
|
- 'discount' => 10,
|
|
|
149
|
- 'link' => '#',
|
|
|
150
|
- 'productList' => array(
|
|
|
151
|
- 'imgUrl' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
152
|
- 'price' => '¥240',
|
|
|
153
|
- 'discount' => false
|
|
|
154
|
- )
|
|
|
155
|
- )
|
|
|
156
|
- )
|
82
|
+ 'hasFavProduct' => $favProducts,
|
|
|
83
|
+ 'hasFavBrand' => $favBrands
|
157
|
));
|
84
|
));
|
158
|
}
|
85
|
}
|
159
|
|
86
|
|
160
|
-
|
|
|
161
|
/**
|
87
|
/**
|
162
|
* 用户收藏的商品-删除
|
88
|
* 用户收藏的商品-删除
|
163
|
*/
|
89
|
*/
|
164
|
- public function favoriteDelAction() {
|
90
|
+ public function favoriteDelAction()
|
|
|
91
|
+ {
|
|
|
92
|
+ $result = array();
|
165
|
|
93
|
|
166
|
- //$this->echoJson();
|
94
|
+ if ($this->isAjax()) {
|
|
|
95
|
+ $uid = $this->getUid();
|
|
|
96
|
+ $fav_id = $this->post('fav_id', 0);
|
|
|
97
|
+
|
|
|
98
|
+ $result = \Index\UserModel::favoriteDelete($uid, $fav_id);
|
|
|
99
|
+ }
|
|
|
100
|
+
|
|
|
101
|
+ if (empty($result)) {
|
|
|
102
|
+ echo ' ';
|
|
|
103
|
+ } else {
|
|
|
104
|
+ $this->echoJson($result);
|
|
|
105
|
+ }
|
167
|
}
|
106
|
}
|
168
|
|
107
|
|
169
|
/**
|
108
|
/**
|
170
|
* 用户收藏的品牌
|
109
|
* 用户收藏的品牌
|
171
|
*/
|
110
|
*/
|
172
|
- public function favoritebrandAction() {
|
111
|
+ public function favoritebrandAction()
|
|
|
112
|
+ {
|
173
|
$uid = $this->getUid();
|
113
|
$uid = $this->getUid();
|
174
|
$gender = Helpers::getGenderByCookie();
|
114
|
$gender = Helpers::getGenderByCookie();
|
175
|
|
115
|
|
|
@@ -181,7 +121,8 @@ class HomeController extends AbstractAction |
|
@@ -181,7 +121,8 @@ class HomeController extends AbstractAction |
181
|
/**
|
121
|
/**
|
182
|
* 个人信息
|
122
|
* 个人信息
|
183
|
*/
|
123
|
*/
|
184
|
- public function personalDetailsAction() {
|
124
|
+ public function personalDetailsAction()
|
|
|
125
|
+ {
|
185
|
$this->setTitle('个人信息');
|
126
|
$this->setTitle('个人信息');
|
186
|
$this->setNavHeader('个人信息', true, SITE_MAIN);
|
127
|
$this->setNavHeader('个人信息', true, SITE_MAIN);
|
187
|
|
128
|
|
|
@@ -195,12 +136,13 @@ class HomeController extends AbstractAction |
|
@@ -195,12 +136,13 @@ class HomeController extends AbstractAction |
195
|
/**
|
136
|
/**
|
196
|
* YOHO币
|
137
|
* YOHO币
|
197
|
*/
|
138
|
*/
|
198
|
- public function currencyAction() {
|
139
|
+ public function currencyAction()
|
|
|
140
|
+ {
|
199
|
$this->setTitle('YOHO币');
|
141
|
$this->setTitle('YOHO币');
|
200
|
$this->setNavHeader('YOHO币', true, false);
|
142
|
$this->setNavHeader('YOHO币', true, false);
|
201
|
|
143
|
|
202
|
// $uid = $this->getUid();
|
144
|
// $uid = $this->getUid();
|
203
|
- $uid = 967016;
|
145
|
+ $uid = 8826435;
|
204
|
$currency = \Index\UserModel::getYohoCoinData($uid);
|
146
|
$currency = \Index\UserModel::getYohoCoinData($uid);
|
205
|
|
147
|
|
206
|
$currency['pageFooter'] = true;
|
148
|
$currency['pageFooter'] = true;
|
|
@@ -210,7 +152,8 @@ class HomeController extends AbstractAction |
|
@@ -210,7 +152,8 @@ class HomeController extends AbstractAction |
210
|
/**
|
152
|
/**
|
211
|
* 优惠券
|
153
|
* 优惠券
|
212
|
*/
|
154
|
*/
|
213
|
- public function couponsAction() {
|
155
|
+ public function couponsAction()
|
|
|
156
|
+ {
|
214
|
|
157
|
|
215
|
$this->setTitle('优惠券');
|
158
|
$this->setTitle('优惠券');
|
216
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
159
|
$this->setNavHeader('优惠券', true, SITE_MAIN);
|
|
@@ -221,19 +164,19 @@ class HomeController extends AbstractAction |
|
@@ -221,19 +164,19 @@ class HomeController extends AbstractAction |
221
|
'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
|
164
|
'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
|
222
|
'couponsPage' => true
|
165
|
'couponsPage' => true
|
223
|
);
|
166
|
);
|
224
|
-
|
|
|
225
|
$this->_view->display('coupons', $coupons);
|
167
|
$this->_view->display('coupons', $coupons);
|
226
|
}
|
168
|
}
|
227
|
|
169
|
|
228
|
/**
|
170
|
/**
|
229
|
* 我的消息
|
171
|
* 我的消息
|
230
|
*/
|
172
|
*/
|
231
|
- public function messageAction() {
|
173
|
+ public function messageAction()
|
|
|
174
|
+ {
|
232
|
// $uid = $this->getUid();
|
175
|
// $uid = $this->getUid();
|
233
|
$page = $this->get('page', 0);
|
176
|
$page = $this->get('page', 0);
|
234
|
$size = $this->get('size', 10);
|
177
|
$size = $this->get('size', 10);
|
235
|
|
178
|
|
236
|
- $uid = 967016;
|
179
|
+ $uid = 8826435;
|
237
|
$messages = \Index\UserModel::getMessageData($uid, $page, $size);
|
180
|
$messages = \Index\UserModel::getMessageData($uid, $page, $size);
|
238
|
|
181
|
|
239
|
print_r($messages);
|
182
|
print_r($messages);
|
|
@@ -242,13 +185,14 @@ class HomeController extends AbstractAction |
|
@@ -242,13 +185,14 @@ class HomeController extends AbstractAction |
242
|
/**
|
185
|
/**
|
243
|
* 地址管理
|
186
|
* 地址管理
|
244
|
*/
|
187
|
*/
|
245
|
- public function addressAction() {
|
188
|
+ public function addressAction()
|
|
|
189
|
+ {
|
246
|
// 设置网站标题
|
190
|
// 设置网站标题
|
247
|
$this->setTitle('地址管理');
|
191
|
$this->setTitle('地址管理');
|
248
|
$this->setNavHeader('地址管理', true, SITE_MAIN);
|
192
|
$this->setNavHeader('地址管理', true, SITE_MAIN);
|
249
|
|
193
|
|
250
|
// $uid = $this->getUid();
|
194
|
// $uid = $this->getUid();
|
251
|
- $uid = 967016;
|
195
|
+ $uid = 8826435;
|
252
|
|
196
|
|
253
|
$address = \Index\UserModel::getAddressData($uid);
|
197
|
$address = \Index\UserModel::getAddressData($uid);
|
254
|
$addressList = \Index\UserModel::getAddressListData($uid);
|
198
|
$addressList = \Index\UserModel::getAddressListData($uid);
|
|
@@ -266,12 +210,13 @@ class HomeController extends AbstractAction |
|
@@ -266,12 +210,13 @@ class HomeController extends AbstractAction |
266
|
/**
|
210
|
/**
|
267
|
* 修改地址或者添加新地址
|
211
|
* 修改地址或者添加新地址
|
268
|
*/
|
212
|
*/
|
269
|
- public function saveAddressAction() {
|
213
|
+ public function saveAddressAction()
|
|
|
214
|
+ {
|
270
|
$result = array();
|
215
|
$result = array();
|
271
|
|
216
|
|
272
|
if ($this->isAjax()) {
|
217
|
if ($this->isAjax()) {
|
273
|
// $uid = $this->getUid();
|
218
|
// $uid = $this->getUid();
|
274
|
- $uid = 967016;
|
219
|
+ $uid = 8826435;
|
275
|
$address = $this->post('address', '');
|
220
|
$address = $this->post('address', '');
|
276
|
$area_code = $this->post('area_code', '');
|
221
|
$area_code = $this->post('area_code', '');
|
277
|
$consignee = $this->post('consignee', '');
|
222
|
$consignee = $this->post('consignee', '');
|
|
@@ -293,12 +238,13 @@ class HomeController extends AbstractAction |
|
@@ -293,12 +238,13 @@ class HomeController extends AbstractAction |
293
|
/**
|
238
|
/**
|
294
|
* 设置默认地址
|
239
|
* 设置默认地址
|
295
|
*/
|
240
|
*/
|
296
|
- public function defaultAddressAction() {
|
241
|
+ public function defaultAddressAction()
|
|
|
242
|
+ {
|
297
|
$result = array();
|
243
|
$result = array();
|
298
|
|
244
|
|
299
|
if ($this->isAjax()) {
|
245
|
if ($this->isAjax()) {
|
300
|
// $uid = $this->getUid();
|
246
|
// $uid = $this->getUid();
|
301
|
- $uid = 967016;
|
247
|
+ $uid = 8826435;
|
302
|
$id = $this->post('id', '');
|
248
|
$id = $this->post('id', '');
|
303
|
|
249
|
|
304
|
$result = \Index\UserModel::setDefaultAddress($uid, $id);
|
250
|
$result = \Index\UserModel::setDefaultAddress($uid, $id);
|
|
@@ -311,8 +257,31 @@ class HomeController extends AbstractAction |
|
@@ -311,8 +257,31 @@ class HomeController extends AbstractAction |
311
|
}
|
257
|
}
|
312
|
}
|
258
|
}
|
313
|
|
259
|
|
|
|
260
|
+ /**
|
|
|
261
|
+ * 删除地址
|
|
|
262
|
+ */
|
|
|
263
|
+ public function addressDelAction()
|
|
|
264
|
+ {
|
|
|
265
|
+ $result = array();
|
|
|
266
|
+
|
|
|
267
|
+ if ($this->isAjax()) {
|
|
|
268
|
+ // $uid = $this->getUid();
|
|
|
269
|
+ $uid = 8826435;
|
|
|
270
|
+ $id = $this->post('id', '');
|
|
|
271
|
+
|
|
|
272
|
+ $result = \Index\UserModel::deleteAddress($uid, $id);
|
|
|
273
|
+ }
|
|
|
274
|
+
|
|
|
275
|
+ if (empty($result)) {
|
|
|
276
|
+ echo ' ';
|
|
|
277
|
+ } else {
|
|
|
278
|
+ $this->echoJson($result);
|
|
|
279
|
+ }
|
|
|
280
|
+ }
|
|
|
281
|
+
|
314
|
//在线客服
|
282
|
//在线客服
|
315
|
- public function onlineServiceAction() {
|
283
|
+ public function onlineServiceAction()
|
|
|
284
|
+ {
|
316
|
// 设置网站标题
|
285
|
// 设置网站标题
|
317
|
$this->setTitle('在线客服');
|
286
|
$this->setTitle('在线客服');
|
318
|
$this->setNavHeader('在线客服', true, SITE_MAIN);
|
287
|
$this->setNavHeader('在线客服', true, SITE_MAIN);
|
|
@@ -327,7 +296,8 @@ class HomeController extends AbstractAction |
|
@@ -327,7 +296,8 @@ class HomeController extends AbstractAction |
327
|
}
|
296
|
}
|
328
|
|
297
|
|
329
|
//在线客服-具体详情
|
298
|
//在线客服-具体详情
|
330
|
- public function onlineServiceDetailAction() {
|
299
|
+ public function onlineServiceDetailAction()
|
|
|
300
|
+ {
|
331
|
$service = array();
|
301
|
$service = array();
|
332
|
$cateId = $this->get('cateId', 0);
|
302
|
$cateId = $this->get('cateId', 0);
|
333
|
$cateName = $this->get('cateName', '');
|
303
|
$cateName = $this->get('cateName', '');
|
|
@@ -342,14 +312,16 @@ class HomeController extends AbstractAction |
|
@@ -342,14 +312,16 @@ class HomeController extends AbstractAction |
342
|
/**
|
312
|
/**
|
343
|
* 我的逛
|
313
|
* 我的逛
|
344
|
*/
|
314
|
*/
|
345
|
- public function myGuangAction() {
|
315
|
+ public function myGuangAction()
|
|
|
316
|
+ {
|
346
|
echo 'My Guang';
|
317
|
echo 'My Guang';
|
347
|
}
|
318
|
}
|
348
|
|
319
|
|
349
|
/**
|
320
|
/**
|
350
|
* 意见反馈
|
321
|
* 意见反馈
|
351
|
*/
|
322
|
*/
|
352
|
- public function suggestAction() {
|
323
|
+ public function suggestAction()
|
|
|
324
|
+ {
|
353
|
// 设置网站标题
|
325
|
// 设置网站标题
|
354
|
$this->setTitle('意见反馈');
|
326
|
$this->setTitle('意见反馈');
|
355
|
$this->setNavHeader('意见反馈', true, SITE_MAIN);
|
327
|
$this->setNavHeader('意见反馈', true, SITE_MAIN);
|
|
@@ -371,7 +343,8 @@ class HomeController extends AbstractAction |
|
@@ -371,7 +343,8 @@ class HomeController extends AbstractAction |
371
|
/**
|
343
|
/**
|
372
|
* 意见反馈-提交表单页面
|
344
|
* 意见反馈-提交表单页面
|
373
|
*/
|
345
|
*/
|
374
|
- public function suggestSubAction() {
|
346
|
+ public function suggestSubAction()
|
|
|
347
|
+ {
|
375
|
|
348
|
|
376
|
// 设置网站标题
|
349
|
// 设置网站标题
|
377
|
$this->setTitle('反馈问题');
|
350
|
$this->setTitle('反馈问题');
|
|
@@ -399,19 +372,19 @@ class HomeController extends AbstractAction |
|
@@ -399,19 +372,19 @@ class HomeController extends AbstractAction |
399
|
/**
|
372
|
/**
|
400
|
* 异步上传图片
|
373
|
* 异步上传图片
|
401
|
*/
|
374
|
*/
|
402
|
- public function suggestimgUploadAction() {
|
|
|
403
|
- if ($this->isAjax()) {
|
|
|
404
|
- $filename = $this->get('filename', '');
|
|
|
405
|
- $result = \Plugin\Images::saveImage($filename);
|
375
|
+ public function suggestimgUploadAction()
|
|
|
376
|
+ {
|
|
|
377
|
+ $filename = $this->post('filename', '');
|
|
|
378
|
+ $result = \Index\UserModel::saveSuggestImg($filename);
|
406
|
|
379
|
|
407
|
$this->echoJson($result);
|
380
|
$this->echoJson($result);
|
408
|
}
|
381
|
}
|
409
|
- }
|
|
|
410
|
|
382
|
|
411
|
/**
|
383
|
/**
|
412
|
* 异步保存意见反馈数据
|
384
|
* 异步保存意见反馈数据
|
413
|
*/
|
385
|
*/
|
414
|
- public function savesuggestAction() {
|
386
|
+ public function savesuggestAction()
|
|
|
387
|
+ {
|
415
|
if ($this->isAjax()) {
|
388
|
if ($this->isAjax()) {
|
416
|
$uid = $this->getUid();
|
389
|
$uid = $this->getUid();
|
417
|
$content = $this->post('content', '');
|
390
|
$content = $this->post('content', '');
|
|
@@ -425,7 +398,8 @@ class HomeController extends AbstractAction |
|
@@ -425,7 +398,8 @@ class HomeController extends AbstractAction |
425
|
/**
|
398
|
/**
|
426
|
* 会员等级展示页
|
399
|
* 会员等级展示页
|
427
|
*/
|
400
|
*/
|
428
|
- public function gradeAction() {
|
401
|
+ public function gradeAction()
|
|
|
402
|
+ {
|
429
|
//设置网站seo信息
|
403
|
//设置网站seo信息
|
430
|
$this->setTitle('会员等级');
|
404
|
$this->setTitle('会员等级');
|
431
|
//显示网站导航头部信息
|
405
|
//显示网站导航头部信息
|
|
@@ -444,7 +418,8 @@ class HomeController extends AbstractAction |
|
@@ -444,7 +418,8 @@ class HomeController extends AbstractAction |
444
|
* 会员特权查看页
|
418
|
* 会员特权查看页
|
445
|
*/
|
419
|
*/
|
446
|
|
420
|
|
447
|
- public function preferentialAction() {
|
421
|
+ public function preferentialAction()
|
|
|
422
|
+ {
|
448
|
//设置网站seo信息
|
423
|
//设置网站seo信息
|
449
|
$this->setTitle('会员等级');
|
424
|
$this->setTitle('会员等级');
|
450
|
//显示网站导航头部信息
|
425
|
//显示网站导航头部信息
|
|
@@ -461,7 +436,8 @@ class HomeController extends AbstractAction |
|
@@ -461,7 +436,8 @@ class HomeController extends AbstractAction |
461
|
* 我的订单页面
|
436
|
* 我的订单页面
|
462
|
*/
|
437
|
*/
|
463
|
|
438
|
|
464
|
- public function orderAction() {
|
439
|
+ public function orderAction()
|
|
|
440
|
+ {
|
465
|
//获得type值
|
441
|
//获得type值
|
466
|
$type = $this->get('type', 1);
|
442
|
$type = $this->get('type', 1);
|
467
|
$this->setTitle('我的订单');
|
443
|
$this->setTitle('我的订单');
|
|
@@ -481,7 +457,8 @@ class HomeController extends AbstractAction |
|
@@ -481,7 +457,8 @@ class HomeController extends AbstractAction |
481
|
}
|
457
|
}
|
482
|
|
458
|
|
483
|
//ajax请求订单页面
|
459
|
//ajax请求订单页面
|
484
|
- public function getOrdersAction() {
|
460
|
+ public function getOrdersAction()
|
|
|
461
|
+ {
|
485
|
//判断是不是ajax请求
|
462
|
//判断是不是ajax请求
|
486
|
if (!$this->isAjax()) {
|
463
|
if (!$this->isAjax()) {
|
487
|
$this->error();
|
464
|
$this->error();
|
|
@@ -515,20 +492,22 @@ class HomeController extends AbstractAction |
|
@@ -515,20 +492,22 @@ class HomeController extends AbstractAction |
515
|
* 我的订单-取消订单
|
492
|
* 我的订单-取消订单
|
516
|
*/
|
493
|
*/
|
517
|
|
494
|
|
518
|
- public function cancelOrderAction() {
|
495
|
+ public function cancelOrderAction()
|
|
|
496
|
+ {
|
519
|
|
497
|
|
520
|
//判断是不是ajax请求
|
498
|
//判断是不是ajax请求
|
521
|
if (!$this->isAjax()) {
|
499
|
if (!$this->isAjax()) {
|
522
|
$this->error();
|
500
|
$this->error();
|
523
|
}
|
501
|
}
|
524
|
//传入order_code和uid以取消订单
|
502
|
//传入order_code和uid以取消订单
|
525
|
- $order_code = $this->get('id');
|
503
|
+ $order_code = $this->get('orderCode');
|
526
|
$uid = $this->getUid();
|
504
|
$uid = $this->getUid();
|
527
|
$uid = '10267443'; //测试用
|
505
|
$uid = '10267443'; //测试用
|
528
|
$gender = Helpers::getGenderByCookie();
|
506
|
$gender = Helpers::getGenderByCookie();
|
529
|
$yh_channel = $this->get('yh_channel', 1);
|
507
|
$yh_channel = $this->get('yh_channel', 1);
|
530
|
$method = 'app.SpaceOrders.close';
|
508
|
$method = 'app.SpaceOrders.close';
|
531
|
$data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method);
|
509
|
$data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method);
|
|
|
510
|
+
|
532
|
$this->echoJson($data);
|
511
|
$this->echoJson($data);
|
533
|
}
|
512
|
}
|
534
|
|
513
|
|
|
@@ -536,7 +515,8 @@ class HomeController extends AbstractAction |
|
@@ -536,7 +515,8 @@ class HomeController extends AbstractAction |
536
|
* 我的订单-删除订单
|
515
|
* 我的订单-删除订单
|
537
|
*/
|
516
|
*/
|
538
|
|
517
|
|
539
|
- public function delOrderAction() {
|
518
|
+ public function delOrderAction()
|
|
|
519
|
+ {
|
540
|
//判断是不是ajax请求
|
520
|
//判断是不是ajax请求
|
541
|
if (!$this->isAjax()) {
|
521
|
if (!$this->isAjax()) {
|
542
|
$this->error();
|
522
|
$this->error();
|
|
@@ -549,33 +529,14 @@ class HomeController extends AbstractAction |
|
@@ -549,33 +529,14 @@ class HomeController extends AbstractAction |
549
|
$yh_channel = $this->get('yh_channel', 1);
|
529
|
$yh_channel = $this->get('yh_channel', 1);
|
550
|
$method = 'app.SpaceOrders.delOrderByCode';
|
530
|
$method = 'app.SpaceOrders.delOrderByCode';
|
551
|
$data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method);
|
531
|
$data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method);
|
552
|
- if ($data['code'] == 200) {
|
|
|
553
|
- $arr = array();
|
|
|
554
|
- $arr['code'] = $data['code'];
|
|
|
555
|
- $arr['message'] = $data['message'];
|
|
|
556
|
- echo json_encode($arr);
|
|
|
557
|
- }
|
|
|
558
|
- }
|
|
|
559
|
-
|
|
|
560
|
- /**
|
|
|
561
|
- * 付款
|
|
|
562
|
- */
|
|
|
563
|
- public function getPaymentAction() {
|
|
|
564
|
- $contentCode = $this->get('content_code');
|
|
|
565
|
- $contentCode = '04cf5abaa7c20178325a07c4a833782c';
|
|
|
566
|
- $gender = Helpers::getGenderByCookie();
|
|
|
567
|
- $yh_channel = $this->get('yh_channel', 1);
|
|
|
568
|
- $data = OrderData::getPaymentData($contentCode, $gender, $yh_channel);
|
|
|
569
|
- //print_r($data);
|
|
|
570
|
- if ($data['code'] == 200) {
|
|
|
571
|
-
|
|
|
572
|
- }
|
532
|
+ $this->echoJson($data);
|
573
|
}
|
533
|
}
|
574
|
|
534
|
|
575
|
/**
|
535
|
/**
|
576
|
* 订单详情页
|
536
|
* 订单详情页
|
577
|
*/
|
537
|
*/
|
578
|
- public function orderDetailAction() {
|
538
|
+ public function orderDetailAction()
|
|
|
539
|
+ {
|
579
|
$data = array(
|
540
|
$data = array(
|
580
|
'name' => '毛毛莉Lydia',
|
541
|
'name' => '毛毛莉Lydia',
|
581
|
'phoneNum' => '18600001133',
|
542
|
'phoneNum' => '18600001133',
|