|
@@ -16,24 +16,24 @@ use Plugin\Helpers; |
|
@@ -16,24 +16,24 @@ 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
|
- {
|
|
|
24
|
- // 设置网站标题
|
23
|
+ public function indexAction() {
|
|
|
24
|
+ // 设置网站标题
|
25
|
$this->setTitle('个人中心');
|
25
|
$this->setTitle('个人中心');
|
26
|
- $this->setNavHeader('个人中心', true, SITE_MAIN);
|
26
|
+ $this->setNavHeader('个人中心', true, SITE_MAIN);
|
27
|
|
27
|
|
28
|
- // $uid = $this->getUid();
|
|
|
29
|
- $uid = 967016;
|
|
|
30
|
- $data = \Index\UserModel::getUserProfileData($uid);
|
|
|
31
|
- $data += \Index\UserModel::getInfoNumData($uid);
|
28
|
+ // $uid = $this->getUid();
|
|
|
29
|
+ $uid = 967016;
|
|
|
30
|
+ $data = \Index\UserModel::getUserProfileData($uid);
|
|
|
31
|
+ $data += \Index\UserModel::getInfoNumData($uid);
|
32
|
|
32
|
|
33
|
- // 优选新品数据
|
|
|
34
|
- $channel = Helpers::getChannelByCookie();
|
|
|
35
|
- $data['recommendForYou'] = \Index\UserModel::getPreferenceData($channel);
|
|
|
36
|
- // print_r($data);
|
33
|
+ // 优选新品数据
|
|
|
34
|
+ $channel = Helpers::getChannelByCookie();
|
|
|
35
|
+ $data['recommendForYou'] = \Index\UserModel::getPreferenceData($channel);
|
|
|
36
|
+ // print_r($data);
|
37
|
|
37
|
|
38
|
$data['myIndexPage'] = true;
|
38
|
$data['myIndexPage'] = true;
|
39
|
$data['pageFooter'] = true;
|
39
|
$data['pageFooter'] = true;
|
|
@@ -41,63 +41,60 @@ class HomeController extends AbstractAction |
|
@@ -41,63 +41,60 @@ class HomeController extends AbstractAction |
41
|
$this->_view->display('index', $data);
|
41
|
$this->_view->display('index', $data);
|
42
|
}
|
42
|
}
|
43
|
|
43
|
|
44
|
- /**
|
|
|
45
|
- * 用户订单
|
|
|
46
|
- */
|
|
|
47
|
- public function ordersAction()
|
|
|
48
|
- {
|
|
|
49
|
- // $uid = $this->getUid();
|
|
|
50
|
- // $type = $this->get('type', 1);
|
|
|
51
|
-
|
|
|
52
|
- // $orders = \Index\UserModel::getUserOrderData(967016, $type);
|
|
|
53
|
-
|
|
|
54
|
- $order = array(
|
|
|
55
|
- 'orders' => array(
|
|
|
56
|
- array(
|
|
|
57
|
- 'orderNum' => '408539077',
|
|
|
58
|
- 'tradingStatus' => '交易成功',
|
|
|
59
|
- 'goods' => array(
|
|
|
60
|
- array(
|
|
|
61
|
- 'id' => 1,
|
|
|
62
|
- 'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
63
|
- 'name' => 'Adidas Originals ZX FLUXM22508',
|
|
|
64
|
- 'color' => '黄',
|
|
|
65
|
- 'size' => '43',
|
|
|
66
|
- 'price' => '699.00',
|
|
|
67
|
- 'count' => '2'
|
|
|
68
|
- ),
|
|
|
69
|
- array(
|
|
|
70
|
- 'id' => 1,
|
|
|
71
|
- 'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/11/04/05/0188f1aca49ac478a565ec029b5d2d4a6c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
72
|
- 'name' => 'B.Duck浴室玩伴mini浮水鸭',
|
|
|
73
|
- 'gift' => true,
|
|
|
74
|
- 'color' => '黄',
|
|
|
75
|
- 'size' => '43',
|
|
|
76
|
- 'price' => '0.00',
|
|
|
77
|
- 'count' => '1'
|
|
|
78
|
- )
|
|
|
79
|
- ),
|
|
|
80
|
- 'count' => 2,
|
|
|
81
|
- 'sumCost' => '699.00',
|
|
|
82
|
- 'unpaid' => true,
|
|
|
83
|
- )
|
|
|
84
|
- )
|
|
|
85
|
- );
|
|
|
86
|
-
|
|
|
87
|
- $this->_view->display('order', array('order' => $order, 'orderPage' => true));
|
|
|
88
|
- // print_r($orders);
|
|
|
89
|
- }
|
|
|
90
|
-
|
|
|
91
|
- /**
|
|
|
92
|
- * 用户收藏的商品
|
|
|
93
|
- */
|
|
|
94
|
- public function favoriteAction()
|
|
|
95
|
- {
|
|
|
96
|
- $uid = $this->getUid();
|
|
|
97
|
-
|
|
|
98
|
- $favProducts = \Index\UserModel::getFavProductData($uid);
|
|
|
99
|
-
|
|
|
100
|
- //print_r($favProducts);
|
44
|
+ /**
|
|
|
45
|
+ * 用户订单
|
|
|
46
|
+ */
|
|
|
47
|
+ public function ordersAction() {
|
|
|
48
|
+ // $uid = $this->getUid();
|
|
|
49
|
+ // $type = $this->get('type', 1);
|
|
|
50
|
+ // $orders = \Index\UserModel::getUserOrderData(967016, $type);
|
|
|
51
|
+
|
|
|
52
|
+ $order = array(
|
|
|
53
|
+ 'orders' => array(
|
|
|
54
|
+ array(
|
|
|
55
|
+ 'orderNum' => '408539077',
|
|
|
56
|
+ 'tradingStatus' => '交易成功',
|
|
|
57
|
+ 'goods' => array(
|
|
|
58
|
+ array(
|
|
|
59
|
+ 'id' => 1,
|
|
|
60
|
+ 'thumb' => 'http://img11.static.yhbimg.com/goodsimg/2015/11/04/05/01ce2aff32fc3c90584f516167cd526d91.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
61
|
+ 'name' => 'Adidas Originals ZX FLUXM22508',
|
|
|
62
|
+ 'color' => '黄',
|
|
|
63
|
+ 'size' => '43',
|
|
|
64
|
+ 'price' => '699.00',
|
|
|
65
|
+ 'count' => '2'
|
|
|
66
|
+ ),
|
|
|
67
|
+ array(
|
|
|
68
|
+ 'id' => 1,
|
|
|
69
|
+ 'thumb' => 'http://img10.static.yhbimg.com/goodsimg/2015/11/04/05/0188f1aca49ac478a565ec029b5d2d4a6c.jpg?imageMogr2/thumbnail/235x314/extent/235x314/background/d2hpdGU=/position/center/quality/90',
|
|
|
70
|
+ 'name' => 'B.Duck浴室玩伴mini浮水鸭',
|
|
|
71
|
+ 'gift' => true,
|
|
|
72
|
+ 'color' => '黄',
|
|
|
73
|
+ 'size' => '43',
|
|
|
74
|
+ 'price' => '0.00',
|
|
|
75
|
+ 'count' => '1'
|
|
|
76
|
+ )
|
|
|
77
|
+ ),
|
|
|
78
|
+ 'count' => 2,
|
|
|
79
|
+ 'sumCost' => '699.00',
|
|
|
80
|
+ 'unpaid' => true,
|
|
|
81
|
+ )
|
|
|
82
|
+ )
|
|
|
83
|
+ );
|
|
|
84
|
+
|
|
|
85
|
+ $this->_view->display('order', array('order' => $order, 'orderPage' => true));
|
|
|
86
|
+ // print_r($orders);
|
|
|
87
|
+ }
|
|
|
88
|
+
|
|
|
89
|
+ /**
|
|
|
90
|
+ * 用户收藏的商品
|
|
|
91
|
+ */
|
|
|
92
|
+ public function favoriteAction() {
|
|
|
93
|
+ $uid = $this->getUid();
|
|
|
94
|
+
|
|
|
95
|
+ $favProducts = \Index\UserModel::getFavProductData($uid);
|
|
|
96
|
+
|
|
|
97
|
+ //print_r($favProducts);
|
101
|
|
98
|
|
102
|
$this->_view->display('favorite', array(
|
99
|
$this->_view->display('favorite', array(
|
103
|
'favPage' => true,
|
100
|
'favPage' => true,
|
|
@@ -111,115 +108,104 @@ class HomeController extends AbstractAction |
|
@@ -111,115 +108,104 @@ class HomeController extends AbstractAction |
111
|
'hasFavProduct' => false,
|
108
|
'hasFavProduct' => false,
|
112
|
'hasFavBrand' => false
|
109
|
'hasFavBrand' => false
|
113
|
));
|
110
|
));
|
114
|
- }
|
|
|
115
|
-
|
|
|
116
|
- /**
|
|
|
117
|
- * 用户收藏的品牌
|
|
|
118
|
- */
|
|
|
119
|
- public function favoritebrandAction()
|
|
|
120
|
- {
|
|
|
121
|
- $uid = $this->getUid();
|
|
|
122
|
- $gender = Helpers::getGenderByCookie();
|
|
|
123
|
-
|
|
|
124
|
- $favBrands = \Index\UserModel::getFavBrandData($uid, $gender);
|
|
|
125
|
-
|
|
|
126
|
- print_r($favBrands);
|
|
|
127
|
- }
|
|
|
128
|
-
|
|
|
129
|
- /**
|
|
|
130
|
- * 个人信息
|
|
|
131
|
- */
|
|
|
132
|
- public function personalDetailsAction()
|
|
|
133
|
- {
|
|
|
134
|
- $this->setTitle('个人信息');
|
|
|
135
|
- $this->setNavHeader('个人信息', true, SITE_MAIN);
|
111
|
+ }
|
136
|
|
112
|
|
137
|
- // $uid = $this->getUid();
|
|
|
138
|
- $uid = 967016;
|
|
|
139
|
- $data = \Index\UserModel::getUserProfileData($uid);
|
|
|
140
|
- $data['pageFooter'] = true;
|
|
|
141
|
- $this->_view->display('personal-details', $data);
|
113
|
+ /**
|
|
|
114
|
+ * 用户收藏的品牌
|
|
|
115
|
+ */
|
|
|
116
|
+ public function favoritebrandAction() {
|
|
|
117
|
+ $uid = $this->getUid();
|
|
|
118
|
+ $gender = Helpers::getGenderByCookie();
|
|
|
119
|
+
|
|
|
120
|
+ $favBrands = \Index\UserModel::getFavBrandData($uid, $gender);
|
|
|
121
|
+
|
|
|
122
|
+ print_r($favBrands);
|
|
|
123
|
+ }
|
142
|
|
124
|
|
|
|
125
|
+ /**
|
|
|
126
|
+ * 个人信息
|
|
|
127
|
+ */
|
|
|
128
|
+ public function personalDetailsAction() {
|
|
|
129
|
+ $this->setTitle('个人信息');
|
|
|
130
|
+ $this->setNavHeader('个人信息', true, SITE_MAIN);
|
143
|
|
131
|
|
144
|
- }
|
132
|
+ // $uid = $this->getUid();
|
|
|
133
|
+ $uid = 967016;
|
|
|
134
|
+ $data = \Index\UserModel::getUserProfileData($uid);
|
|
|
135
|
+ $data['pageFooter'] = true;
|
|
|
136
|
+ $this->_view->display('personal-details', $data);
|
|
|
137
|
+ }
|
145
|
|
138
|
|
146
|
- /**
|
|
|
147
|
- * YOHO币
|
|
|
148
|
- */
|
|
|
149
|
- public function currencyAction()
|
|
|
150
|
- {
|
|
|
151
|
- // $uid = $this->getUid();
|
|
|
152
|
- $this->setNavHeader('YOHO币', true, false);
|
139
|
+ /**
|
|
|
140
|
+ * YOHO币
|
|
|
141
|
+ */
|
|
|
142
|
+ public function currencyAction() {
|
|
|
143
|
+ // $uid = $this->getUid();
|
|
|
144
|
+ $this->setNavHeader('YOHO币', true, false);
|
153
|
|
145
|
|
154
|
- $uid = 967016;
|
|
|
155
|
- $currency = \Index\UserModel::getYohoCoinData($uid);
|
146
|
+ $uid = 967016;
|
|
|
147
|
+ $currency = \Index\UserModel::getYohoCoinData($uid);
|
156
|
|
148
|
|
157
|
- $this->_view->display('currency', $currency);
|
|
|
158
|
- }
|
149
|
+ $this->_view->display('currency', $currency);
|
|
|
150
|
+ }
|
159
|
|
151
|
|
160
|
- /**
|
|
|
161
|
- * 优惠券
|
|
|
162
|
- */
|
|
|
163
|
- public function couponsAction()
|
|
|
164
|
- {
|
152
|
+ /**
|
|
|
153
|
+ * 优惠券
|
|
|
154
|
+ */
|
|
|
155
|
+ public function couponsAction() {
|
165
|
|
156
|
|
166
|
$this->setTitle('优惠券');
|
157
|
$this->setTitle('优惠券');
|
167
|
- $this->setNavHeader('优惠券', true, SITE_MAIN);
|
|
|
168
|
- // $uid = $this->getUid();
|
|
|
169
|
- $uid = 967016;
|
|
|
170
|
- $status = $this->get('status', 0);
|
|
|
171
|
- $coupons = array(
|
|
|
172
|
- 'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
|
|
|
173
|
- 'couponsPage' => true
|
|
|
174
|
- );
|
158
|
+ $this->setNavHeader('优惠券', true, SITE_MAIN);
|
|
|
159
|
+ // $uid = $this->getUid();
|
|
|
160
|
+ $uid = 967016;
|
|
|
161
|
+ $status = $this->get('status', 0);
|
|
|
162
|
+ $coupons = array(
|
|
|
163
|
+ 'couponsUrl' => \Index\UserModel::getCouponData($uid, $status),
|
|
|
164
|
+ 'couponsPage' => true
|
|
|
165
|
+ );
|
175
|
$this->_view->display('coupons', $coupons);
|
166
|
$this->_view->display('coupons', $coupons);
|
|
|
167
|
+ }
|
176
|
|
168
|
|
177
|
- }
|
|
|
178
|
-
|
|
|
179
|
- /**
|
|
|
180
|
- * 我的消息
|
|
|
181
|
- */
|
|
|
182
|
- public function messageAction()
|
|
|
183
|
- {
|
|
|
184
|
- // $uid = $this->getUid();
|
|
|
185
|
- $page = $this->get('page', 0);
|
|
|
186
|
- $size = $this->get('size', 10);
|
|
|
187
|
-
|
|
|
188
|
- $uid = 967016;
|
|
|
189
|
- $messages = \Index\UserModel::getMessageData($uid, $page, $size);
|
169
|
+ /**
|
|
|
170
|
+ * 我的消息
|
|
|
171
|
+ */
|
|
|
172
|
+ public function messageAction() {
|
|
|
173
|
+ // $uid = $this->getUid();
|
|
|
174
|
+ $page = $this->get('page', 0);
|
|
|
175
|
+ $size = $this->get('size', 10);
|
190
|
|
176
|
|
191
|
- print_r($messages);
|
177
|
+ $uid = 967016;
|
|
|
178
|
+ $messages = \Index\UserModel::getMessageData($uid, $page, $size);
|
192
|
|
179
|
|
193
|
- }
|
180
|
+ print_r($messages);
|
|
|
181
|
+ }
|
194
|
|
182
|
|
195
|
- /**
|
|
|
196
|
- * 地址管理
|
|
|
197
|
- */
|
|
|
198
|
- public function addressAction()
|
|
|
199
|
- {
|
|
|
200
|
- // 设置网站标题
|
183
|
+ /**
|
|
|
184
|
+ * 地址管理
|
|
|
185
|
+ */
|
|
|
186
|
+ public function addressAction() {
|
|
|
187
|
+ // 设置网站标题
|
201
|
$this->setTitle('地址管理');
|
188
|
$this->setTitle('地址管理');
|
202
|
$this->setNavHeader('地址管理', true, SITE_MAIN);
|
189
|
$this->setNavHeader('地址管理', true, SITE_MAIN);
|
203
|
|
190
|
|
204
|
// $uid = $this->getUid();
|
191
|
// $uid = $this->getUid();
|
205
|
$uid = 967016;
|
192
|
$uid = 967016;
|
206
|
|
193
|
|
207
|
- $address = \Index\UserModel::getAddressData($uid);
|
194
|
+ $address = \Index\UserModel::getAddressData($uid);
|
208
|
|
195
|
|
209
|
- // print_r($address);
|
196
|
+ // print_r($address);
|
210
|
|
197
|
|
211
|
$this->_view->display('address', array(
|
198
|
$this->_view->display('address', array(
|
212
|
'addressPage' => true,
|
199
|
'addressPage' => true,
|
213
|
'pageFooter' => true,
|
200
|
'pageFooter' => true,
|
214
|
'address' => $address
|
201
|
'address' => $address
|
215
|
));
|
202
|
));
|
216
|
- }
|
203
|
+ }
|
217
|
|
204
|
|
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);
|
|
@@ -238,36 +224,33 @@ class HomeController extends AbstractAction |
|
@@ -238,36 +224,33 @@ class HomeController extends AbstractAction |
238
|
));
|
224
|
));
|
239
|
}
|
225
|
}
|
240
|
|
226
|
|
241
|
- /**
|
|
|
242
|
- * 在线客服
|
|
|
243
|
- */
|
|
|
244
|
- public function onlineServiceAction()
|
|
|
245
|
- {
|
|
|
246
|
- $service = \Index\UserModel::getOnlineServiceData();
|
|
|
247
|
-
|
|
|
248
|
- print_r($service);
|
|
|
249
|
- }
|
|
|
250
|
-
|
|
|
251
|
- /**
|
|
|
252
|
- * 我的逛
|
|
|
253
|
- */
|
|
|
254
|
- public function myGuangAction()
|
|
|
255
|
- {
|
|
|
256
|
- echo 'My Guang';
|
|
|
257
|
- }
|
|
|
258
|
-
|
|
|
259
|
- /**
|
|
|
260
|
- * 意见反馈
|
|
|
261
|
- */
|
|
|
262
|
- public function suggestAction()
|
|
|
263
|
- {
|
|
|
264
|
- $udid = $this->getUdid();
|
|
|
265
|
- $page = $this->get('page', 1);
|
|
|
266
|
- $limit = $this->get('limit', 30);
|
|
|
267
|
-
|
|
|
268
|
- $suggest = \Index\UserModel::getSuggestData($udid, $page, $limit);
|
|
|
269
|
-
|
|
|
270
|
- //print_r($suggest);
|
227
|
+ /**
|
|
|
228
|
+ * 在线客服
|
|
|
229
|
+ */
|
|
|
230
|
+ public function onlineServiceAction() {
|
|
|
231
|
+ $service = \Index\UserModel::getOnlineServiceData();
|
|
|
232
|
+
|
|
|
233
|
+ print_r($service);
|
|
|
234
|
+ }
|
|
|
235
|
+
|
|
|
236
|
+ /**
|
|
|
237
|
+ * 我的逛
|
|
|
238
|
+ */
|
|
|
239
|
+ public function myGuangAction() {
|
|
|
240
|
+ echo 'My Guang';
|
|
|
241
|
+ }
|
|
|
242
|
+
|
|
|
243
|
+ /**
|
|
|
244
|
+ * 意见反馈
|
|
|
245
|
+ */
|
|
|
246
|
+ public function suggestAction() {
|
|
|
247
|
+ $udid = $this->getUdid();
|
|
|
248
|
+ $page = $this->get('page', 1);
|
|
|
249
|
+ $limit = $this->get('limit', 30);
|
|
|
250
|
+
|
|
|
251
|
+ $suggest = \Index\UserModel::getSuggestData($udid, $page, $limit);
|
|
|
252
|
+
|
|
|
253
|
+ //print_r($suggest);
|
271
|
$this->_view->display('suggest', array(
|
254
|
$this->_view->display('suggest', array(
|
272
|
'suggestPage' => true,
|
255
|
'suggestPage' => true,
|
273
|
'pageHeader' => array(
|
256
|
'pageHeader' => array(
|
|
@@ -297,84 +280,85 @@ class HomeController extends AbstractAction |
|
@@ -297,84 +280,85 @@ class HomeController extends AbstractAction |
297
|
'bad' => false)
|
280
|
'bad' => false)
|
298
|
)
|
281
|
)
|
299
|
));
|
282
|
));
|
|
|
283
|
+ }
|
300
|
|
284
|
|
301
|
- }
|
|
|
302
|
-
|
|
|
303
|
- /**
|
|
|
304
|
- * 异步保存意见反馈数据
|
|
|
305
|
- */
|
|
|
306
|
- public function savesuggestAction()
|
|
|
307
|
- {
|
|
|
308
|
- if($this->isAjax()) {
|
|
|
309
|
- $uid = $this->getUid();
|
|
|
310
|
- $content = $this->post('content', '');
|
|
|
311
|
- $suggest_type = $this->get('suggest_type', 2);
|
|
|
312
|
-
|
|
|
313
|
- $result = \Index\UserModel::saveSuggestData($uid, $content, $suggest_type);
|
|
|
314
|
-
|
|
|
315
|
- $this->echoJson($result);
|
|
|
316
|
- }
|
|
|
317
|
-
|
|
|
318
|
- }
|
|
|
319
|
-
|
|
|
320
|
- /**
|
|
|
321
|
- * 会员等级展示页
|
|
|
322
|
- */
|
|
|
323
|
- public function gradeAction(){
|
|
|
324
|
- //设置网站seo信息
|
|
|
325
|
- $this->setTitle('会员等级');
|
|
|
326
|
- //显示网站导航头部信息
|
|
|
327
|
- $this->setNavHeader('会员等级');
|
|
|
328
|
-
|
|
|
329
|
- $gender = Helpers::getGenderByCookie();
|
|
|
330
|
- $channel = Helpers::getChannelByCookie();
|
|
|
331
|
- $uid = $this -> getUid();
|
|
|
332
|
- $uid = '7566245';//临时测试用
|
|
|
333
|
- $data = GradeModel::getGrade($gender,$channel,$uid);
|
|
|
334
|
- $data['pageFooter'] = true;
|
|
|
335
|
- $this -> _view -> display('vip-grade',$data);
|
|
|
336
|
- }
|
|
|
337
|
- /*
|
|
|
338
|
- *会员特权查看页
|
|
|
339
|
- */
|
|
|
340
|
- public function preferentialAction(){
|
|
|
341
|
- //设置网站seo信息
|
|
|
342
|
- $this->setTitle('会员等级');
|
|
|
343
|
- //显示网站导航头部信息
|
|
|
344
|
- $this->setNavHeader('会员特权详情');
|
|
|
345
|
-
|
|
|
346
|
- $channel = Helpers::getChannelByCookie();
|
|
|
347
|
- $uid = $this -> getUid();
|
|
|
348
|
- $data = GradeModel::getPreferential($channel,$uid);
|
|
|
349
|
- $data['pageFooter'] = true;
|
|
|
350
|
- $this -> _view -> display('privilege',$data);
|
|
|
351
|
- }
|
|
|
352
|
-
|
|
|
353
|
- /*
|
|
|
354
|
- *我的订单页面
|
|
|
355
|
- */
|
|
|
356
|
- public function orderAction(){
|
|
|
357
|
-
|
|
|
358
|
- do{
|
|
|
359
|
- //判断是不是ajax请求
|
285
|
+ /**
|
|
|
286
|
+ * 异步保存意见反馈数据
|
|
|
287
|
+ */
|
|
|
288
|
+ public function savesuggestAction() {
|
|
|
289
|
+ if ($this->isAjax()) {
|
|
|
290
|
+ $uid = $this->getUid();
|
|
|
291
|
+ $content = $this->post('content', '');
|
|
|
292
|
+ $suggest_type = $this->get('suggest_type', 2);
|
|
|
293
|
+
|
|
|
294
|
+ $result = \Index\UserModel::saveSuggestData($uid, $content, $suggest_type);
|
|
|
295
|
+
|
|
|
296
|
+ $this->echoJson($result);
|
|
|
297
|
+ }
|
|
|
298
|
+ }
|
|
|
299
|
+
|
|
|
300
|
+ /**
|
|
|
301
|
+ * 会员等级展示页
|
|
|
302
|
+ */
|
|
|
303
|
+ public function gradeAction() {
|
|
|
304
|
+ //设置网站seo信息
|
|
|
305
|
+ $this->setTitle('会员等级');
|
|
|
306
|
+ //显示网站导航头部信息
|
|
|
307
|
+ $this->setNavHeader('会员等级');
|
|
|
308
|
+
|
|
|
309
|
+ $gender = Helpers::getGenderByCookie();
|
|
|
310
|
+ $channel = Helpers::getChannelByCookie();
|
|
|
311
|
+ $uid = $this->getUid();
|
|
|
312
|
+ $uid = '7566245'; //临时测试用
|
|
|
313
|
+ $data = GradeModel::getGrade($gender, $channel, $uid);
|
|
|
314
|
+ $data['pageFooter'] = true;
|
|
|
315
|
+ $this->_view->display('vip-grade', $data);
|
|
|
316
|
+ }
|
|
|
317
|
+
|
|
|
318
|
+ /*
|
|
|
319
|
+ * 会员特权查看页
|
|
|
320
|
+ */
|
|
|
321
|
+
|
|
|
322
|
+ public function preferentialAction() {
|
|
|
323
|
+ //设置网站seo信息
|
|
|
324
|
+ $this->setTitle('会员等级');
|
|
|
325
|
+ //显示网站导航头部信息
|
|
|
326
|
+ $this->setNavHeader('会员特权详情');
|
|
|
327
|
+
|
|
|
328
|
+ $channel = Helpers::getChannelByCookie();
|
|
|
329
|
+ $uid = $this->getUid();
|
|
|
330
|
+ $data = GradeModel::getPreferential($channel, $uid);
|
|
|
331
|
+ $data['pageFooter'] = true;
|
|
|
332
|
+ $this->_view->display('privilege', $data);
|
|
|
333
|
+ }
|
|
|
334
|
+
|
|
|
335
|
+ /*
|
|
|
336
|
+ * 我的订单页面
|
|
|
337
|
+ */
|
|
|
338
|
+
|
|
|
339
|
+ public function orderAction() {
|
|
|
340
|
+
|
|
|
341
|
+// do {
|
|
|
342
|
+// //判断是不是ajax请求
|
360
|
// if(!$this -> isAjax()){
|
343
|
// if(!$this -> isAjax()){
|
361
|
// break;
|
344
|
// break;
|
362
|
// }
|
345
|
// }
|
363
|
- //判断参数是否有效
|
|
|
364
|
- $type = $this -> get('type',1);
|
|
|
365
|
- $page = $this -> get('page',1);
|
|
|
366
|
- $limit = $this -> get('limit',10);
|
|
|
367
|
- $gender = Helpers::getGenderByCookie();
|
|
|
368
|
- $yh_channel = $this -> get('yh_channel',1);
|
|
|
369
|
- $uid = $this -> getUid();
|
|
|
370
|
- if(!empty($type) && !is_numeric($type)){
|
|
|
371
|
- break;
|
|
|
372
|
- }
|
|
|
373
|
- //$data = OrderModel::getOrder();
|
|
|
374
|
- $data = OrderModel::getOrder($type,$page,$limit,$gender,$yh_channel,$uid);
|
|
|
375
|
- //print_r($data);
|
|
|
376
|
- }
|
|
|
377
|
- while(false);
|
|
|
378
|
- //$this -> _view -> display('order',$data);
|
346
|
+ //判断参数是否有效
|
|
|
347
|
+ $type = $this->get('type', 1);
|
|
|
348
|
+ $page = $this->get('page', 1);
|
|
|
349
|
+ $limit = $this->get('limit', 10);
|
|
|
350
|
+ $gender = Helpers::getGenderByCookie();
|
|
|
351
|
+ $yh_channel = $this->get('yh_channel', 1);
|
|
|
352
|
+ //$uid = $this->getUid();
|
|
|
353
|
+ $uid = '7566245';
|
|
|
354
|
+ if (!empty($type) && !is_numeric($type)) {
|
|
|
355
|
+ break;
|
379
|
}
|
356
|
}
|
|
|
357
|
+ //$data = OrderModel::getOrder();
|
|
|
358
|
+ $data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid);
|
|
|
359
|
+ print_r($data);
|
|
|
360
|
+ //} while (false);
|
|
|
361
|
+ //$this -> _view -> display('order',$data);
|
|
|
362
|
+ }
|
|
|
363
|
+
|
380
|
} |
364
|
} |