Authored by xuqi

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

@@ -15,6 +15,7 @@ namespace Action; @@ -15,6 +15,7 @@ namespace Action;
15 use Yaf\Controller_Abstract; 15 use Yaf\Controller_Abstract;
16 use Yaf\Dispatcher; 16 use Yaf\Dispatcher;
17 use Hood\Cache; 17 use Hood\Cache;
  18 +use LibModels\Wap\Home\SideData;
18 19
19 class AbstractAction extends Controller_Abstract 20 class AbstractAction extends Controller_Abstract
20 { 21 {
@@ -261,5 +262,78 @@ class AbstractAction extends Controller_Abstract @@ -261,5 +262,78 @@ class AbstractAction extends Controller_Abstract
261 262
262 $this->_view->assign('footer', $footer); 263 $this->_view->assign('footer', $footer);
263 } 264 }
  265 +
  266 + /**
  267 + * 设置侧边栏信息
  268 + *
  269 + * @param string $guangChoosed 逛默认选中项 "all"表示全部,"boys":只看男生,"girls":只看女生
  270 + * @return void
  271 + */
  272 + protected function setNavSide($guangChoosed = 'all')
  273 + {
  274 + $this->_view->assign('subNav', array(
  275 + 0 => array(
  276 + 'textCn' => '男生',
  277 + 'textEn' => 'BOYS',
  278 + 'styleClass' => 'boys',
  279 + 'url' => '/boys.html',
  280 + ),
  281 + 1 => array(
  282 + 'textCn' => '女生',
  283 + 'textEn' => 'GIRLS',
  284 + 'styleClass' => 'girls',
  285 + 'url' => '/girls.html',
  286 + ),
  287 + 2 => array(
  288 + 'textCn' => '潮童',
  289 + 'textEn' => 'KIDS',
  290 + 'styleClass' => 'kids',
  291 + 'url' => '/kids.html',
  292 + ),
  293 + 3 => array(
  294 + 'textCn' => '创意生活',
  295 + 'textEn' => 'LIFE STYLE',
  296 + 'styleClass' => 'life',
  297 + 'url' => '/life.html',
  298 + ),
  299 + 4 => array(
  300 + 'textCn' => '逛',
  301 + 'textEn' => 'TRENDFINDER',
  302 + 'styleClass' => 'guang',
  303 + 'url' => '/guang.html',
  304 + 'subNav' => array(
  305 + 'list' => array(
  306 + 0 => array(
  307 + 'textCn' => '逛',
  308 + 'textEn' => 'TrendFinder',
  309 + 'back' => true,
  310 + 'isSelect' => false,
  311 + ),
  312 + 1 => array(
  313 + 'textCn' => '查看全部',
  314 + 'textEn' => '',
  315 + 'back' => false,
  316 + 'isSelect' => ($guangChoosed === 'all') ? true : false,
  317 + 'url' => '/guang/list/index?gender=1,2,3'
  318 + ),
  319 + 2 => array(
  320 + 'textCn' => '只看男生',
  321 + 'textEn' => 'Boys',
  322 + 'back' => false,
  323 + 'isSelect' => ($guangChoosed === 'boys') ? true : false,
  324 + 'url' => '/guang/list/index?gender=1,3'
  325 + ),
  326 + 3 => array(
  327 + 'textCn' => '只看女生',
  328 + 'textEn' => 'Girls',
  329 + 'back' => false,
  330 + 'isSelect' => ($guangChoosed === 'girls') ? true : false,
  331 + 'url' => '/guang/list/index?gender=2,3',
  332 + ),
  333 + )
  334 + )
  335 + ),
  336 + ));
  337 + }
264 338
265 } 339 }
  1 +<?php
  2 +
  3 +namespace LibModels\Wap\Home;
  4 +
  5 +use Api\Sign;
  6 +use Api\Yohobuy;
  7 +
  8 +/**
  9 + * 侧边栏的数据模型
  10 + *
  11 + * @name SideData
  12 + * @package LibModels/Wap/Home
  13 + * @copyright yoho.inc
  14 + * @version 1.0 (2015-10-13 17:42:27)
  15 + * @author fei.hong <fei.hong@yoho.cn>
  16 + */
  17 +class SideData
  18 +{
  19 + const URI_LEFTNAV_ENTRANCE = 'operations/api/v5/entrance/getEntrance';
  20 + const URI_LEFTNAV_CATEGORY = 'operations/api/v5/category/getCategory';
  21 +
  22 + /**
  23 + * 左侧边栏的分类和图标数据
  24 + *
  25 + * 备注:暂不使用,因很少变,获取后还需要再封装
  26 + *
  27 + * @return array
  28 + */
  29 + public static function leftNav()
  30 + {
  31 + $param = Yohobuy::param();
  32 + $param['client_type'] = 'iphone'; // 因安卓不返回icon的地址
  33 + $param['client_secret'] = Sign::getSign($param);
  34 + $query = Yohobuy::httpBuildQuery('', $param);
  35 +
  36 + $urlList = array();
  37 + $urlList['getEntrance'] = Yohobuy::SERVICE_URL . self::URI_LEFTNAV_ENTRANCE . $query;
  38 + $urlList['getCategory'] = Yohobuy::SERVICE_URL . self::URI_LEFTNAV_CATEGORY . $query;
  39 +
  40 + return Yohobuy::getMulti($urlList);
  41 +
  42 +// $param = Yohobuy::param();
  43 +// $param['client_secret'] = Sign::getSign($param);
  44 +//
  45 +// return Yohobuy::get(Yohobuy::SERVICE_URL . self::URI_LEFTNAV_CATEGORY, $param);
  46 + }
  47 +
  48 +}
