Authored by Rock Zhang

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

Conflicts:
	library/LibModels/Wap/Product/NewsaleData.php
@@ -70,25 +70,28 @@ @@ -70,25 +70,28 @@
70 70
71 //header 71 //header
72 { 72 {
73 - header: {  
74 - back: true/false,  
75 - title: '',  
76 - home: '' //对应页面有就传,没有就不传 73 + pageHeader: {
  74 + //对应页面有就传,没有就不传
  75 + navBack: '',
  76 + navTitle: '',
  77 + navHome: ''
77 } 78 }
78 } 79 }
79 80
80 //footer已登录 81 //footer已登录
81 { 82 {
82 - footer: {  
83 - name: '',  
84 - url: '',  
85 - signoutUrl: '' 83 + pageFooter: {
  84 + user: {
  85 + name: '',
  86 + url: '',
  87 + signoutUrl: ''
  88 + }
86 } 89 }
87 } 90 }
88 91
89 //footer未登录 92 //footer未登录
90 { 93 {
91 - footer: { 94 + pageFooter: {
92 loginUrl: '', 95 loginUrl: '',
93 signupUrl: '' 96 signupUrl: ''
94 } 97 }
@@ -520,11 +523,9 @@ @@ -520,11 +523,9 @@
520 ### 通用头部(包含在每个页面中) 523 ### 通用头部(包含在每个页面中)
521 524
522 { 525 {
523 - showGoBack: true/false, //是否显示GO-BACK链接  
524 - backUrl: '', 526 + backUrl: '', //GO-BACK链接, 不显示则不传
525 showHeaderImg: true/false, //显示头部图片 527 showHeaderImg: true/false, //显示头部图片
526 - showHeaderText: true/false, //显示头部文字  
527 - headerText: '' 528 + headerText: '' //头部标题文字
528 } 529 }
529 530
530 ### 区域列表 531 ### 区域列表
@@ -13,6 +13,7 @@ namespace Api; @@ -13,6 +13,7 @@ namespace Api;
13 13
14 class Yohobuy 14 class Yohobuy
15 { 15 {
  16 +
16 const API_URL = 'http://api2.open.yohobuy.com/'; 17 const API_URL = 'http://api2.open.yohobuy.com/';
17 const SERVICE_URL = 'http://service.api.yohobuy.com/'; 18 const SERVICE_URL = 'http://service.api.yohobuy.com/';
18 19
@@ -26,11 +27,11 @@ class Yohobuy @@ -26,11 +27,11 @@ class Yohobuy
26 'iphone' => 'a85bb0674e08986c6b115d5e3a4884fa', 27 'iphone' => 'a85bb0674e08986c6b115d5e3a4884fa',
27 'ipad' => 'ad9fcda2e679cf9229e37feae2cdcf80', 28 'ipad' => 'ad9fcda2e679cf9229e37feae2cdcf80',
28 ); 29 );
29 - 30 +
30 /** 31 /**
31 * 取得当前的客户端类型 32 * 取得当前的客户端类型
32 */ 33 */
33 - public static function clientType() 34 + public static function clientType()
34 { 35 {
35 // 苹果设备 36 // 苹果设备
36 if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) { 37 if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {
@@ -45,7 +46,7 @@ class Yohobuy @@ -45,7 +46,7 @@ class Yohobuy
45 return 'android'; 46 return 'android';
46 } 47 }
47 } 48 }
48 - 49 +
49 /** 50 /**
50 * 取得公共的参数 51 * 取得公共的参数
51 * 52 *
@@ -64,7 +65,7 @@ class Yohobuy @@ -64,7 +65,7 @@ class Yohobuy
64 ); 65 );
65 return $param; 66 return $param;
66 } 67 }
67 - 68 +
68 /** 69 /**
69 * 构建URL 70 * 构建URL
70 * 71 *
@@ -74,6 +75,10 @@ class Yohobuy @@ -74,6 +75,10 @@ class Yohobuy
74 */ 75 */
75 public static function httpBuildQuery($url, $data) 76 public static function httpBuildQuery($url, $data)
76 { 77 {
  78 + // 销毁私钥参数
  79 + if (isset($data['private_key'])) {
  80 + unset($data['private_key']);
  81 + }
77 if (strstr($url, '?') !== false) { 82 if (strstr($url, '?') !== false) {
78 $url .= '&' . http_build_query($data, null, '&'); 83 $url .= '&' . http_build_query($data, null, '&');
79 } else { 84 } else {
@@ -81,7 +86,7 @@ class Yohobuy @@ -81,7 +86,7 @@ class Yohobuy
81 } 86 }
82 return $url; 87 return $url;
83 } 88 }
84 - 89 +
85 /** 90 /**
86 * get方式调用接口 91 * get方式调用接口
87 * 92 *
@@ -93,13 +98,14 @@ class Yohobuy @@ -93,13 +98,14 @@ class Yohobuy
93 */ 98 */
94 public static function get($url, $data = array(), $returnJson = false, $timeout = 5) 99 public static function get($url, $data = array(), $returnJson = false, $timeout = 5)
95 { 100 {
  101 + // 销毁私钥参数
96 if (isset($data['private_key'])) { 102 if (isset($data['private_key'])) {
97 unset($data['private_key']); 103 unset($data['private_key']);
98 } 104 }
99 if (!empty($data)) { 105 if (!empty($data)) {
100 $url = self::httpBuildQuery($url, $data); 106 $url = self::httpBuildQuery($url, $data);
101 } 107 }
102 - 108 +
103 $ch = curl_init($url); 109 $ch = curl_init($url);
104 curl_setopt($ch, CURLOPT_HEADER, 0); 110 curl_setopt($ch, CURLOPT_HEADER, 0);
105 curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); 111 curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
@@ -128,11 +134,12 @@ class Yohobuy @@ -128,11 +134,12 @@ class Yohobuy
128 public static function post($url, $data = array(), $returnJson = false, $timeout = 5, $header = array(), $cookie = array()) 134 public static function post($url, $data = array(), $returnJson = false, $timeout = 5, $header = array(), $cookie = array())
129 { 135 {
130 $ch = curl_init($url); 136 $ch = curl_init($url);
131 - 137 +
132 curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); 138 curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
133 if (!empty($header)) { 139 if (!empty($header)) {
134 curl_setopt($ch, CURLOPT_HTTPHEADER, $header); 140 curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
135 - } else { 141 + }
  142 + else {
136 curl_setopt($ch, CURLOPT_HEADER, 0); 143 curl_setopt($ch, CURLOPT_HEADER, 0);
137 } 144 }
138 145
@@ -146,6 +153,7 @@ class Yohobuy @@ -146,6 +153,7 @@ class Yohobuy
146 153
147 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 154 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
148 curl_setopt($ch, CURLOPT_POST, true); 155 curl_setopt($ch, CURLOPT_POST, true);
  156 + // 销毁私钥参数
149 if (isset($data['private_key'])) { 157 if (isset($data['private_key'])) {
150 unset($data['private_key']); 158 unset($data['private_key']);
151 } 159 }
@@ -158,7 +166,7 @@ class Yohobuy @@ -158,7 +166,7 @@ class Yohobuy
158 } 166 }
159 curl_close($ch); 167 curl_close($ch);
160 $data = array(); 168 $data = array();
161 - 169 +
162 return $result; 170 return $result;
163 } 171 }
164 172
@@ -173,14 +181,15 @@ class Yohobuy @@ -173,14 +181,15 @@ class Yohobuy
173 { 181 {
174 $result = array(); 182 $result = array();
175 $response = array(); 183 $response = array();
176 - $running = null; 184 + $running = 0;
177 $data = ''; 185 $data = '';
178 $error = ''; 186 $error = '';
179 $defaultOptions = array( 187 $defaultOptions = array(
180 CURLOPT_HEADER => 0, 188 CURLOPT_HEADER => 0,
181 CURLOPT_RETURNTRANSFER => 1, 189 CURLOPT_RETURNTRANSFER => 1,
182 - CURLOPT_CONNECTTIMEOUT => 5,  
183 - CURLOPT_TIMEOUT => 5, 190 + CURLOPT_CONNECTTIMEOUT => 3,
  191 + CURLOPT_TIMEOUT => 3,
  192 + CURLOPT_NOSIGNAL => 1, //忽略所有的curl传递给php的信号,减少并发crash
184 ); 193 );
185 $mh = curl_multi_init(); 194 $mh = curl_multi_init();
186 $ch = array(); 195 $ch = array();
@@ -202,17 +211,20 @@ class Yohobuy @@ -202,17 +211,20 @@ class Yohobuy
202 211
203 // 调用API接口 212 // 调用API接口
204 do { 213 do {
205 - $status = curl_multi_exec($mh, $running);  
206 - }  
207 - while ($status == CURLM_CALL_MULTI_PERFORM);  
208 - while ($running && $status == CURLM_OK) {  
209 - if (curl_multi_select($mh, 0.5) != -1) {  
210 - do {  
211 - $status = curl_multi_exec($mh, $running);  
212 - }  
213 - while ($status == CURLM_CALL_MULTI_PERFORM); 214 + do {
  215 + $status = curl_multi_exec($mh, $running);
  216 + }
  217 + while ($status == CURLM_CALL_MULTI_PERFORM);
  218 +
  219 + if ($status != CURLM_OK) {
  220 + break;
  221 + }
  222 +
  223 + if ($running > 0) {
  224 + curl_multi_select($mh, 0.5);
214 } 225 }
215 } 226 }
  227 + while ($running);
216 228
217 // 获取API接口响应的结果 229 // 获取API接口响应的结果
218 foreach ($urlList as $name => $api) { 230 foreach ($urlList as $name => $api) {
@@ -236,26 +248,49 @@ class Yohobuy @@ -236,26 +248,49 @@ class Yohobuy
236 curl_close($ch[$name]); 248 curl_close($ch[$name]);
237 } 249 }
238 curl_multi_close($mh); 250 curl_multi_close($mh);
239 - 251 +
240 return $result; 252 return $result;
241 } 253 }
242 - 254 +
243 /** 255 /**
244 * rpc调用远程服务(YAR) 256 * rpc调用远程服务(YAR)
245 * 257 *
246 * @see http://php.net/manual/zh/yar-client.setopt.php 258 * @see http://php.net/manual/zh/yar-client.setopt.php
247 * @return array 259 * @return array
248 */ 260 */
249 - public static function yarClient($uri, $method, $data = array(), $timeout = 3000) 261 + public static function yarClient($uri, $method, $parameters = array(), $timeout = 3000)
250 { 262 {
251 $client = new \Yar_Client($uri); 263 $client = new \Yar_Client($uri);
252 $client->SetOpt(YAR_OPT_PACKAGER, 'php'); 264 $client->SetOpt(YAR_OPT_PACKAGER, 'php');
253 $client->SetOpt(YAR_OPT_TIMEOUT, $timeout); 265 $client->SetOpt(YAR_OPT_TIMEOUT, $timeout);
254 $client->SetOpt(YAR_OPT_CONNECT_TIMEOUT, $timeout); 266 $client->SetOpt(YAR_OPT_CONNECT_TIMEOUT, $timeout);
255 -  
256 - $result = $client->$method($data);  
257 - 267 + $result = $client->$method($parameters);
  268 +
258 return $result; 269 return $result;
259 } 270 }
  271 +
  272 + /**
  273 + * 并行(异步)调用远程服务
  274 + *
  275 + * @see http://php.net/manual/zh/class.yar-concurrent-client.php
  276 + * @param string $uri
  277 + * @param string $method
  278 + * @param array $parameter
  279 + * @param callable $callback
  280 + * @param int $timeout
  281 + * @return void
  282 + */
  283 + public static function yarConcurrentCall($uri, $method, $parameters, $callback, $timeout = 3000)
  284 + {
  285 + \Yar_Concurrent_Client::call($uri, $method, array($parameters), $callback, null, array(
  286 + YAR_OPT_PACKAGER => 'php',
  287 + YAR_OPT_TIMEOUT => $timeout,
  288 + YAR_OPT_CONNECT_TIMEOUT => $timeout
  289 + ));
  290 + }
  291 + public static function yarConcurrentLoop($callback = null)
  292 + {
  293 + \Yar_Concurrent_Client::loop($callback);
  294 + }
