Authored by Rock Zhang

精简首页男生,女生,潮童,创意生活使用的接口公用Index的接口

@@ -163,4 +163,16 @@ class AbstractAction extends Controller_Abstract @@ -163,4 +163,16 @@ class AbstractAction extends Controller_Abstract
163 return $this->request->getCookie($name, $default); 163 return $this->request->getCookie($name, $default);
164 } 164 }
165 165
  166 + /**
  167 + * 返回顶部软件下载有关数据
  168 + * @return array 下载有关数据
  169 + */
  170 + protected function getHeaderDownload()
  171 + {
  172 + return array(
  173 + 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',
  174 + 'url' => 'http://www.baidu.com'
  175 + );
  176 + }
  177 +
166 } 178 }
@@ -3,7 +3,6 @@ namespace LibModels\Wap\Home; @@ -3,7 +3,6 @@ namespace LibModels\Wap\Home;
3 3
4 use Api\Yohobuy; 4 use Api\Yohobuy;
5 use Api\Sign; 5 use Api\Sign;
6 -use Plugin\Helpers;  
7 6
8 /** 7 /**
9 * 首页数据接口操作类 8 * 首页数据接口操作类
@@ -10,50 +10,41 @@ class GirlsController extends AbstractAction @@ -10,50 +10,41 @@ class GirlsController extends AbstractAction
10 10
11 public function indexAction() 11 public function indexAction()
12 { 12 {
13 - $data = array(  
14 -  
15 - 'backUrl' => 'm.yohobuy.com',  
16 - 'modulePath' => 'index/girls/index',  
17 - 'headerDownload' => array(  
18 - 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480',  
19 - 'url' => 'http://www.baidu.com'  
20 - ),  
21 - 'searchUrl' => '',  
22 - 'sideNav' => array(  
23 - 'textCn' => '男生',  
24 - 'textEn' => 'Boys',  
25 - 'url' => false,  
26 - 'subNav' => array(  
27 - 'list' => array(  
28 - array(  
29 - 'textCn' => '男生',  
30 - 'img' => 'http://res.yohoboys.com/res/new/boys/images/about/thirdbtn-sina.png',  
31 - 'url' => ''  
32 - ),  
33 - array(  
34 - 'textCn' => '新品到着',  
35 - 'img' => 'http://res.yohoboys.com/res/new/boys/images/about/thirdbtn-sina.png',  
36 - 'url' => ''  
37 - )  
38 - )  
39 - )  
40 - ),  
41 13
42 - 14 + // 频道数据
  15 + $channelData = Index::getUserChannelData(0, '2,3', '201504091403002');
43 16
44 -  
45 - ); 17 + echo '<pre>';
  18 + print_r($channelData);
46 19
47 - $this->_view->assign('title', '首页');  
48 - $this->_view->display('index', $data); 20 + $data = array(
  21 +
  22 + 'headerDownload' => $this->getHeaderDownload(),
  23 + 'searchUrl' => '',
  24 + 'sideNav' => array(
  25 + 'textCn' => '男生',
  26 + 'textEn' => 'Boys',
  27 + 'url' => false,
  28 + 'subNav' => array(
  29 + 'list' => array(
  30 + array(
  31 + 'textCn' => '男生',
  32 + 'img' => 'http://res.yohoboys.com/res/new/boys/images/about/thirdbtn-sina.png',
  33 + 'url' => ''
  34 + ),
  35 + array(
  36 + 'textCn' => '新品到着',
  37 + 'img' => 'http://res.yohoboys.com/res/new/boys/images/about/thirdbtn-sina.png',
  38 + 'url' => ''
  39 + )
  40 + )
  41 + )
  42 + ),
  43 + );
49 44
50 - // // 频道数据  
51 - // $channelData = Index::getUserChannelData(0, '2,3', '201504091403002'); 45 + $this->_view->assign('title', 'YOHO!有货');
  46 + $this->_view->display('index', $data);
52 47
53 - // echo '<pre>';  
54 - // print_r($channelData);  
55 48
56 - // $this->_view->assign('title', 'YOHO!有货');  
57 - // $this->_view->display('girls', compact('channelData'));  
58 } 49 }
59 } 50 }
@@ -16,10 +16,10 @@ class BackController extends AbstractAction @@ -16,10 +16,10 @@ class BackController extends AbstractAction
16 public function emailAction() 16 public function emailAction()
17 { 17 {
18 $data = array( 18 $data = array(
19 - 'backUrl' => 'm.yohobuy.com', 19 + 'backUrl' => '/passport/login/index',
20 'headerText' => '找回密码', 20 'headerText' => '找回密码',
21 'isPassportPage' => true, 21 'isPassportPage' => true,
22 - 'modulePath' => 'passport/back/email' 22 + 'backEmail' => true
23 ); 23 );
24 24
25 $this->_view->assign('title', 'YOHO!有货'); 25 $this->_view->assign('title', 'YOHO!有货');
@@ -49,7 +49,7 @@ class BackController extends AbstractAction @@ -49,7 +49,7 @@ class BackController extends AbstractAction
49 'backUrl' => 'm.yohobuy.com', 49 'backUrl' => 'm.yohobuy.com',
50 'headerText' => '找回密码', 50 'headerText' => '找回密码',
51 'isPassportPage' => true, 51 'isPassportPage' => true,
52 - 'modulePath' => 'passport/back/email-success', 52 + 'backEmailSuccess' => true,
53 'goEmail' => '', 53 'goEmail' => '',
54 'resendUrl' => '' 54 'resendUrl' => ''
55 ); 55 );
@@ -89,7 +89,7 @@ class BackController extends AbstractAction @@ -89,7 +89,7 @@ class BackController extends AbstractAction
89 // 处理地区信息 89 // 处理地区信息
90 foreach ($areas as &$val) { 90 foreach ($areas as &$val) {
91 $val['areaCode'] = $val['area']; 91 $val['areaCode'] = $val['area'];
92 - if($val['area'] == 86) 92 + if($val['area'] === '86')
93 { 93 {
94 $val['selected'] = true; 94 $val['selected'] = true;
95 } 95 }
@@ -104,12 +104,12 @@ class BackController extends AbstractAction @@ -104,12 +104,12 @@ class BackController extends AbstractAction
104 104
105 return ($a['id'] < $b['id'] ? -1 : 1); 105 return ($a['id'] < $b['id'] ? -1 : 1);
106 });*/ 106 });*/
107 - 107 +
108 $data = array( 108 $data = array(
109 - 'backUrl' => 'm.yohobuy.com', 109 + 'backUrl' => '/passport/back/login',
110 'headerText' => '找回密码', 110 'headerText' => '找回密码',
111 'isPassportPage' => true, 111 'isPassportPage' => true,
112 - 'modulePath' => 'passport/back/mobile', 112 + 'backMobile' => true,
113 'countrys' => $areas, 113 'countrys' => $areas,
114 'countryCode' => '+86' 114 'countryCode' => '+86'
115 ); 115 );
@@ -139,13 +139,13 @@ class BackController extends AbstractAction @@ -139,13 +139,13 @@ class BackController extends AbstractAction
139 { 139 {
140 $mobile = $this->get('mobile', ''); 140 $mobile = $this->get('mobile', '');
141 $area = $this->get('area', 86); 141 $area = $this->get('area', 86);
  142 + $areacode = '+'.$area;
142 143
143 $data = array( 144 $data = array(
144 - 'backUrl' => 'm.yohobuy.com', 145 + 'backUrl' => '/passport/back/mobile',
145 'headerText' => '找回密码', 146 'headerText' => '找回密码',
146 'isPassportPage' => true, 147 'isPassportPage' => true,
147 - 'modulePath' => 'passport/back/code',  
148 - 'areaCode' => '+86', 148 + 'areaCode' => $areacode,
149 'phoneNum' => $mobile 149 'phoneNum' => $mobile
150 ); 150 );
151 151
@@ -180,19 +180,10 @@ class BackController extends AbstractAction @@ -180,19 +180,10 @@ class BackController extends AbstractAction
180 $area = $this->get('area', 86); 180 $area = $this->get('area', 86);
181 181
182 $data = array( 182 $data = array(
183 - 'backUrl' => 'm.yohobuy.com', 183 + 'backUrl' => '/passport/back/login',
184 'headerText' => '找回密码', 184 'headerText' => '找回密码',
185 'isPassportPage' => true, 185 'isPassportPage' => true,
186 - 'modulePath' => 'passport/back/new-password',  
187 - 'pageHeader' => array(  
188 - 'navBack' => 'm.yohobuy.com',  
189 - 'navHome' => 'm.yohobuy.com',  
190 - 'navTitle' => '上衣'  
191 - ),  
192 - 'pageFooter' => array(  
193 - 'loginUrl' => 'm.yohobuy.com/login.html',  
194 - 'signupUrl' => 'm.yohobuy.com/signup.html'  
195 - ) 186 + 'backNewPwd' => true,
196 ); 187 );
197 188
198 $this->_view->assign('title', 'YOHO!有货'); 189 $this->_view->assign('title', 'YOHO!有货');