@@ -10,6 +10,9 @@ class BoysController extends AbstractAction @@ -10,6 +10,9 @@ class BoysController extends AbstractAction
10 10
11 public function indexAction() 11 public function indexAction()
12 { 12 {
  13 + // 显示侧边栏
  14 + $this->setNavSide();
  15 +
13 // 频道数据 16 // 频道数据
14 $channelData = Index::getUserChannelData(0, '1,3', '201504091403001'); 17 $channelData = Index::getUserChannelData(0, '1,3', '201504091403001');
15 18
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 2
3 use Action\AbstractAction; 3 use Action\AbstractAction;
4 use LibModels\Wap\Home\IndexData as Index; 4 use LibModels\Wap\Home\IndexData as Index;
  5 +
5 /** 6 /**
6 * 女生首页 7 * 女生首页
7 */ 8 */
@@ -10,14 +11,17 @@ class GirlsController extends AbstractAction @@ -10,14 +11,17 @@ class GirlsController extends AbstractAction
10 11
11 public function indexAction() 12 public function indexAction()
12 { 13 {
13 - $data = array( 14 + // 显示侧边栏
  15 + $this->setNavSide();
  16 +
  17 + $data = array(
14 'headerDownload' => array( 18 'headerDownload' => array(
15 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480', 19 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',
16 - 'url' => 'http://www.baidu.com' 20 + 'url' => 'http://www.baidu.com'
17 ), 21 ),
18 'homeHeader' => array( 22 'homeHeader' => array(
19 'bgColor' => '#FF88AE', 23 'bgColor' => '#FF88AE',
20 - 'searchUrl' => '' 24 + 'searchUrl' => ''
21 ), 25 ),
22 'searchUrl' => '', 26 'searchUrl' => '',
23 'sideNav' => array( 27 'sideNav' => array(
@@ -50,352 +54,344 @@ class GirlsController extends AbstractAction @@ -50,352 +54,344 @@ class GirlsController extends AbstractAction
50 'textEn' => 'TRENDFINDER', 54 'textEn' => 'TRENDFINDER',
51 'icon' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg', 55 'icon' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
52 'subNav' => array( 56 'subNav' => array(
53 - 'list' => array(  
54 - array(  
55 - 'textCn' => '逛',  
56 - 'textEn' => 'TrendFinder',  
57 - 'back' => true,  
58 - 'bgColor' => '#fd307f'  
59 - ),  
60 - array(  
61 - 'textCn' => '查看全部',  
62 - 'url' => ''  
63 - ),  
64 - array(  
65 - 'textCn' => '只看男生',  
66 - 'textEn' => 'Boys',  
67 - 'url' => ''  
68 - ),  
69 - array(  
70 - 'textCn' => '只看女生',  
71 - 'textEn' => 'Girls',  
72 - 'url' => '',  
73 - 'isSelect' => true  
74 - )  
75 -  
76 - )  
77 - )  
78 - )  
79 -  
80 - ),  
81 - 'content' => array(  
82 - 'bannerTop' => array(  
83 - 'list' => array(  
84 - array(  
85 - 'url' => '',  
86 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'  
87 - ),  
88 - array(  
89 - 'url' => '',  
90 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'  
91 - ),  
92 - array(  
93 - 'url' => '',  
94 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'  
95 - )  
96 - )  
97 - ),  
98 - 'iconsEnter' => array(  
99 - 'list' => array(  
100 - array(  
101 - 'url' => '',  
102 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
103 - 'text' => '新品到着'  
104 - ),  
105 - array(  
106 - 'url' => '',  
107 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
108 - 'text' => '全球优选'  
109 - ),  
110 - array(  
111 - 'url' => '',  
112 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
113 - 'text' => '明星潮牌'  
114 - ),  
115 - array(  
116 - 'url' => '',  
117 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
118 - 'text' => '全部品类'  
119 - ),  
120 - array(  
121 - 'url' => '',  
122 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
123 - 'text' => '逛'  
124 - ),  
125 - array(  
126 - 'url' => '',  
127 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
128 - 'text' => '搭配指南'  
129 - ),  
130 - array(  
131 - 'url' => '',  
132 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
133 - 'text' => '潮品推荐'  
134 - ),  
135 - array(  
136 - 'url' => '',  
137 - 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',  
138 - 'text' => '折扣精选'  
139 - )  
140 - )  
141 - ),  
142 - 'hotCategory' => array(  
143 - 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',  
144 - 'url' => 'http://www.baidu.com',  
145 - 'list' => array(  
146 - array(  
147 - 'textCn' => '打底衫',  
148 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
149 - 'url' => ''  
150 - ), 57 + 'list' => array(
151 array( 58 array(
152 - 'textCn' => '打底衫',  
153 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
154 - 'url' => ''  
155 - ), 59 + 'textCn' => '逛',
  60 + 'textEn' => 'TrendFinder',
  61 + 'back' => true,
  62 + 'bgColor' => '#fd307f'
  63 + ),
156 array( 64 array(
157 - 'textCn' => '打底衫',  
158 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
159 - 'url' => ''  
160 - ), 65 + 'textCn' => '查看全部',
  66 + 'url' => ''
  67 + ),
161 array( 68 array(
162 - 'textCn' => '打底衫',  
163 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
164 - 'url' => ''  
165 - ), 69 + 'textCn' => '只看男生',
  70 + 'textEn' => 'Boys',
  71 + 'url' => ''
  72 + ),
166 array( 73 array(
167 - 'textCn' => '打底衫',  
168 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
169 - 'url' => ''  
170 - ),  
171 - array(  
172 - 'textCn' => '打底衫',  
173 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
174 - 'url' => ''  
175 - ),  
176 - array(  
177 - 'textCn' => '打底衫',  
178 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
179 - 'url' => ''  
180 - ),  
181 - array(  
182 - 'textCn' => '打底衫',  
183 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
184 - 'url' => ''  
185 - ),  
186 - array(  
187 - 'textCn' => '打底衫',  
188 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
189 - 'url' => ''  
190 - )  
191 - )  
192 - ),  
193 - 'hotBrandsScroll' => array(  
194 - 'name' => '热门品牌',  
195 - 'list' => array(  
196 - array(  
197 - 'textCn' => 'Moussy',  
198 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
199 - 'url' => ''  
200 - ),  
201 - array(  
202 - 'textCn' => 'Moussy',  
203 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
204 - 'url' => ''  
205 - ),  
206 - array(  
207 - 'textCn' => 'Moussy',  
208 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
209 - 'url' => ''  
210 - ),  
211 - array(  
212 - 'textCn' => 'Moussy',  
213 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
214 - 'url' => ''  
215 - ),  
216 - array(  
217 - 'textCn' => 'Moussy',  
218 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
219 - 'url' => ''  
220 - ),  
221 - array(  
222 - 'textCn' => 'Moussy',  
223 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
224 - 'url' => ''  
225 - ),  
226 - array(  
227 - 'textCn' => 'Moussy',  
228 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
229 - 'url' => ''  
230 - ),  
231 - array(  
232 - 'textCn' => 'Moussy',  
233 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
234 - 'url' => ''  
235 - ),  
236 - array(  
237 - 'textCn' => 'Moussy',  
238 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
239 - 'url' => ''  
240 - )  
241 - )  
242 - ),  
243 - 'hotBrands' => array(  
244 - 'name' => '热门品牌',  
245 - 'more' => 'www.baidu.com',  
246 - 'brands' => array(  
247 - array(  
248 - 'name' => 'Front Row Shop',  
249 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
250 - 'url' => ''  
251 - ),  
252 - array(  
253 - 'name' => 'dress lab',  
254 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
255 - 'url' => ''  
256 - ),  
257 - array(  
258 - 'name' => 'DEVIL NUT',  
259 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
260 - 'url' => ''  
261 - ),  
262 - array(  
263 - 'name' => 'casselini',  
264 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
265 - 'url' => ''  
266 - ),  
267 - array(  
268 - 'name' => 'haso',  
269 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
270 - 'url' => ''  
271 - ), 74 + 'textCn' => '只看女生',
  75 + 'textEn' => 'Girls',
  76 + 'url' => '',
  77 + 'isSelect' => true
  78 + )
  79 + )
  80 + )
  81 + )
  82 + ),
  83 + 'content' => array(
  84 + 'bannerTop' => array(
  85 + 'list' => array(
  86 + array(
  87 + 'url' => '',
  88 + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
  89 + ),
  90 + array(
  91 + 'url' => '',
  92 + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
  93 + ),
  94 + array(
  95 + 'url' => '',
  96 + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg'
  97 + )
  98 + )
  99 + ),
  100 + 'iconsEnter' => array(
  101 + 'list' => array(
  102 + array(
  103 + 'url' => '',
  104 + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
  105 + 'text' => '新品到着'
  106 + ),
  107 + array(
  108 + 'url' => '',
  109 + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
  110 + 'text' => '全球优选'
  111 + ),
  112 + array(
  113 + 'url' => '',
  114 + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
  115 + 'text' => '明星潮牌'
  116 + ),
  117 + array(
  118 + 'url' => '',
  119 + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
  120 + 'text' => '全部品类'
  121 + ),
  122 + array(
  123 + 'url' => '',
  124 + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
  125 + 'text' => '逛'
  126 + ),
  127 + array(
  128 + 'url' => '',
  129 + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
  130 + 'text' => '搭配指南'
  131 + ),
  132 + array(
  133 + 'url' => '',
  134 + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
  135 + 'text' => '潮品推荐'
  136 + ),
  137 + array(
  138 + 'url' => '',
  139 + 'img' => 'http://img02.yohoboys.com/staticimg/2015/06/30/21/02912cd7f0b2c67939404c71ef00e3f513.jpg',
  140 + 'text' => '折扣精选'
  141 + )
  142 + )
  143 + ),
  144 + 'hotCategory' => array(
  145 + 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',
  146 + 'url' => 'http://www.baidu.com',
  147 + 'list' => array(
  148 + array(
  149 + 'textCn' => '打底衫',
  150 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  151 + 'url' => ''
  152 + ),
  153 + array(
  154 + 'textCn' => '打底衫',
  155 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  156 + 'url' => ''
  157 + ),
  158 + array(
  159 + 'textCn' => '打底衫',
  160 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  161 + 'url' => ''
  162 + ),
  163 + array(
  164 + 'textCn' => '打底衫',
  165 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  166 + 'url' => ''
  167 + ),
  168 + array(
  169 + 'textCn' => '打底衫',
  170 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  171 + 'url' => ''
  172 + ),
  173 + array(
  174 + 'textCn' => '打底衫',
  175 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  176 + 'url' => ''
  177 + ),
  178 + array(
  179 + 'textCn' => '打底衫',
  180 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  181 + 'url' => ''
  182 + ),
  183 + array(
  184 + 'textCn' => '打底衫',
  185 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  186 + 'url' => ''
  187 + ),
  188 + array(
  189 + 'textCn' => '打底衫',
  190 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  191 + 'url' => ''
  192 + )
  193 + )
  194 + ),
  195 + 'hotBrandsScroll' => array(
  196 + 'name' => '热门品牌',
  197 + 'list' => array(
  198 + array(
  199 + 'textCn' => 'Moussy',
  200 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  201 + 'url' => ''
  202 + ),
  203 + array(
  204 + 'textCn' => 'Moussy',
  205 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  206 + 'url' => ''
  207 + ),
  208 + array(
  209 + 'textCn' => 'Moussy',
  210 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  211 + 'url' => ''
  212 + ),
  213 + array(
  214 + 'textCn' => 'Moussy',
  215 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  216 + 'url' => ''
  217 + ),
  218 + array(
  219 + 'textCn' => 'Moussy',
  220 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  221 + 'url' => ''
  222 + ),
  223 + array(
  224 + 'textCn' => 'Moussy',
  225 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  226 + 'url' => ''
  227 + ),
  228 + array(
  229 + 'textCn' => 'Moussy',
  230 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  231 + 'url' => ''
  232 + ),
  233 + array(
  234 + 'textCn' => 'Moussy',
  235 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  236 + 'url' => ''
  237 + ),
  238 + array(
  239 + 'textCn' => 'Moussy',
  240 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  241 + 'url' => ''
  242 + )
  243 + )
  244 + ),
  245 + 'hotBrands' => array(
  246 + 'name' => '热门品牌',
  247 + 'more' => 'www.baidu.com',
  248 + 'brands' => array(
  249 + array(
  250 + 'name' => 'Front Row Shop',
  251 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  252 + 'url' => ''
  253 + ),
  254 + array(
  255 + 'name' => 'dress lab',
  256 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  257 + 'url' => ''
  258 + ),
  259 + array(
  260 + 'name' => 'DEVIL NUT',
  261 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  262 + 'url' => ''
  263 + ),
  264 + array(
  265 + 'name' => 'casselini',
  266 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  267 + 'url' => ''
  268 + ),
  269 + array(
  270 + 'name' => 'haso',
  271 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  272 + 'url' => ''
  273 + ),
  274 + array(
  275 + 'name' => 'EVISU',
  276 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  277 + 'url' => ''
  278 + )
  279 + )
  280 + ),
  281 + 'trendColloaction' => array(
  282 + 'name' => '潮人 ▪ 搭配',
  283 + 'more' => '',
  284 + 'leftspan' => array(
  285 + 'url' => '',
  286 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
  287 + ),
  288 + 'rightspan' => array(
  289 + 'url' => '',
  290 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'
  291 + ),
  292 + 'recommendlist' => array(
  293 + array(
  294 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  295 + 'url' => ''
  296 + ),
  297 + array(
  298 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  299 + 'url' => ''
  300 + ),
  301 + array(
  302 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  303 + 'url' => ''
  304 + ),
  305 + array(
  306 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  307 + 'url' => ''
  308 + ),
  309 + array(
  310 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  311 + 'url' => ''
  312 + )
  313 + )
  314 + ),
  315 + 'trendTopics' => array(
  316 + 'name' => '潮品 ▪ 话题',
  317 + 'more' => '',
  318 + 'list' => array(
  319 + array(
  320 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  321 + 'url' => '',
  322 + 'title' => '现代裁剪',
  323 + 'time' => '2月13日 12:34'
  324 + ),
  325 + array(
  326 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  327 + 'url' => '',
  328 + 'title' => '现代裁剪',
  329 + 'time' => '2月13日 12:34'
  330 + ),
  331 + array(
  332 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  333 + 'url' => '',
  334 + 'title' => '现代裁剪',
  335 + 'time' => '2月13日 12:34'
  336 + )
  337 + )
  338 + ),
  339 + 'goodsCategory' => array(
  340 + 'name' => '经典裤装',
  341 + 'more' => '',
  342 + 'banner' => array(
  343 + 'list' => array(
272 array( 344 array(
273 - 'name' => 'EVISU',  
274 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
275 - 'url' => ''  
276 - )  
277 - )  
278 - ),  
279 - 'trendColloaction' => array(  
280 - 'name' => '潮人 ▪ 搭配',  
281 - 'more' => '',  
282 - 'leftspan' => array(  
283 - 'url' => '',  
284 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'  
285 - ),  
286 - 'rightspan' => array(  
287 - 'url' => '',  
288 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg'  
289 - ),  
290 - 'recommendlist' => array(  
291 - array(  
292 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
293 - 'url' => ''  
294 - ),  
295 - array(  
296 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
297 - 'url' => ''  
298 - ),  
299 - array(  
300 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
301 - 'url' => ''  
302 - ),  
303 - array(  
304 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
305 - 'url' => ''  
306 - ),  
307 - array(  
308 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
309 - 'url' => ''  
310 - )  
311 - )  
312 - ),  
313 - 'trendTopics' => array(  
314 - 'name' => '潮品 ▪ 话题',  
315 - 'more' => '',  
316 - 'list' => array(  
317 - array(  
318 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
319 - 'url' => '',  
320 - 'title' => '现代裁剪',  
321 - 'time' => '2月13日 12:34'  
322 - ),  
323 - array(  
324 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
325 - 'url' => '',  
326 - 'title' => '现代裁剪',  
327 - 'time' => '2月13日 12:34'  
328 - ),  
329 - array(  
330 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
331 - 'url' => '',  
332 - 'title' => '现代裁剪',  
333 - 'time' => '2月13日 12:34'  
334 - )  
335 - )  
336 - ),  
337 - 'goodsCategory' => array(  
338 - 'name' => '经典裤装',  
339 - 'more' => '',  
340 - 'banner' => array(  
341 - 'list' => array(  
342 - array(  
343 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
344 - 'url' => ''  
345 - )  
346 - )  
347 - ),  
348 - 'list' => array(  
349 - array(  
350 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
351 - 'url' => '',  
352 - 'textCn' => '手表'  
353 - ),  
354 - array(  
355 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg', 345 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
356 - 'url' => '',  
357 - 'textCn' => '烛台'  
358 - ),  
359 - array(  
360 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
361 - 'url' => '',  
362 - 'textCn' => '围巾'  
363 - ),  
364 - array(  
365 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
366 - 'url' => '',  
367 - 'textCn' => '盘子'  
368 - ),  
369 - array(  
370 - 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',  
371 - 'url' => '',  
372 - 'textCn' => '耳机'  
373 - )  
374 - )  
375 - )  
376 -  
377 -  
378 -  
379 -  
380 -  
381 - ), 346 + 'url' => ''
  347 + )
  348 + )
  349 + ),
  350 + 'list' => array(
  351 + array(
  352 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  353 + 'url' => '',
  354 + 'textCn' => '手表'
  355 + ),
  356 + array(
  357 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  358 + 'url' => '',
  359 + 'textCn' => '烛台'
  360 + ),
  361 + array(
  362 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  363 + 'url' => '',
  364 + 'textCn' => '围巾'
  365 + ),
  366 + array(
  367 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  368 + 'url' => '',
  369 + 'textCn' => '盘子'
  370 + ),
  371 + array(
  372 + 'img' => 'http://img.alicdn.com/imgextra/i1/2086467111/TB2CsqHdXXXXXaDXpXXXXXXXXXX_!!2086467111.jpg',
  373 + 'url' => '',
  374 + 'textCn' => '耳机'
  375 + )
  376 + )
  377 + )
  378 + ));
382 379
383 - // 频道数据  
384 - $channelData = Index::getUserChannelData(0, '2,3', '201504091403002'); 380 + // 频道数据
  381 + $channelData = Index::getUserChannelData(0, '2,3', '201504091403002');
385 382
386 - echo '<pre>';  
387 - print_r($channelData);  
388 -  
389 - $this->_view->assign('title', 'YOHO!有货');  
390 - $this->_view->display('index', $data); 383 + echo '<pre>';
  384 + print_r($channelData);
391 385
392 - // // 频道数据  
393 - // $channelData = Index::getUserChannelData(0, '2,3', '201504091403002'); 386 + $this->_view->assign('title', 'YOHO!有货');
  387 + $this->_view->display('index', $data);
394 388
395 - // echo '<pre>';  
396 - // print_r($channelData);  
397 -  
398 - // $this->_view->assign('title', 'YOHO!有货');  
399 - // $this->_view->display('girls', compact('channelData')); 389 + // // 频道数据
  390 + // $channelData = Index::getUserChannelData(0, '2,3', '201504091403002');
  391 + // echo '<pre>';
  392 + // print_r($channelData);
  393 + // $this->_view->assign('title', 'YOHO!有货');
  394 + // $this->_view->display('girls', compact('channelData'));
400 } 395 }
401 -}  
  396 +
  397 +}