260 295
261 } 296 }
1 <?php 1 <?php
2 -use Action\AbstractAction; 2 +
  3 +namespace LibModels\Wap\Guang;
  4 +
  5 +use Api\Sign;
  6 +use Api\Yohobuy;
  7 +
3 /** 8 /**
4 - * 明星品牌和原创品牌 9 + * 明星品牌和原创品牌相关的数据模型
  10 + *
  11 + * @name PlusstarData
  12 + * @package Library/LibModels/Wap/Guang
  13 + * @copyright yoho.inc
  14 + * @version 1.0 (2015-10-9 10:22:10)
  15 + * @author fei.hong <fei.hong@yoho.cn>
5 */ 16 */
6 -class PlusstarController extends AbstractAction 17 +class PlusstarData
7 { 18 {
8 - 19 +
9 /** 20 /**
10 - * 品牌列表页 21 + * 品牌列表
  22 + *
  23 + * @param string $gender "1,3"表示男, "2,3"表示女
  24 + * @param string $channel 1表示男, 2表示女
  25 + * @return array(
  26 + * "star" => array(明星品牌列表数据),
  27 + * "original" => array(原创品牌列表数据)
  28 + * )
11 */ 29 */
12 - public function listAction() 30 + public static function brandList($gender, $channel)
13 { 31 {
14 - $this->_view->assign('title', 'YOHO!有货');  
15 - $this->_view->display('list', array('test' => 'hello world')); 32 + // 存放接口列表
  33 + $urlList = array();
  34 + // 接口调用的URL
  35 + $url = Yohobuy::SERVICE_URL . 'guang/api/v1/plustar/getlist';
  36 +
  37 + // 公共的参数
  38 + $param = Yohobuy::param();
  39 + $param['gender'] = $gender;
  40 + $param['is_recommend'] = '0';
  41 + $param['yh_channel'] = $channel;
  42 +
  43 + // 构建明星品牌参数及调用接口的URL
  44 + $star = $param;
  45 + $star['brand_type'] = '2';
  46 + $star['client_secret'] = Sign::getSign($star);
  47 + $urlList['star'] = Yohobuy::httpBuildQuery($url, $star);
  48 +
  49 + // 构建原创品牌参数及调用接口的URL
  50 + $original = $param;
  51 + $original['brand_type'] = '3';
  52 + $original['client_secret'] = Sign::getSign($original);
  53 + $urlList['original'] = Yohobuy::httpBuildQuery($url, $original);
  54 +
  55 + return Yohobuy::getMulti($urlList);
16 } 56 }
17 - 57 +
18 /** 58 /**
19 - * 品牌介绍 59 + * 品牌介绍
20 */ 60 */
21 - public function detailAction() 61 + public static function brandInfo($id)
22 { 62 {
  63 + $result = array();
  64 +
  65 + Yohobuy::yarConcurrentCall('http://service.api.yohobuy.com/guang/service/v1/plustar/', 'getBrandInfo', array('id' => 289), function($retval, $callinfo) use(&$result) {
  66 + $result[ $callinfo['method'] ] = empty($retval['data']) ? array() : $retval['data'];
  67 + });
  68 + Yohobuy::yarConcurrentCall('http://service.api.yohobuy.com/guang/service/v1/plustar/', 'getList', array('id' => 289), function($retval, $callinfo) use(&$result) {
  69 + $result[ $callinfo['method'] ] = empty($retval['data']) ? array() : $retval['data'];
  70 + });
  71 + Yohobuy::yarConcurrentLoop();
23 72
  73 + return $result;
24 } 74 }
25 -  
26 -}  
  75 +
  76 +}
