From 90974c932ed9041862f47e7a9dd3136dd0d1333c Mon Sep 17 00:00:00 2001 From: Rock Zhang <iamgtskk@gmail.com> Date: Tue, 13 Oct 2015 15:11:07 +0800 Subject: [PATCH] 精简首页男生,女生,潮童,创意生活使用的接口公用Index的接口 --- library/Action/AbstractAction.php | 12 ++++++++++++ library/LibModels/Wap/Home/BoysData.php | 0 library/LibModels/Wap/Home/GirlsData.php | 0 library/LibModels/Wap/Home/IndexData.php | 1 - library/LibModels/Wap/Home/KidsData.php | 0 library/LibModels/Wap/Home/LifestyleData.php | 0 yohobuy/m.yohobuy.com/application/controllers/Girls.php | 69 ++++++++++++++++++++++++++++++--------------------------------------- yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Back.php | 33 ++++++++++++--------------------- 8 files changed, 54 insertions(+), 61 deletions(-) delete mode 100644 library/LibModels/Wap/Home/BoysData.php delete mode 100644 library/LibModels/Wap/Home/GirlsData.php delete mode 100644 library/LibModels/Wap/Home/KidsData.php delete mode 100644 library/LibModels/Wap/Home/LifestyleData.php diff --git a/library/Action/AbstractAction.php b/library/Action/AbstractAction.php index e6935c9..e94c1b1 100644 --- a/library/Action/AbstractAction.php +++ b/library/Action/AbstractAction.php @@ -163,4 +163,16 @@ class AbstractAction extends Controller_Abstract return $this->request->getCookie($name, $default); } + /** + * 返回顶部软件下载有关数据 + * @return array 下载有关数据 + */ + protected function getHeaderDownload() + { + return array( + 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480', + 'url' => 'http://www.baidu.com' + ); + } + } diff --git a/library/LibModels/Wap/Home/BoysData.php b/library/LibModels/Wap/Home/BoysData.php deleted file mode 100644 index e69de29..0000000 --- a/library/LibModels/Wap/Home/BoysData.php +++ /dev/null diff --git a/library/LibModels/Wap/Home/GirlsData.php b/library/LibModels/Wap/Home/GirlsData.php deleted file mode 100644 index e69de29..0000000 --- a/library/LibModels/Wap/Home/GirlsData.php +++ /dev/null diff --git a/library/LibModels/Wap/Home/IndexData.php b/library/LibModels/Wap/Home/IndexData.php index d48a34f..60bbab7 100644 --- a/library/LibModels/Wap/Home/IndexData.php +++ b/library/LibModels/Wap/Home/IndexData.php @@ -3,7 +3,6 @@ namespace LibModels\Wap\Home; use Api\Yohobuy; use Api\Sign; -use Plugin\Helpers; /** * 首页数据接口操作类 diff --git a/library/LibModels/Wap/Home/KidsData.php b/library/LibModels/Wap/Home/KidsData.php deleted file mode 100644 index e69de29..0000000 --- a/library/LibModels/Wap/Home/KidsData.php +++ /dev/null diff --git a/library/LibModels/Wap/Home/LifestyleData.php b/library/LibModels/Wap/Home/LifestyleData.php deleted file mode 100644 index e69de29..0000000 --- a/library/LibModels/Wap/Home/LifestyleData.php +++ /dev/null diff --git a/yohobuy/m.yohobuy.com/application/controllers/Girls.php b/yohobuy/m.yohobuy.com/application/controllers/Girls.php index 9cd57fe..f5fc000 100644 --- a/yohobuy/m.yohobuy.com/application/controllers/Girls.php +++ b/yohobuy/m.yohobuy.com/application/controllers/Girls.php @@ -10,50 +10,41 @@ class GirlsController extends AbstractAction public function indexAction() { - $data = array( - - 'backUrl' => 'm.yohobuy.com', - 'modulePath' => 'index/girls/index', - 'headerDownload' => array( - 'img' => 'http://img11.static.yhbimg.com/adpic/2015/02/28/18/01d83bfad41c8fca8fd1ad334216d7d733.jpg?imageView/2/w/640/h/480', - 'url' => 'http://www.baidu.com' - ), - 'searchUrl' => '', - 'sideNav' => array( - 'textCn' => '男生', - 'textEn' => 'Boys', - 'url' => false, - 'subNav' => array( - 'list' => array( - array( - 'textCn' => '男生', - 'img' => 'http://res.yohoboys.com/res/new/boys/images/about/thirdbtn-sina.png', - 'url' => '' - ), - array( - 'textCn' => '新品到着', - 'img' => 'http://res.yohoboys.com/res/new/boys/images/about/thirdbtn-sina.png', - 'url' => '' - ) - ) - ) - ), - + // 频道数据 + $channelData = Index::getUserChannelData(0, '2,3', '201504091403002'); - - ); + echo '<pre>'; + print_r($channelData); - $this->_view->assign('title', '首页'); - $this->_view->display('index', $data); + $data = array( + + 'headerDownload' => $this->getHeaderDownload(), + 'searchUrl' => '', + 'sideNav' => array( + 'textCn' => '男生', + 'textEn' => 'Boys', + 'url' => false, + 'subNav' => array( + 'list' => array( + array( + 'textCn' => '男生', + 'img' => 'http://res.yohoboys.com/res/new/boys/images/about/thirdbtn-sina.png', + 'url' => '' + ), + array( + 'textCn' => '新品到着', + 'img' => 'http://res.yohoboys.com/res/new/boys/images/about/thirdbtn-sina.png', + 'url' => '' + ) + ) + ) + ), + ); - // // 频道数据 - // $channelData = Index::getUserChannelData(0, '2,3', '201504091403002'); + $this->_view->assign('title', 'YOHO!有货'); + $this->_view->display('index', $data); - // echo '<pre>'; - // print_r($channelData); - // $this->_view->assign('title', 'YOHO!有货'); - // $this->_view->display('girls', compact('channelData')); } } \ No newline at end of file diff --git a/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Back.php b/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Back.php index bdb7873..7f73878 100644 --- a/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Back.php +++ b/yohobuy/m.yohobuy.com/application/modules/Passport/controllers/Back.php @@ -16,10 +16,10 @@ class BackController extends AbstractAction public function emailAction() { $data = array( - 'backUrl' => 'm.yohobuy.com', + 'backUrl' => '/passport/login/index', 'headerText' => '找回密码', 'isPassportPage' => true, - 'modulePath' => 'passport/back/email' + 'backEmail' => true ); $this->_view->assign('title', 'YOHO!有货'); @@ -49,7 +49,7 @@ class BackController extends AbstractAction 'backUrl' => 'm.yohobuy.com', 'headerText' => '找回密码', 'isPassportPage' => true, - 'modulePath' => 'passport/back/email-success', + 'backEmailSuccess' => true, 'goEmail' => '', 'resendUrl' => '' ); @@ -89,7 +89,7 @@ class BackController extends AbstractAction // 处理地区信息 foreach ($areas as &$val) { $val['areaCode'] = $val['area']; - if($val['area'] == 86) + if($val['area'] === '86') { $val['selected'] = true; } @@ -104,12 +104,12 @@ class BackController extends AbstractAction return ($a['id'] < $b['id'] ? -1 : 1); });*/ - + $data = array( - 'backUrl' => 'm.yohobuy.com', + 'backUrl' => '/passport/back/login', 'headerText' => '找回密码', 'isPassportPage' => true, - 'modulePath' => 'passport/back/mobile', + 'backMobile' => true, 'countrys' => $areas, 'countryCode' => '+86' ); @@ -139,13 +139,13 @@ class BackController extends AbstractAction { $mobile = $this->get('mobile', ''); $area = $this->get('area', 86); + $areacode = '+'.$area; $data = array( - 'backUrl' => 'm.yohobuy.com', + 'backUrl' => '/passport/back/mobile', 'headerText' => '找回密码', 'isPassportPage' => true, - 'modulePath' => 'passport/back/code', - 'areaCode' => '+86', + 'areaCode' => $areacode, 'phoneNum' => $mobile ); @@ -180,19 +180,10 @@ class BackController extends AbstractAction $area = $this->get('area', 86); $data = array( - 'backUrl' => 'm.yohobuy.com', + 'backUrl' => '/passport/back/login', 'headerText' => '找回密码', 'isPassportPage' => true, - 'modulePath' => 'passport/back/new-password', - 'pageHeader' => array( - 'navBack' => 'm.yohobuy.com', - 'navHome' => 'm.yohobuy.com', - 'navTitle' => '上衣' - ), - 'pageFooter' => array( - 'loginUrl' => 'm.yohobuy.com/login.html', - 'signupUrl' => 'm.yohobuy.com/signup.html' - ) + 'backNewPwd' => true, ); $this->_view->assign('title', 'YOHO!有货'); -- libgit2 0.24.0