1 <?php 1 <?php
  2 +
2 use Action\AbstractAction; 3 use Action\AbstractAction;
3 use LibModels\Wap\Home\IndexData; 4 use LibModels\Wap\Home\IndexData;
4 5
@@ -8,31 +9,29 @@ use LibModels\Wap\Home\IndexData; @@ -8,31 +9,29 @@ use LibModels\Wap\Home\IndexData;
8 class IndexController extends AbstractAction 9 class IndexController extends AbstractAction
9 { 10 {
10 11
11 - /**  
12 - * 启动首页频道选择  
13 - */ 12 + /**
  13 + * 启动首页频道选择
  14 + */
14 public function indexAction() 15 public function indexAction()
15 { 16 {
16 - // 启动滚动图  
17 - $startBannerData = IndexData::getBannerStart();  
18 - $startBanner = array();  
19 - if($startBannerData['code'] == 200)  
20 - {  
21 - foreach ($startBannerData['data'] as $single)  
22 - {  
23 - $startBanner = $single['data'];  
24 - }  
25 -  
26 - }  
27 - // 启动频道数据  
28 - $homeChannels = IndexData::getHomeChannels();  
29 - // 用户个人信息  
30 - $userProfile = IndexData::getUserProfile(0); 17 + // 启动滚动图
  18 + $startBannerData = IndexData::getBannerStart();
  19 + $startBanner = array();
  20 + if ($startBannerData['code'] == 200) {
  21 + foreach ($startBannerData['data'] as $single) {
  22 + $startBanner = $single['data'];
  23 + }
  24 + }
  25 + // 启动频道数据
  26 + $homeChannels = IndexData::getHomeChannels();
  27 + // 用户个人信息
  28 + $userProfile = IndexData::getUserProfile(0);
31 29
32 - /*echo '<pre>';  
33 - var_dump($homeChannels);exit;*/ 30 + /* echo '<pre>';
  31 + var_dump($homeChannels);exit; */
34 32
35 - $this->_view->assign('title', 'YOHO!有货');  
36 - $this->_view->display('index', compact('startBanner', 'homeChannels', 'userProfile')); 33 + $this->_view->assign('title', 'YOHO!有货');
  34 + $this->_view->display('index', compact('startBanner', 'homeChannels', 'userProfile'));
37 } 35 }
38 -}  
  36 +
  37 +}
