Authored by uedxwg

Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop

@@ -15,11 +15,10 @@ class GradeData @@ -15,11 +15,10 @@ class GradeData
15 /** 15 /**
16 * 获取会员等级数据 16 * 获取会员等级数据
17 * @param string $yh_channel 频道数据,1->男,2->女,3->潮童,4->创意生活,5->其他 17 * @param string $yh_channel 频道数据,1->男,2->女,3->潮童,4->创意生活,5->其他
18 - * @param strint $gender 用户性别  
19 * @param string $uid 用户id 18 * @param string $uid 用户id
20 * @return array 接口返回的会员等级数据 19 * @return array 接口返回的会员等级数据
21 */ 20 */
22 - public static function getGradeData($gender, $channel, $uid) { 21 + public static function getGradeData($channel, $uid) {
23 $urlList = array(); 22 $urlList = array();
24 //获取会员等级数据 23 //获取会员等级数据
25 $param = Yohobuy::param(); 24 $param = Yohobuy::param();
@@ -31,9 +30,7 @@ class GradeData @@ -31,9 +30,7 @@ class GradeData
31 30
32 //获取用户基本信息数据(用来得到username) 31 //获取用户基本信息数据(用来得到username)
33 $param = Yohobuy::param(); 32 $param = Yohobuy::param();
34 - $param['gender'] = $gender;  
35 $param['uid'] = $uid; 33 $param['uid'] = $uid;
36 - $param['yh_channel'] = $channel;  
37 $param['method'] = 'app.passport.profile'; 34 $param['method'] = 'app.passport.profile';
38 $param['client_secret'] = Sign::getSign($param); 35 $param['client_secret'] = Sign::getSign($param);
39 $urlList['userProfile'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param); 36 $urlList['userProfile'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL, $param);
@@ -47,7 +44,7 @@ class GradeData @@ -47,7 +44,7 @@ class GradeData
47 * @param string $uid 用户id 44 * @param string $uid 用户id
48 * @return array 接口返回的会员特权详情数据 45 * @return array 接口返回的会员特权详情数据
49 */ 46 */
50 - public function getPreferentialData($channel, $uid) { 47 + public static function getPreferentialData($channel, $uid) {
51 48
52 $param = Yohobuy::param(); 49 $param = Yohobuy::param();
53 $param['yh_channel'] = $channel; 50 $param['yh_channel'] = $channel;
@@ -141,6 +141,7 @@ class UserData @@ -141,6 +141,7 @@ class UserData
141 $param = Yohobuy::param(); 141 $param = Yohobuy::param();
142 $param['method'] = 'app.favorite.cancel'; 142 $param['method'] = 'app.favorite.cancel';
143 $param['type'] = 'product'; 143 $param['type'] = 'product';
  144 + $param['uid'] = $uid;
144 $param['fav_id'] = $fav_id; 145 $param['fav_id'] = $fav_id;
145 $param['client_secret'] = Sign::getSign($param); 146 $param['client_secret'] = Sign::getSign($param);
146 147
No preview for this file type
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > 2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3 <svg xmlns="http://www.w3.org/2000/svg"> 3 <svg xmlns="http://www.w3.org/2000/svg">
4 <metadata> 4 <metadata>
5 -Created by FontForge 20120731 at Mon Nov 16 18:08:15 2015 5 +Created by FontForge 20120731 at Mon Nov 23 16:04:11 2015
6 By Ads 6 By Ads
7 </metadata> 7 </metadata>
8 <defs> 8 <defs>
@@ -13,10 +13,10 @@ Created by FontForge 20120731 at Mon Nov 16 18:08:15 2015 @@ -13,10 +13,10 @@ Created by FontForge 20120731 at Mon Nov 16 18:08:15 2015
13 font-stretch="normal" 13 font-stretch="normal"
14 units-per-em="1024" 14 units-per-em="1024"
15 panose-1="2 0 6 3 0 0 0 0 0 0" 15 panose-1="2 0 6 3 0 0 0 0 0 0"
16 - ascent="812"  
17 - descent="-212" 16 + ascent="896"
  17 + descent="-128"
18 x-height="792" 18 x-height="792"
19 - bbox="-0.75 -224 3943 812.871" 19 + bbox="-0.75 -224 3943 833"
20 underline-thickness="50" 20 underline-thickness="50"
21 underline-position="-100" 21 underline-position="-100"
22 unicode-range="U+0078-E63E" 22 unicode-range="U+0078-E63E"
@@ -237,6 +237,11 @@ t-38 -158.5q0 -78 33 -148.5t93 -125.5l-77 -123q-8 -12 -6.5 -26t10.5 -25l5 -5q2 - @@ -237,6 +237,11 @@ t-38 -158.5q0 -78 33 -148.5t93 -125.5l-77 -123q-8 -12 -6.5 -26t10.5 -25l5 -5q2 -
237 q10 10 11 24t-7 26zM286 160q0 -17 2 -35v1q-35 16 -64.5 38t-53 48t-40.5 55.5t-26 62.5t-9 67q0 85 51.5 157t139.5 114t192 42q142 0 249.5 -76.5t128.5 -189.5q-43 21 -91 32t-98 11q-39 0 -77 -6.5t-71.5 -19t-64.5 -30.5t-56.5 -40t-46.5 -48.5t-35.5 -55.5t-22 -61 237 q10 10 11 24t-7 26zM286 160q0 -17 2 -35v1q-35 16 -64.5 38t-53 48t-40.5 55.5t-26 62.5t-9 67q0 85 51.5 157t139.5 114t192 42q142 0 249.5 -76.5t128.5 -189.5q-43 21 -91 32t-98 11q-39 0 -77 -6.5t-71.5 -19t-64.5 -30.5t-56.5 -40t-46.5 -48.5t-35.5 -55.5t-22 -61
238 t-7.5 -66zM381 160q0 63 38.5 116.5t104 84.5t143.5 31q118 0 202 -68t84 -164q0 -62 -38.5 -115.5t-104.5 -84.5t-143 -31q-118 0 -202 68t-84 163zM527 191q-16 0 -27.5 -11t-11.5 -27q0 -11 5.5 -20t14.5 -14t19 -5q16 0 27.5 11.5t11.5 27.5t-11.5 27t-27.5 11zM667 191 238 t-7.5 -66zM381 160q0 63 38.5 116.5t104 84.5t143.5 31q118 0 202 -68t84 -164q0 -62 -38.5 -115.5t-104.5 -84.5t-143 -31q-118 0 -202 68t-84 163zM527 191q-16 0 -27.5 -11t-11.5 -27q0 -11 5.5 -20t14.5 -14t19 -5q16 0 27.5 11.5t11.5 27.5t-11.5 27t-27.5 11zM667 191
239 q-16 0 -27.5 -11t-11.5 -27t11.5 -27.5t27.5 -11.5q10 0 19 5t14.5 14t5.5 20q0 7 -3.5 14.5t-8.5 12.5t-12 8t-15 3zM806 191q-16 0 -27 -11t-11 -27t11 -27.5t27 -11.5t27.5 11.5t11.5 27.5q0 7 -3 14.5t-8 12.5t-12.5 8t-15.5 3z" /> 239 q-16 0 -27.5 -11t-11.5 -27t11.5 -27.5t27.5 -11.5q10 0 19 5t14.5 14t5.5 20q0 7 -3.5 14.5t-8.5 12.5t-12 8t-15 3zM806 191q-16 0 -27 -11t-11 -27t11 -27.5t27 -11.5t27.5 11.5t11.5 27.5q0 7 -3 14.5t-8 12.5t-12.5 8t-15.5 3z" />
  240 + <glyph glyph-name="uniE63D" unicode="&#xe63d;"
  241 +d="M512 13q-131 0 -241.5 55t-175 149.5t-64.5 205.5t64.5 205.5t175 149.5t241.5 55q98 0 187 -32.5t153.5 -87.5t102.5 -131t38 -159q0 -111 -64.5 -205.5t-175 -149.5t-241.5 -55zM512 751q-54 0 -106 -12t-95.5 -33t-80.5 -51.5t-63 -66.5t-40 -78.5t-14 -86.5
  242 +q0 -89 53.5 -164.5t145.5 -119.5t200 -44q65 0 126 16.5t110 47t86 71t57 90.5t20 103q0 89 -53.5 164.5t-145.5 119.5t-200 44zM730 75l184 -82l-102 164zM914 -44q-8 0 -15 3l-184 82q-14 6 -19.5 20.5t0.5 28.5q3 7 8.5 12t12 7.5t14 2t14.5 -3.5l74 -33l-39 62
  243 +q-4 6 -5 13.5t0.5 14.5t6 13t10.5 10q13 8 28 4.5t23 -16.5l102 -164q15 -23 -3 -43q-4 -4 -8.5 -7t-9.5 -4.5t-10 -1.5zM379 413q0 -22 -15 -37t-36.5 -15t-36.5 15t-15 37q0 7 2 13.5t5.5 12t8 10.5t10 8t12.5 5t14 2q10 0 19.5 -4t16.5 -11t11 -16.5t4 -19.5zM563 413
  244 +q0 -14 -7 -26t-18.5 -19t-25.5 -7t-25.5 7t-18.5 19t-7 26q0 21 15 36t36 15q14 0 25.5 -7t18.5 -18.5t7 -25.5zM748 413q0 -22 -15 -37t-36.5 -15t-36.5 15t-15 36.5t15 36.5t36 15q14 0 26 -7t19 -18.5t7 -25.5z" />
240 <glyph glyph-name="uniE63E" unicode="&#xe63e;" 245 <glyph glyph-name="uniE63E" unicode="&#xe63e;"
241 d="M521 317zM768 -178h-1h-1h-1h-1h-1h-1h-1h-1h-1h-1h-1q-11 1 -23 2h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1l-1 1h-1h-1 246 d="M521 317zM768 -178h-1h-1h-1h-1h-1h-1h-1h-1h-1h-1h-1q-11 1 -23 2h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1h-1l-1 1h-1h-1l-1 1h-1h-1
242 h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1 247 h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1l-1 1h-1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1l-1 1h-1h-1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1l-1 1h-1l-1 1h-1h-1l-1 1h-1h-1l-1 1
No preview for this file type
No preview for this file type
@@ -398,8 +398,8 @@ if ($brandHeader.length > 0) { @@ -398,8 +398,8 @@ if ($brandHeader.length > 0) {
398 398
399 //品牌收藏 399 //品牌收藏
400 brandColHammer = new Hammer($brandHeader.children('.btn-col')[0]); 400 brandColHammer = new Hammer($brandHeader.children('.btn-col')[0]);
401 - brandColHammer.on('tap', function() {  
402 - var $this = $(this); 401 + brandColHammer.on('tap', function(e) {
  402 + var $this = $(e.target).closest('.btn-col');
403 403
404 var id = $brandHeader.data('id'), 404 var id = $brandHeader.data('id'),
405 opt; 405 opt;
@@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
88 <span class="iconfont num">&#xe604;</span> 88 <span class="iconfont num">&#xe604;</span>
89 </a> 89 </a>
90 <a class="list-item" href="/home/suggest"> 90 <a class="list-item" href="/home/suggest">
91 - <span class="iconfont icon">&#xe63c;</span> 91 + <span class="iconfont icon">&#xe63d;</span>
92 意见反馈 92 意见反馈
93 <span class="iconfont num">&#xe604;</span> 93 <span class="iconfont num">&#xe604;</span>
94 </a> 94 </a>
1 <?php 1 <?php
2 2
3 use Action\AbstractAction; 3 use Action\AbstractAction;
  4 +use Home\GradeModel;
  5 +use Home\OrderModel;
4 use Plugin\Helpers; 6 use Plugin\Helpers;
5 use LibModels\Wap\Home\OrderData; 7 use LibModels\Wap\Home\OrderData;
  8 +use Index\UserModel as UserModel;
6 9
7 /** 10 /**
8 * 个人中心相关的控制器 11 * 个人中心相关的控制器
@@ -49,12 +52,12 @@ class HomeController extends AbstractAction @@ -49,12 +52,12 @@ class HomeController extends AbstractAction
49 $uid = $this->getUid(); 52 $uid = $this->getUid();
50 if ($uid) { 53 if ($uid) {
51 $data['isLogin'] = true; 54 $data['isLogin'] = true;
52 - $data += \Index\UserModel::getUserProfileData($uid);  
53 - $data += \Index\UserModel::getInfoNumData($uid); 55 + $data += UserModel::getUserProfileData($uid);
  56 + $data += UserModel::getInfoNumData($uid);
54 57
55 // 优选新品数据 58 // 优选新品数据
56 $channel = Helpers::getChannelByCookie(); 59 $channel = Helpers::getChannelByCookie();
57 - $data['recommendForYou'] = \Index\UserModel::getPreferenceData($channel); 60 + $data['recommendForYou'] = UserModel::getPreferenceData($channel);
58 } 61 }
59 62
60 $this->_view->display('index', $data); 63 $this->_view->display('index', $data);
@@ -73,8 +76,8 @@ class HomeController extends AbstractAction @@ -73,8 +76,8 @@ class HomeController extends AbstractAction
73 $uid = $this->getUid(); 76 $uid = $this->getUid();
74 $gender = Helpers::getGenderByCookie(); 77 $gender = Helpers::getGenderByCookie();
75 78
76 - $favProducts = \Index\UserModel::getFavProductData($uid);  
77 - $favBrands = \Index\UserModel::getFavBrandData($uid, $gender); 79 + $favProducts = UserModel::getFavProductData($uid);
  80 + $favBrands = UserModel::getFavBrandData($uid, $gender);
78 81
79 $data = array( 82 $data = array(
80 'favPage' => true, //加载js 83 'favPage' => true, //加载js
@@ -104,7 +107,7 @@ class HomeController extends AbstractAction @@ -104,7 +107,7 @@ class HomeController extends AbstractAction
104 $uid = $this->getUid(); 107 $uid = $this->getUid();
105 $fav_id = $this->post('fav_id', 0); 108 $fav_id = $this->post('fav_id', 0);
106 109
107 - $result = \Index\UserModel::favoriteDelete($uid, $fav_id); 110 + $result = UserModel::favoriteDelete($uid, $fav_id);
108 } 111 }
109 112
110 if (empty($result)) { 113 if (empty($result)) {
@@ -123,7 +126,7 @@ class HomeController extends AbstractAction @@ -123,7 +126,7 @@ class HomeController extends AbstractAction
123 $this->setNavHeader('个人信息', true, SITE_MAIN); 126 $this->setNavHeader('个人信息', true, SITE_MAIN);
124 127
125 $uid = $this->getUid(); 128 $uid = $this->getUid();
126 - $data = \Index\UserModel::getUserProfileData($uid); 129 + $data = UserModel::getUserProfileData($uid);
127 $data['personalDetailsPage'] = true; 130 $data['personalDetailsPage'] = true;
128 $data['pageFooter'] = true; 131 $data['pageFooter'] = true;
129 $this->_view->display('personal-details', $data); 132 $this->_view->display('personal-details', $data);
@@ -138,7 +141,7 @@ class HomeController extends AbstractAction @@ -138,7 +141,7 @@ class HomeController extends AbstractAction
138 $this->setNavHeader('YOHO币', true, false); 141 $this->setNavHeader('YOHO币', true, false);
139 142
140 $uid = $this->getUid(); 143 $uid = $this->getUid();
141 - $currency = \Index\UserModel::getYohoCoinData($uid); 144 + $currency = UserModel::getYohoCoinData($uid);
142 145
143 $currency['pageFooter'] = true; 146 $currency['pageFooter'] = true;
144 $this->_view->display('currency', $currency); 147 $this->_view->display('currency', $currency);
@@ -154,7 +157,7 @@ class HomeController extends AbstractAction @@ -154,7 +157,7 @@ class HomeController extends AbstractAction
154 157
155 $uid = $this->getUid(); 158 $uid = $this->getUid();
156 $coupons = array( 159 $coupons = array(
157 - 'couponsUrl' => \Index\UserModel::getCouponData($uid), 160 + 'couponsUrl' => UserModel::getCouponData($uid),
158 'couponsPage' => true 161 'couponsPage' => true
159 ); 162 );
160 $this->_view->display('coupons', $coupons); 163 $this->_view->display('coupons', $coupons);
@@ -169,7 +172,7 @@ class HomeController extends AbstractAction @@ -169,7 +172,7 @@ class HomeController extends AbstractAction
169 $page = $this->get('page', 0); 172 $page = $this->get('page', 0);
170 $size = $this->get('size', 10); 173 $size = $this->get('size', 10);
171 174
172 - $messages = \Index\UserModel::getMessageData($uid, $page, $size); 175 + $messages = UserModel::getMessageData($uid, $page, $size);
173 176
174 print_r($messages); 177 print_r($messages);
175 } 178 }
@@ -184,8 +187,8 @@ class HomeController extends AbstractAction @@ -184,8 +187,8 @@ class HomeController extends AbstractAction
184 $this->setNavHeader('地址管理'); 187 $this->setNavHeader('地址管理');
185 188
186 $uid = $this->getUid(); 189 $uid = $this->getUid();
187 - $address = \Index\UserModel::getAddressData($uid);  
188 - $addressList = \Index\UserModel::getAddressListData($uid); 190 + $address = UserModel::getAddressData($uid);
  191 + $addressList = UserModel::getAddressListData($uid);
189 192
190 $this->_view->display('address', array( 193 $this->_view->display('address', array(
191 'addressPage' => true, 194 'addressPage' => true,
@@ -212,7 +215,7 @@ class HomeController extends AbstractAction @@ -212,7 +215,7 @@ class HomeController extends AbstractAction
212 $mobile = $this->post('mobile', ''); 215 $mobile = $this->post('mobile', '');
213 $zip_code = $this->post('zip_code', ''); 216 $zip_code = $this->post('zip_code', '');
214 217
215 - $result = \Index\UserModel::saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code); 218 + $result = UserModel::saveAddressData($uid, $address, $area_code, $consignee, $email, $id, $mobile, $zip_code);
216 } 219 }
217 220
218 if (empty($result)) { 221 if (empty($result)) {
@@ -232,7 +235,7 @@ class HomeController extends AbstractAction @@ -232,7 +235,7 @@ class HomeController extends AbstractAction
232 if ($this->isAjax()) { 235 if ($this->isAjax()) {
233 $uid = $this->getUid(); 236 $uid = $this->getUid();
234 $id = $this->post('id', ''); 237 $id = $this->post('id', '');
235 - $result = \Index\UserModel::setDefaultAddress($uid, $id); 238 + $result = UserModel::setDefaultAddress($uid, $id);
236 } 239 }
237 240
238 if (empty($result)) { 241 if (empty($result)) {
@@ -253,7 +256,7 @@ class HomeController extends AbstractAction @@ -253,7 +256,7 @@ class HomeController extends AbstractAction
253 $uid = $this->getUid(); 256 $uid = $this->getUid();
254 $id = $this->post('id', ''); 257 $id = $this->post('id', '');
255 258
256 - $result = \Index\UserModel::deleteAddress($uid, $id); 259 + $result = UserModel::deleteAddress($uid, $id);
257 } 260 }
258 261
259 if (empty($result)) { 262 if (empty($result)) {
@@ -330,7 +333,7 @@ class HomeController extends AbstractAction @@ -330,7 +333,7 @@ class HomeController extends AbstractAction
330 $page = $this->get('page', 1); 333 $page = $this->get('page', 1);
331 $limit = $this->get('limit', 30); 334 $limit = $this->get('limit', 30);
332 335
333 - $suggest = \Index\UserModel::getSuggestData($udid, $page, $limit); 336 + $suggest = UserModel::getSuggestData($udid, $page, $limit);
334 337
335 $this->_view->display('suggest', array( 338 $this->_view->display('suggest', array(
336 'suggestPage' => true, //加载js 339 'suggestPage' => true, //加载js
@@ -368,7 +371,7 @@ class HomeController extends AbstractAction @@ -368,7 +371,7 @@ class HomeController extends AbstractAction
368 public function suggestimgUploadAction() 371 public function suggestimgUploadAction()
369 { 372 {
370 //$filename = $this->post('filename', ''); 373 //$filename = $this->post('filename', '');
371 - $result = \Index\UserModel::saveSuggestImg('fileData'); 374 + $result = UserModel::saveSuggestImg('fileData');
372 375
373 $this->echoJson($result); 376 $this->echoJson($result);
374 } 377 }
@@ -383,7 +386,7 @@ class HomeController extends AbstractAction @@ -383,7 +386,7 @@ class HomeController extends AbstractAction
383 $content = $this->post('content', ''); 386 $content = $this->post('content', '');
384 $suggest_type = $this->post('suggest_type', 2); 387 $suggest_type = $this->post('suggest_type', 2);
385 $image = $this->post('image', null); 388 $image = $this->post('image', null);
386 - $result = \Index\UserModel::saveSuggestData($uid, $content, $image, $suggest_type); 389 + $result = UserModel::saveSuggestData($uid, $content, $image, $suggest_type);
387 390
388 $this->echoJson($result); 391 $this->echoJson($result);
389 } 392 }
@@ -398,7 +401,7 @@ class HomeController extends AbstractAction @@ -398,7 +401,7 @@ class HomeController extends AbstractAction
398 $uid = $this->getUid(); 401 $uid = $this->getUid();
399 $udid = $this->getUdid(); 402 $udid = $this->getUdid();
400 $suggest_id = $this->post('suggest_id', 0); 403 $suggest_id = $this->post('suggest_id', 0);
401 - $result = \Index\UserModel::upAndDown($uid, $udid, $suggest_id); 404 + $result = UserModel::upAndDown($uid, $udid, $suggest_id);
402 405
403 $this->echoJson($result); 406 $this->echoJson($result);
404 } 407 }
@@ -417,7 +420,7 @@ class HomeController extends AbstractAction @@ -417,7 +420,7 @@ class HomeController extends AbstractAction
417 $gender = Helpers::getGenderByCookie(); 420 $gender = Helpers::getGenderByCookie();
418 $channel = Helpers::getChannelByCookie(); 421 $channel = Helpers::getChannelByCookie();
419 $uid = $this->getUid(); 422 $uid = $this->getUid();
420 - $data = \Home\GradeModel::getGrade($gender, $channel, $uid); 423 + $data = GradeModel::getGrade($gender, $channel, $uid);
421 $data['pageFooter'] = true; 424 $data['pageFooter'] = true;
422 $this->_view->display('vip-grade', $data); 425 $this->_view->display('vip-grade', $data);
423 } 426 }
@@ -434,7 +437,7 @@ class HomeController extends AbstractAction @@ -434,7 +437,7 @@ class HomeController extends AbstractAction
434 437
435 $channel = Helpers::getChannelByCookie(); 438 $channel = Helpers::getChannelByCookie();
436 $uid = $this->getUid(); 439 $uid = $this->getUid();
437 - $data = \Home\GradeModel::getPreferential($channel, $uid); 440 + $data = GradeModel::getPreferential($channel, $uid);
438 $data['pageFooter'] = true; 441 $data['pageFooter'] = true;
439 442
440 $this->_view->display('privilege', $data); 443 $this->_view->display('privilege', $data);
@@ -449,7 +452,7 @@ class HomeController extends AbstractAction @@ -449,7 +452,7 @@ class HomeController extends AbstractAction
449 $type = $this->get('type', 1); 452 $type = $this->get('type', 1);
450 $this->setTitle('我的订单'); 453 $this->setTitle('我的订单');
451 $this->setNavHeader('我的订单'); 454 $this->setNavHeader('我的订单');
452 - $data = \Home\OrderModel::getNavs($type); 455 + $data = OrderModel::getNavs($type);
453 if (!empty($data)) { 456 if (!empty($data)) {
454 $order['navs'] = $data; 457 $order['navs'] = $data;
455 } else { 458 } else {
@@ -478,7 +481,7 @@ class HomeController extends AbstractAction @@ -478,7 +481,7 @@ class HomeController extends AbstractAction
478 $yh_channel = $this->get('yh_channel', 1); 481 $yh_channel = $this->get('yh_channel', 1);
479 $uid = $this->getUid(); 482 $uid = $this->getUid();
480 //调用模型层getOrder方法获得并处理数据 483 //调用模型层getOrder方法获得并处理数据
481 - $data = \Home\OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid); 484 + $data = OrderModel::getOrder($type, $page, $limit, $gender, $yh_channel, $uid);
482 /* 如果取不到订单数据时,分两种情况: 485 /* 如果取不到订单数据时,分两种情况:
483 1、page>1时,echo一个空格字符串到浏览器。 486 1、page>1时,echo一个空格字符串到浏览器。
484 2、page=1时,就给一个随便逛逛的链接。 487 2、page=1时,就给一个随便逛逛的链接。
@@ -515,7 +518,7 @@ class HomeController extends AbstractAction @@ -515,7 +518,7 @@ class HomeController extends AbstractAction
515 $yh_channel = $this->get('yh_channel', 1); 518 $yh_channel = $this->get('yh_channel', 1);
516 $method = 'app.SpaceOrders.close'; 519 $method = 'app.SpaceOrders.close';
517 //调用取消订单接口,返回订单取消状态 520 //调用取消订单接口,返回订单取消状态
518 - $data = \Home\OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method); 521 + $data = OrderData::cancelOrderData($order_code, $uid, $gender, $yh_channel, $method);
519 //将取消状态返回至浏览器 522 //将取消状态返回至浏览器
520 $this->echoJson($data); 523 $this->echoJson($data);
521 } 524 }
@@ -537,7 +540,7 @@ class HomeController extends AbstractAction @@ -537,7 +540,7 @@ class HomeController extends AbstractAction
537 $yh_channel = $this->get('yh_channel', 1); 540 $yh_channel = $this->get('yh_channel', 1);
538 $method = 'app.SpaceOrders.delOrderByCode'; 541 $method = 'app.SpaceOrders.delOrderByCode';
539 //调用接口删除订单,并返回订单删除状态 542 //调用接口删除订单,并返回订单删除状态
540 - $data = \Home\OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method); 543 + $data = OrderData::deleteOrderData($order_code, $uid, $gender, $yh_channel, $method);
541 //将订单删除状态返回至浏览器 544 //将订单删除状态返回至浏览器
542 $this->echoJson($data); 545 $this->echoJson($data);
543 } 546 }
@@ -550,7 +553,7 @@ class HomeController extends AbstractAction @@ -550,7 +553,7 @@ class HomeController extends AbstractAction
550 { 553 {
551 $gender = Helpers::getGenderByCookie(); 554 $gender = Helpers::getGenderByCookie();
552 $yh_channel = $this->get('yh_channel', 1); 555 $yh_channel = $this->get('yh_channel', 1);
553 - \Home\OrderModel::payment($gender, $yh_channel); 556 + OrderModel::payment($gender, $yh_channel);
554 } 557 }
555 558
556 /* 559 /*
@@ -563,7 +566,7 @@ class HomeController extends AbstractAction @@ -563,7 +566,7 @@ class HomeController extends AbstractAction
563 $gender = Helpers::getGenderByCookie(); 566 $gender = Helpers::getGenderByCookie();
564 $yh_channel = $this->get('yh_channel', 1); 567 $yh_channel = $this->get('yh_channel', 1);
565 //调用接口获取随便逛逛url地址,并return数据 568 //调用接口获取随便逛逛url地址,并return数据
566 - $data = \Home\OrderModel::stroll($gender, $yh_channel); 569 + $data = OrderModel::stroll($gender, $yh_channel);
567 return $data; 570 return $data;
568 } 571 }
569 572
@@ -2,7 +2,9 @@ @@ -2,7 +2,9 @@
2 2
3 namespace Home; 3 namespace Home;
4 4
  5 +use Configs\CacheConfig;
5 use LibModels\Wap\Home\GradeData; 6 use LibModels\Wap\Home\GradeData;
  7 +use Plugin\Cache;
6 use Plugin\Helpers; 8 use Plugin\Helpers;
7 9
8 /** 10 /**
@@ -13,7 +15,6 @@ class GradeModel @@ -13,7 +15,6 @@ class GradeModel
13 /* 15 /*
14 * 获取个人中心-会员等级数据 16 * 获取个人中心-会员等级数据
15 */ 17 */
16 -  
17 public static function getGrade($gender, $channel, $uid) 18 public static function getGrade($gender, $channel, $uid)
18 { 19 {
19 $result = array(); 20 $result = array();
@@ -26,7 +27,7 @@ class GradeModel @@ -26,7 +27,7 @@ class GradeModel
26 } 27 }
27 } 28 }
28 //调用接口获取数据 29 //调用接口获取数据
29 - $data = GradeData::getGradeData($gender, $channel, $uid); 30 + $data = GradeData::getGradeData($channel, $uid);
30 31
31 if (!empty($data['grade'])) { 32 if (!empty($data['grade'])) {
32 switch (intval($data['grade']['current_vip_level'])) { 33 switch (intval($data['grade']['current_vip_level'])) {
@@ -57,7 +58,7 @@ class GradeModel @@ -57,7 +58,7 @@ class GradeModel
57 $result['vipGrade']['sumCost'] = $data['grade']['current_total_cost']; 58 $result['vipGrade']['sumCost'] = $data['grade']['current_total_cost'];
58 //username 调用获取用户基本信息数据,获得username; 59 //username 调用获取用户基本信息数据,获得username;
59 //$userProfile = GradeData::getUserProfileData($gender,$uid,$channel); 60 //$userProfile = GradeData::getUserProfileData($gender,$uid,$channel);
60 - $result['vipGrade']['name'] = $data['userProfile']['username']; 61 + $result['vipGrade']['name'] = !empty($data['userProfile']) ? $data['userProfile']['username'] : '';
61 //跳转url(会员特权详情) 62 //跳转url(会员特权详情)
62 $result['vipGrade']['allUrl'] = Helpers::url('/Home/preferential', null); 63 $result['vipGrade']['allUrl'] = Helpers::url('/Home/preferential', null);
63 //当前vip等级享受的特权 64 //当前vip等级享受的特权
@@ -82,7 +83,7 @@ class GradeModel @@ -82,7 +83,7 @@ class GradeModel
82 * 获取个人中心-会员特权详情页 83 * 获取个人中心-会员特权详情页
83 */ 84 */
84 85
85 - public function getPreferential($channel, $uid) 86 + public static function getPreferential($channel, $uid)
86 { 87 {
87 $result = array(); 88 $result = array();
88 89
@@ -2,7 +2,9 @@ @@ -2,7 +2,9 @@
2 2
3 namespace Index; 3 namespace Index;
4 4
  5 +use Configs\CacheConfig;
5 use LibModels\Wap\Home\UserData; 6 use LibModels\Wap\Home\UserData;
  7 +use Plugin\Cache;
6 use Plugin\Helpers; 8 use Plugin\Helpers;
7 use Plugin\Images; 9 use Plugin\Images;
8 10