@@ -60,7 +60,7 @@ class NewsaleData @@ -60,7 +60,7 @@ class NewsaleData
60 $urlList['week'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL,$param); 60 $urlList['week'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL,$param);
61 $param['dayLimit'] = 3; 61 $param['dayLimit'] = 3;
62 $urlList['sale'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL,$param); 62 $urlList['sale'] = Yohobuy::httpBuildQuery(Yohobuy::API_URL,$param);
63 - // var_dump($urlList);exit; 63 + //var_dump($urlList);exit;
64 64
65 return Yohobuy::getMulti($urlList); 65 return Yohobuy::getMulti($urlList);
66 } 66 }
@@ -3,6 +3,8 @@ $pxConvertRem: 40; @@ -3,6 +3,8 @@ $pxConvertRem: 40;
3 3
4 * { 4 * {
5 -webkit-tap-highlight-color: rgba(0,0,0,0); 5 -webkit-tap-highlight-color: rgba(0,0,0,0);
  6 + -moz-tap-highlight-color: rgba(0,0,0,0);
  7 + tap-highlight-color: rgba(0,0,0,0);
6 } 8 }
7 9
8 html, body { 10 html, body {
@@ -45,4 +47,4 @@ a { @@ -45,4 +47,4 @@ a {
45 color: #000; 47 color: #000;
46 } 48 }
47 49
48 -@import "passport/index";  
  50 +@import "layout/header", "layout/footer", "passport/index";
  1 +.yoho-footer {
  2 + font-size: 12px;
  3 + background-color: #fff;
  4 +
  5 + .op-row {
  6 + position: relative;
  7 + padding: 0 30px;
  8 + height: 60px;
  9 + line-height: 60px;
  10 +
  11 + .user-name {
  12 + text-decoration: underline;
  13 + }
  14 +
  15 + .back-to-top {
  16 + position: absolute;
  17 + right: 20px;
  18 + }
  19 + }
  20 +
  21 + .copyright {
  22 + height: 60px;
  23 + line-height: 60px;
  24 + border-top: 1px solid #ccc;
  25 + text-align: center;
  26 + color: #666;
  27 + background-color: #eee;
  28 + }
  29 +}
  1 +.yoho-header {
  2 + position: relative;
  3 + background-color: #000;
  4 + color: #fff;
  5 + width: 100%;
  6 + overflow: hidden;
  7 + height: 44px;
  8 + line-height: 44px;
  9 +
  10 + .nav-back {
  11 + position: absolute;
  12 + left: 17px;
  13 + top: 14px;
  14 + width: 9px;
  15 + height: 16px;
  16 + background: image-url('layout/back.png') no-repeat;
  17 + background-size: 100% 100%;
  18 + outline: none;
  19 + }
  20 +
  21 + .nav-home {
  22 + position: absolute;
  23 + top: 14px;
  24 + right: 17px;
  25 + width: 20px;
  26 + height: 20px;
  27 + background: image-url('layout/home.png') no-repeat;
  28 + background-size: 100% 100%;
  29 + outline: none;
  30 + }
  31 +
  32 + .nav-title {
  33 + position: absolute;
  34 + margin-left: 26px;
  35 + margin-right: 32px;
  36 + height: 100%;
  37 + font-size: 18px;
  38 + color: #fff;
  39 + font-weight: bold;
  40 + top: 0;
  41 + right: 0;
  42 + left: 0;
  43 + overflow: hidden;
  44 + white-space: nowrap;
  45 + text-overflow: ellipsis;
  46 + text-align: center;
  47 + }
  48 +}
  1 +{{> layout/page_footer}}
1 <script src="http://172.16.6.248:8000/static/js/sea.js?nowrap"></script> 2 <script src="http://172.16.6.248:8000/static/js/sea.js?nowrap"></script>
2 <script> 3 <script>
3 seajs.config({ 4 seajs.config({
@@ -25,4 +25,5 @@ @@ -25,4 +25,5 @@
25 </script> 25 </script>
26 <link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css"> 26 <link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">
27 </head> 27 </head>
28 -<body {{#if isPassportPage}}class=passport-body{{/if}}>  
  28 +<body {{#if isPassportPage}}class=passport-body{{/if}}>
  29 +{{> layout/page_header}}
  1 +{{#pageFooter}}
  2 + <footer class="yoho-footer">
  3 + <p class="op-row">
  4 + {{# user}}
  5 + Hi,
  6 + <a class="user-name" href="{{url}}">{{name}}</a>
  7 + <a href="{{signoutUrl}}">退出</a>
  8 + {{^}}
  9 + <a href="{{loginUrl}}">登录</a>
  10 + <span class="sep-line">|</span>
  11 + <a href="{{signupUrl}}">注册</a>
  12 + {{/ user}}
  13 + <span class="back-to-top">
  14 + Back to top
  15 + <i class="iconfont">&#xe608;</i>
  16 + </span>
  17 + </p>
  18 + <address class="copyright">
  19 + CopyRight©2007-2016 南京新与力文化传播有限公司
  20 + </address>
  21 + </footer>
  22 +{{/pageFooter}}
  1 +{{#pageHeader}}
  2 + <header class="yoho-header">
  3 + {{#navBack}}
  4 + <a href={{.}} class="nav-back"></a>
  5 + {{/navBack}}
  6 + {{#navHome}}
  7 + <a href={{.}} class="nav-home"></a>
  8 + {{/navHome}}
  9 + {{#navTitle}}
  10 + <p class="nav-title">{{.}}</p>
  11 + {{/navTitle}}
  12 + </header>
  13 +{{/pageHeader}}
1 <div class="header"> 1 <div class="header">
2 - {{#if showGoBack}}  
3 - <a class="go-back" href={{../backUrl}}> 2 + {{#backUrl}}
  3 + <a class="go-back" href={{.}}>
4 <img src="http://static.dev.yohobuy.com/img/passport/go-back.png"> 4 <img src="http://static.dev.yohobuy.com/img/passport/go-back.png">
5 </a> 5 </a>
6 - {{/if}}  
7 - {{#if showHeaderImg}} 6 + {{/backUrl}}
  7 + {{#showHeaderImg}}
8 <img class="img-header" src="http://static.dev.yohobuy.com/img/passport/yoho-family.png"> 8 <img class="img-header" src="http://static.dev.yohobuy.com/img/passport/yoho-family.png">
9 - {{/if}}  
10 - {{#if showHeaderText}}  
11 - <p class="title">{{../headerText}}</p>  
12 - {{/if}} 9 + {{/showHeaderImg}}
  10 + {{#headerText}}
  11 + <p class="title">{{.}}</p>
  12 + {{/headerText}}
13 </div> 13 </div>
1 <?php 1 <?php
2 use Action\AbstractAction; 2 use Action\AbstractAction;
3 -use Api\Yohobuy; 3 +use LibModels\Wap\Guang\PlusstarData;
4 4
5 /** 5 /**
6 * 频道选择 6 * 频道选择
@@ -12,6 +12,7 @@ class IndexController extends AbstractAction @@ -12,6 +12,7 @@ class IndexController extends AbstractAction
12 $this->_view->assign('title', 'YOHO!有货'); 12 $this->_view->assign('title', 'YOHO!有货');
13 $this->_view->display('index', array('test' => 'hello world')); 13 $this->_view->display('index', array('test' => 'hello world'));
14 14
15 - //$test = Yohobuy::yarClient('http://service.api.yohobuy.com/guang/service/v1/plustar/', 'getBrandInfo', array('id' => 289)); 15 + $test = PlusstarData::brandInfo();
  16 + var_dump($test);
16 } 17 }
17 } 18 }
@@ -13,9 +13,7 @@ class BackController extends AbstractAction @@ -13,9 +13,7 @@ class BackController extends AbstractAction
13 public function emailAction() 13 public function emailAction()
14 { 14 {
15 $data = array( 15 $data = array(
16 - 'showGoBack' => true,  
17 - 'backUrl' => '',  
18 - 'showHeaderText' => true, 16 + 'backUrl' => 'm.yohobuy.com',
19 'headerText' => '找回密码', 17 'headerText' => '找回密码',
20 'isPassportPage' => true, 18 'isPassportPage' => true,
21 'modulePath' => 'passport/back/email' 19 'modulePath' => 'passport/back/email'
@@ -28,9 +26,7 @@ class BackController extends AbstractAction @@ -28,9 +26,7 @@ class BackController extends AbstractAction
28 public function successAction() 26 public function successAction()
29 { 27 {
30 $data = array( 28 $data = array(
31 - 'showGoBack' => true,  
32 - 'backUrl' => '',  
33 - 'showHeaderText' => true, 29 + 'backUrl' => 'm.yohobuy.com',
34 'headerText' => '找回密码', 30 'headerText' => '找回密码',
35 'isPassportPage' => true, 31 'isPassportPage' => true,
36 'modulePath' => 'passport/back/email-success', 32 'modulePath' => 'passport/back/email-success',
@@ -45,9 +41,7 @@ class BackController extends AbstractAction @@ -45,9 +41,7 @@ class BackController extends AbstractAction
45 public function mobileAction() 41 public function mobileAction()
46 { 42 {
47 $data = array( 43 $data = array(
48 - 'showGoBack' => true,  
49 - 'backUrl' => '',  
50 - 'showHeaderText' => true, 44 + 'backUrl' => 'm.yohobuy.com',
51 'headerText' => '找回密码', 45 'headerText' => '找回密码',
52 'isPassportPage' => true, 46 'isPassportPage' => true,
53 'modulePath' => 'passport/back/mobile', 47 'modulePath' => 'passport/back/mobile',
@@ -72,9 +66,7 @@ class BackController extends AbstractAction @@ -72,9 +66,7 @@ class BackController extends AbstractAction
72 public function codeAction() 66 public function codeAction()
73 { 67 {
74 $data = array( 68 $data = array(
75 - 'showGoBack' => true,  
76 - 'backUrl' => '',  
77 - 'showHeaderText' => true, 69 + 'backUrl' => 'm.yohobuy.com',
78 'headerText' => '找回密码', 70 'headerText' => '找回密码',
79 'isPassportPage' => true, 71 'isPassportPage' => true,
80 'modulePath' => 'passport/back/code', 72 'modulePath' => 'passport/back/code',
@@ -89,12 +81,19 @@ class BackController extends AbstractAction @@ -89,12 +81,19 @@ class BackController extends AbstractAction
89 public function passwordAction() 81 public function passwordAction()
90 { 82 {
91 $data = array( 83 $data = array(
92 - 'showGoBack' => true,  
93 - 'backUrl' => '',  
94 - 'showHeaderText' => true, 84 + 'backUrl' => 'm.yohobuy.com',
95 'headerText' => '找回密码', 85 'headerText' => '找回密码',
96 'isPassportPage' => true, 86 'isPassportPage' => true,
97 - 'modulePath' => 'passport/back/new-password' 87 + 'modulePath' => 'passport/back/new-password',
  88 + 'pageHeader' => array(
  89 + 'navBack' => 'm.yohobuy.com',
  90 + 'navHome' => 'm.yohobuy.com',
  91 + 'navTitle' => '上衣'
  92 + ),
  93 + 'pageFooter' => array(
  94 + 'loginUrl' => 'm.yohobuy.com/login.html',
  95 + 'signupUrl' => 'm.yohobuy.com/signup.html'
  96 + )
98 ); 97 );
99 98
100 $this->_view->assign('title', 'YOHO!有货'); 99 $this->_view->assign('title', 'YOHO!有货');
@@ -6,8 +6,7 @@ class LoginController extends AbstractAction @@ -6,8 +6,7 @@ class LoginController extends AbstractAction
6 public function indexAction() 6 public function indexAction()
7 { 7 {
8 $data = array( 8 $data = array(
9 - 'showGoBack' => true,  
10 - 'backUrl' => '', 9 + 'backUrl' => 'm.yohobuy.com',
11 'showHeaderImg' => true, 10 'showHeaderImg' => true,
12 'isPassportPage' => true, 11 'isPassportPage' => true,
13 'modulePath' => 'passport/login/login' 12 'modulePath' => 'passport/login/login'
@@ -20,9 +19,7 @@ class LoginController extends AbstractAction @@ -20,9 +19,7 @@ class LoginController extends AbstractAction
20 public function interationalAction() 19 public function interationalAction()
21 { 20 {
22 $data = array( 21 $data = array(
23 - 'showGoBack' => true,  
24 - 'backUrl' => '',  
25 - 'showHeaderText' => true, 22 + 'backUrl' => 'm.yohobuy.com',
26 'headerText' => '登录', 23 'headerText' => '登录',
27 'isPassportPage' => true, 24 'isPassportPage' => true,
28 'modulePath' => 'passport/login/interational', 25 'modulePath' => 'passport/login/interational',
@@ -6,9 +6,7 @@ class RegController extends AbstractAction @@ -6,9 +6,7 @@ class RegController extends AbstractAction
6 public function indexAction() 6 public function indexAction()
7 { 7 {
8 $data = array( 8 $data = array(
9 - 'showGoBack' => true,  
10 - 'backUrl' => '',  
11 - 'showHeaderText' => true, 9 + 'backUrl' => 'm.yohobuy.com',
12 'headerText' => '注册', 10 'headerText' => '注册',
13 'isPassportPage' => true, 11 'isPassportPage' => true,
14 'modulePath' => 'passport/register/register', 12 'modulePath' => 'passport/register/register',
@@ -33,9 +31,7 @@ class RegController extends AbstractAction @@ -33,9 +31,7 @@ class RegController extends AbstractAction
33 public function codeAction() 31 public function codeAction()
34 { 32 {
35 $data = array( 33 $data = array(
36 - 'showGoBack' => true,  
37 - 'backUrl' => '',  
38 - 'showHeaderText' => true, 34 + 'backUrl' => 'm.yohobuy.com',
39 'headerText' => '注册', 35 'headerText' => '注册',
40 'isPassportPage' => true, 36 'isPassportPage' => true,
41 'modulePath' => 'passport/register/code', 37 'modulePath' => 'passport/register/code',
@@ -50,9 +46,7 @@ class RegController extends AbstractAction @@ -50,9 +46,7 @@ class RegController extends AbstractAction
50 public function passwordAction() 46 public function passwordAction()
51 { 47 {
52 $data = array( 48 $data = array(
53 - 'showGoBack' => true,  
54 - 'backUrl' => '',  
55 - 'showHeaderText' => true, 49 + 'backUrl' => 'm.yohobuy.com',
56 'headerText' => '注册', 50 'headerText' => '注册',
57 'isPassportPage' => true, 51 'isPassportPage' => true,
58 'modulePath' => 'passport/register/password' 52 'modulePath' => 'passport/register/password'