@@ -18,5 +18,8 @@ class KidsController extends AbstractAction @@ -18,5 +18,8 @@ class KidsController extends AbstractAction
18 18
19 $this->_view->assign('title', 'YOHO!有货'); 19 $this->_view->assign('title', 'YOHO!有货');
20 $this->_view->display('kids', compact('channelData')); 20 $this->_view->display('kids', compact('channelData'));
  21 +
  22 + // 显示侧边栏
  23 + $this->setNavSide();
21 } 24 }
22 } 25 }
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 2
3 use Action\AbstractAction; 3 use Action\AbstractAction;
4 use LibModels\Wap\Home\IndexData as Index; 4 use LibModels\Wap\Home\IndexData as Index;
  5 +
5 /** 6 /**
6 * 创意生活首页 7 * 创意生活首页
7 */ 8 */
@@ -10,14 +11,17 @@ class LifestyleController extends AbstractAction @@ -10,14 +11,17 @@ class LifestyleController extends AbstractAction
10 11
11 public function indexAction() 12 public function indexAction()
12 { 13 {
  14 + // 频道数据
  15 + $channelData = Index::getUserChannelData(0, '1,3', '9aa25f5133f011ec96c2045eb15ae425');
13 16
14 - // 频道数据  
15 - $channelData = Index::getUserChannelData(0, '1,3', '9aa25f5133f011ec96c2045eb15ae425'); 17 + echo '<pre>';
  18 + print_r($channelData);
16 19
17 - echo '<pre>';  
18 - print_r($channelData); 20 + $this->_view->assign('title', 'YOHO!有货');
  21 + $this->_view->display('lifestyle', compact('channelData'));
19 22
20 - $this->_view->assign('title', 'YOHO!有货');  
21 - $this->_view->display('lifestyle', compact('channelData')); 23 + // 显示侧边栏
  24 + $this->setNavSide();
22 } 25 }
23 -}  
  26 +
  27 +}
@@ -51,7 +51,7 @@ class PlusstarController extends AbstractAction @@ -51,7 +51,7 @@ class PlusstarController extends AbstractAction
51 // 情况2: 单张图 51 // 情况2: 单张图
52 elseif (isset($star['data'][0])) { 52 elseif (isset($star['data'][0])) {
53 $build['url'] = $star['data'][0]['url']; 53 $build['url'] = $star['data'][0]['url'];
54 - $build['img'] = $star['data'][0]['src']; 54 + $build['img'] = Helpers::getImageUrl($star['data'][0]['src'], 640, 310);
55 $data['ps']['star'][] = $build; 55 $data['ps']['star'][] = $build;
56 } 56 }
57 } 57 }
@@ -82,7 +82,7 @@ class PlusstarController extends AbstractAction @@ -82,7 +82,7 @@ class PlusstarController extends AbstractAction
82 } 82 }
83 } 83 }
84 } 84 }
85 - 85 +
86 $this->_view->display('list', $data); 86 $this->_view->display('list', $data);
87 87
88 $brandList = array(); 88 $brandList = array();
@@ -76,8 +76,8 @@ class LoginController extends AbstractAction @@ -76,8 +76,8 @@ class LoginController extends AbstractAction
76 /** 76 /**
77 * 登录操作 77 * 登录操作
78 * 78 *
79 - * @param string area 地区编号, 不需要+号  
80 - * @param string profile 账号(邮箱或手机号) 79 + * @param string areaCode 地区编号, 不需要+号
  80 + * @param string account 账号(邮箱或手机号)
81 * @param string password 密码 81 * @param string password 密码
82 * @return json 82 * @return json
83 */ 83 */
@@ -92,8 +92,8 @@ class LoginController extends AbstractAction @@ -92,8 +92,8 @@ class LoginController extends AbstractAction
92 } 92 }
93 93
94 /* 判断参数是否传递 */ 94 /* 判断参数是否传递 */
95 - $area = $this->post('area', '86');  
96 - $profile = $this->post('profile'); 95 + $area = $this->post('areaCode', '86');
  96 + $profile = $this->post('account');
97 $password = $this->post('password'); 97 $password = $this->post('password');
98 if (!is_numeric($area) || empty($profile) || empty($password)) { 98 if (!is_numeric($area) || empty($profile) || empty($password)) {
99 break; 99 break;
@@ -109,6 +109,9 @@ class LoginController extends AbstractAction @@ -109,6 +109,9 @@ class LoginController extends AbstractAction
109 109
110 /* 调用登录接口进行登录 */ 110 /* 调用登录接口进行登录 */
111 $data = LoginData::signin($area, $profile, $password); 111 $data = LoginData::signin($area, $profile, $password);
  112 + if ($data['code'] == 200) {
  113 + $data['data'] = '/'; // @todo
  114 + }
112 115
113 } while (false); 116 } while (false);
114 117
@@ -22,6 +22,7 @@ class RegController extends AbstractAction @@ -22,6 +22,7 @@ class RegController extends AbstractAction
22 $data['headerText'] = '注册'; 22 $data['headerText'] = '注册';
23 $data['isPassportPage'] = true; 23 $data['isPassportPage'] = true;
24 $data['countrys'] = array(); 24 $data['countrys'] = array();
  25 + $data['areaCode'] = '+86';
25 26
26 // 获取地区数据列表 27 // 获取地区数据列表
27 $area = RegData::getAreasData(); 28 $area = RegData::getAreasData();
@@ -52,15 +53,15 @@ class RegController extends AbstractAction @@ -52,15 +53,15 @@ class RegController extends AbstractAction
52 /** 53 /**
53 * 验证码 54 * 验证码
54 * 55 *
55 - * @param string area 地区编号  
56 - * @param string mobile 手机号 56 + * @param string areaCode 地区编号
  57 + * @param string phoneNum 手机号
57 * @param string token 访问TOKEN凭证 58 * @param string token 访问TOKEN凭证
58 */ 59 */
59 public function codeAction() 60 public function codeAction()
60 { 61 {
61 $token = $this->get('token'); 62 $token = $this->get('token');
62 - $mobile = $this->get('mobile');  
63 - $area = $this->get('area', '86'); 63 + $mobile = $this->get('phoneNum');
  64 + $area = $this->get('areaCode', '86');
64 65
65 // 判断是否允许访问, 不允许则跳转到错误页面 66 // 判断是否允许访问, 不允许则跳转到错误页面
66 if (!is_string($token) || !is_numeric($mobile) || !Helpers::verifyToken($mobile, $token)) { 67 if (!is_string($token) || !is_numeric($mobile) || !Helpers::verifyToken($mobile, $token)) {
@@ -74,7 +75,7 @@ class RegController extends AbstractAction @@ -74,7 +75,7 @@ class RegController extends AbstractAction
74 $data['backUrl'] = '/'; 75 $data['backUrl'] = '/';
75 $data['headerText'] = '注册'; 76 $data['headerText'] = '注册';
76 $data['isPassportPage'] = true; 77 $data['isPassportPage'] = true;
77 - $data['areaCode'] = $area; 78 + $data['areaCode'] = '+' . $area;
78 $data['phoneNum'] = $mobile; 79 $data['phoneNum'] = $mobile;
79 $data['token'] = $token; 80 $data['token'] = $token;
80 81
@@ -84,15 +85,15 @@ class RegController extends AbstractAction @@ -84,15 +85,15 @@ class RegController extends AbstractAction
84 /** 85 /**
85 * 填写密码页面 86 * 填写密码页面
86 * 87 *
87 - * @param string area 地区编号  
88 - * @param string mobile 手机号 88 + * @param string areaCode 地区编号
  89 + * @param string phoneNum 手机号
89 * @param string token 访问TOKEN凭证 90 * @param string token 访问TOKEN凭证
90 */ 91 */
91 public function passwordAction() 92 public function passwordAction()
92 { 93 {
93 $token = $this->get('token'); 94 $token = $this->get('token');
94 - $mobile = $this->get('mobile');  
95 - $area = $this->get('area', '86'); 95 + $mobile = $this->get('phoneNum');
  96 + $area = $this->get('areaCode', '86');
96 97
97 // 判断是否允许访问, 不允许则跳转到错误页面 98 // 判断是否允许访问, 不允许则跳转到错误页面
98 if (!is_string($token) || !is_numeric($mobile) || !is_numeric($area) 99 if (!is_string($token) || !is_numeric($mobile) || !is_numeric($area)
@@ -117,13 +118,13 @@ class RegController extends AbstractAction @@ -117,13 +118,13 @@ class RegController extends AbstractAction
117 /** 118 /**
118 * 验证注册的手机号 119 * 验证注册的手机号
119 * 120 *
120 - * @param string area 地区编号,注意不需要+号  
121 - * @param string mobile 手机号 121 + * @param string areaCode 地区编号,注意不需要+号
  122 + * @param string phoneNum 手机号
122 * @return json 123 * @return json
123 */ 124 */
124 public function verifymobileAction() 125 public function verifymobileAction()
125 { 126 {
126 - $data = array('code' => 400, 'message' => '参数不正确!', 'data' => ''); 127 + $data = array('code' => 400, 'message' => '手机号已存在', 'data' => '');
127 128
128 do { 129 do {
129 /* 判断是不是AJAX请求 */ 130 /* 判断是不是AJAX请求 */
@@ -131,8 +132,8 @@ class RegController extends AbstractAction @@ -131,8 +132,8 @@ class RegController extends AbstractAction
131 break; 132 break;
132 } 133 }
133 134
134 - $mobile = $this->post('mobile');  
135 - $area = $this->post('area', '86'); 135 + $mobile = $this->post('phoneNum');
  136 + $area = $this->post('areaCode', '86');
136 /* 判断参数是否合法 */ 137 /* 判断参数是否合法 */
137 if (!is_numeric($mobile) || !is_numeric($area)) { 138 if (!is_numeric($mobile) || !is_numeric($area)) {
138 break; 139 break;
@@ -147,7 +148,7 @@ class RegController extends AbstractAction @@ -147,7 +148,7 @@ class RegController extends AbstractAction
147 /* 返回跳转到验证页面的链接*/ 148 /* 返回跳转到验证页面的链接*/
148 if ($data['code'] == 200) { 149 if ($data['code'] == 200) {
149 $token = Helpers::makeToken($mobile); 150 $token = Helpers::makeToken($mobile);
150 - $data['data'] = '/passport/reg/code?token='.$token.'&mobile='.$mobile.'&area='.$area; 151 + $data['data'] = '/passport/reg/code?token='.$token.'&phoneNum='.$mobile.'&areaCode='.$area;
151 } 152 }
152 153
153 } while (false); 154 } while (false);
@@ -158,15 +159,15 @@ class RegController extends AbstractAction @@ -158,15 +159,15 @@ class RegController extends AbstractAction
158 /** 159 /**
159 * 验证注册的识别码 160 * 验证注册的识别码
160 * 161 *
161 - * @param string area 地区编号,注意不需要+号  
162 - * @param string mobile 手机号 162 + * @param string areaCode 地区编号,注意不需要+号
  163 + * @param string phoneNum 手机号
163 * @param string token 访问TOKEN凭证 164 * @param string token 访问TOKEN凭证
164 * @param int code 验证码, 手机上收到的 165 * @param int code 验证码, 手机上收到的
165 * @return json 166 * @return json
166 */ 167 */
167 public function verifycodeAction() 168 public function verifycodeAction()
168 { 169 {
169 - $data = array('code' => 400, 'message' => '参数不正确!', 'data' => ''); 170 + $data = array('code' => 400, 'message' => '验证码不正确', 'data' => '');
170 171
171 do { 172 do {
172 /* 判断是不是AJAX请求 */ 173 /* 判断是不是AJAX请求 */
@@ -174,8 +175,8 @@ class RegController extends AbstractAction @@ -174,8 +175,8 @@ class RegController extends AbstractAction
174 break; 175 break;
175 } 176 }
176 177
177 - $mobile = $this->post('mobile');  
178 - $area = $this->post('area'); 178 + $mobile = $this->post('phoneNum');
  179 + $area = $this->post('areaCode');
179 $code = $this->post('code'); 180 $code = $this->post('code');
180 /* 判断参数是否合法 */ 181 /* 判断参数是否合法 */
181 if (!is_numeric($mobile) || !is_numeric($area) || !isset($code)) { 182 if (!is_numeric($mobile) || !is_numeric($area) || !isset($code)) {
@@ -191,7 +192,7 @@ class RegController extends AbstractAction @@ -191,7 +192,7 @@ class RegController extends AbstractAction
191 /* 返回跳转到设置密码的链接*/ 192 /* 返回跳转到设置密码的链接*/
192 if ($data['code'] == 200) { 193 if ($data['code'] == 200) {
193 $token = Helpers::makeToken($mobile); 194 $token = Helpers::makeToken($mobile);
194 - $data['data'] = '/passport/reg/password?token='.$token.'&mobile='.$mobile.'&area='.$area; 195 + $data['data'] = '/passport/reg/password?token='.$token.'&phoneNum='.$mobile.'&areaCode='.$area;
195 } 196 }
196 197
197 } while (false); 198 } while (false);
@@ -202,8 +203,8 @@ class RegController extends AbstractAction @@ -202,8 +203,8 @@ class RegController extends AbstractAction
202 /** 203 /**
203 * 发送验证码 204 * 发送验证码
204 * 205 *
205 - * @param string area 地区编号,注意不需要+号  
206 - * @param string mobile 手机号 206 + * @param string areaCode 地区编号,注意不需要+号
  207 + * @param string phoneNum 手机号
207 * @return json 208 * @return json
208 */ 209 */
209 public function sendcodeAction() 210 public function sendcodeAction()
@@ -216,8 +217,8 @@ class RegController extends AbstractAction @@ -216,8 +217,8 @@ class RegController extends AbstractAction
216 break; 217 break;
217 } 218 }
218 219
219 - $mobile = $this->post('mobile');  
220 - $area = $this->post('area', '86'); 220 + $mobile = $this->post('phoneNum');
  221 + $area = $this->post('areaCode', '86');
221 /* 判断参数是否合法 */ 222 /* 判断参数是否合法 */
222 if (!is_numeric($mobile) || !is_numeric($area)) { 223 if (!is_numeric($mobile) || !is_numeric($area)) {
223 break; 224 break;
@@ -237,8 +238,8 @@ class RegController extends AbstractAction @@ -237,8 +238,8 @@ class RegController extends AbstractAction
237 /** 238 /**
238 * 设置密码 239 * 设置密码
239 * 240 *
240 - * @param string area 地区编号,注意不需要+号  
241 - * @param string mobile 手机号 241 + * @param string areaCode 地区编号,注意不需要+号
  242 + * @param string phoneNum 手机号
242 * @param string token 访问TOKEN凭证 243 * @param string token 访问TOKEN凭证
243 * @param string password 用户设置的密码 244 * @param string password 用户设置的密码
244 * @return json 245 * @return json
@@ -254,8 +255,8 @@ class RegController extends AbstractAction @@ -254,8 +255,8 @@ class RegController extends AbstractAction
254 } 255 }
255 256
256 $token = $this->post('token'); 257 $token = $this->post('token');
257 - $mobile = $this->post('mobile');  
258 - $area = $this->post('area'); 258 + $mobile = $this->post('phoneNum');
  259 + $area = $this->post('areaCode');
259 $password = $this->post('password'); 260 $password = $this->post('password');
260 /* 判断参数是否合法 */ 261 /* 判断参数是否合法 */
261 if (!is_string($token) || !is_numeric($mobile) || !is_numeric($area) || !isset($password)) { 262 if (!is_string($token) || !is_numeric($mobile) || !is_numeric($area) || !isset($password)) {
@@ -275,7 +276,7 @@ class RegController extends AbstractAction @@ -275,7 +276,7 @@ class RegController extends AbstractAction
275 276
276 /* 返回跳转到来源页面 */ 277 /* 返回跳转到来源页面 */
277 if ($data['code'] == 200) { 278 if ($data['code'] == 200) {
278 - $data['data'] = '/passport/reg/password?token='.$token.'&mobile='.$mobile.'&area='.$area; 279 + $data['data'] = '/';
279 } 280 }
280 281
281 } while (false); 282 } while (false);