Authored by hf

modify to add production cache config

@@ -224,7 +224,7 @@ class AbstractAction extends Controller_Abstract @@ -224,7 +224,7 @@ class AbstractAction extends Controller_Abstract
224 */ 224 */
225 protected function setTitle($title) 225 protected function setTitle($title)
226 { 226 {
227 - $this->_view->assign('title', $title); 227 + $this->_view->assign('title', $title . ' | ');
228 } 228 }
229 229
230 /** 230 /**
@@ -235,7 +235,7 @@ class AbstractAction extends Controller_Abstract @@ -235,7 +235,7 @@ class AbstractAction extends Controller_Abstract
235 */ 235 */
236 protected function setKeywords($keywords) 236 protected function setKeywords($keywords)
237 { 237 {
238 - $this->_view->assign('keywords', $keywords); 238 + $this->_view->assign('keywords', rtrim($keywords, ',') . ',');
239 } 239 }
240 240
241 /** 241 /**
@@ -22,7 +22,7 @@ class PlusstarData @@ -22,7 +22,7 @@ class PlusstarData
22 const URI_BRANDINFO_PLUSSTAR = 'guang/service/v1/plustar/'; 22 const URI_BRANDINFO_PLUSSTAR = 'guang/service/v1/plustar/';
23 const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/'; 23 const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/';
24 const URI_BRANDINFO_ARTICLE = 'guang/service/v1/article/'; 24 const URI_BRANDINFO_ARTICLE = 'guang/service/v1/article/';
25 - 25 +
26 /** 26 /**
27 * 品牌列表 27 * 品牌列表
28 * 28 *
@@ -39,25 +39,25 @@ class PlusstarData @@ -39,25 +39,25 @@ class PlusstarData
39 $urlList = array(); 39 $urlList = array();
40 // 接口调用的URL 40 // 接口调用的URL
41 $url = Yohobuy::SERVICE_URL . self::URI_BRANDLIST; 41 $url = Yohobuy::SERVICE_URL . self::URI_BRANDLIST;
42 - 42 +
43 // 公共的参数 43 // 公共的参数
44 $param = Yohobuy::param(); 44 $param = Yohobuy::param();
45 $param['gender'] = $gender; 45 $param['gender'] = $gender;
46 $param['is_recommend'] = '0'; 46 $param['is_recommend'] = '0';
47 $param['yh_channel'] = $channel; 47 $param['yh_channel'] = $channel;
48 - 48 +
49 // 构建明星品牌参数及调用接口的URL 49 // 构建明星品牌参数及调用接口的URL
50 $star = $param; 50 $star = $param;
51 $star['brand_type'] = '2'; 51 $star['brand_type'] = '2';
52 $star['client_secret'] = Sign::getSign($star); 52 $star['client_secret'] = Sign::getSign($star);
53 $urlList['star'] = Yohobuy::httpBuildQuery($url, $star); 53 $urlList['star'] = Yohobuy::httpBuildQuery($url, $star);
54 - 54 +
55 // 构建原创品牌参数及调用接口的URL 55 // 构建原创品牌参数及调用接口的URL
56 $original = $param; 56 $original = $param;
57 $original['brand_type'] = '3'; 57 $original['brand_type'] = '3';
58 $original['client_secret'] = Sign::getSign($original); 58 $original['client_secret'] = Sign::getSign($original);
59 $urlList['original'] = Yohobuy::httpBuildQuery($url, $original); 59 $urlList['original'] = Yohobuy::httpBuildQuery($url, $original);
60 - 60 +
61 return Yohobuy::getMulti($urlList); 61 return Yohobuy::getMulti($urlList);
62 } 62 }
63 63
@@ -84,15 +84,16 @@ class PlusstarData @@ -84,15 +84,16 @@ class PlusstarData
84 $result['getNewProduct'] = array(); 84 $result['getNewProduct'] = array();
85 $result['getUidProductFav'] = array(); 85 $result['getUidProductFav'] = array();
86 $result['getArticleByBrand'] = array(); 86 $result['getArticleByBrand'] = array();
87 - 87 +
88 // 品牌详情信息 88 // 品牌详情信息
89 - $brandInfo = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_PLUSSTAR, 'getBrandInfo', array(array('id' => $id)) ); 89 + $brandInfo = Yohobuy::yarClient(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_PLUSSTAR, 'getBrandInfo', array(array('id' => $id)));
90 if (!isset($brandInfo['data']['brand_id'])) { 90 if (!isset($brandInfo['data']['brand_id'])) {
91 return $result; 91 return $result;
92 - } else { 92 + }
  93 + else {
93 $result['getBrandInfo'] = $brandInfo; 94 $result['getBrandInfo'] = $brandInfo;
94 } 95 }
95 - 96 +
96 // 是否收藏店铺 97 // 是否收藏店铺
97 $isUidOk = $uid && is_numeric($uid); 98 $isUidOk = $uid && is_numeric($uid);
98 if ($isUidOk) { 99 if ($isUidOk) {
@@ -100,17 +101,17 @@ class PlusstarData @@ -100,17 +101,17 @@ class PlusstarData
100 $result['getUidBrandFav'] = empty($retval['data']) ? false : $retval['data']; 101 $result['getUidBrandFav'] = empty($retval['data']) ? false : $retval['data'];
101 }); 102 });
102 } 103 }
103 - 104 +
104 // 相关资讯列表 (3篇) 105 // 相关资讯列表 (3篇)
105 $result['getArticleByBrand'] = array(); 106 $result['getArticleByBrand'] = array();
106 Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_ARTICLE, 'getArticleByBrand', array($brandInfo['data']['brand_id'], 3, $udid), function($retval) use(&$result) { 107 Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_ARTICLE, 'getArticleByBrand', array($brandInfo['data']['brand_id'], 3, $udid), function($retval) use(&$result) {
107 $result['getArticleByBrand'] = empty($retval) ? array() : $retval; 108 $result['getArticleByBrand'] = empty($retval) ? array() : $retval;
108 }); 109 });
109 - 110 +
110 // 新品到着列表 (6篇) 111 // 新品到着列表 (6篇)
111 $result['getNewProduct'] = array(); 112 $result['getNewProduct'] = array();
112 $result['getUidProductFav'] = array(); 113 $result['getUidProductFav'] = array();
113 - 114 +
114 do { 115 do {
115 // 调用搜索接口 116 // 调用搜索接口
116 $param = Yohobuy::param(); 117 $param = Yohobuy::param();
@@ -121,34 +122,43 @@ class PlusstarData @@ -121,34 +122,43 @@ class PlusstarData
121 $param['gender'] = $gender; 122 $param['gender'] = $gender;
122 $param['order'] = 's_t_desc'; 123 $param['order'] = 's_t_desc';
123 $param['client_secret'] = Sign::getSign($param); 124 $param['client_secret'] = Sign::getSign($param);
124 - $newProduct = Yohobuy::get(Yohobuy::API_URL, $param); 125 + $newProduct = Yohobuy::get(Yohobuy::API_URL, $param);
125 if (empty($newProduct['data']['product_list'])) { 126 if (empty($newProduct['data']['product_list'])) {
126 break; 127 break;
127 } 128 }
128 - 129 +
129 $skn = ''; 130 $skn = '';
  131 + $i = 0;
130 foreach ($newProduct['data']['product_list'] as $value) { 132 foreach ($newProduct['data']['product_list'] as $value) {
  133 + // 最多6个
  134 + if ($i > 5) {
  135 + break;
  136 + }
  137 +
131 if (empty($value['goods_list'])) { 138 if (empty($value['goods_list'])) {
132 continue; 139 continue;
133 } 140 }
134 - 141 +
135 // 商品信息列表 142 // 商品信息列表
136 - $result['getNewProduct'][] = Helpers::formatProduct($value);  
137 - 143 + $result['getNewProduct'][$i] = Helpers::formatProduct($value);
  144 +
138 // 用户是否收藏该商品 145 // 用户是否收藏该商品
139 $skn = $value['product_skn']; 146 $skn = $value['product_skn'];
140 - $result['getUidProductFav'][ $skn ] = false; 147 + $result['getUidProductFav'][$skn] = false;
141 if ($isUidOk) { 148 if ($isUidOk) {
142 - Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_FAVORITE, 'getUidProductFav', array($uid, $value['product_skn']), function($retval) use(&$result,&$skn) {  
143 - $result['getUidProductFav'][ $skn ] = empty($retval['data']) ? false : $retval['data']; 149 + Yohobuy::yarConcurrentCall(Yohobuy::SERVICE_URL . self::URI_BRANDINFO_FAVORITE, 'getUidProductFav', array($uid, $value['product_skn']), function($retval) use(&$result, &$skn) {
  150 + $result['getUidProductFav'][$skn] = empty($retval['data']) ? false : $retval['data'];
144 }); 151 });
145 } 152 }
  153 +
  154 + $i ++;
146 } 155 }
147 - } while (false);  
148 - 156 + }
  157 + while (false);
  158 +
149 // 调用发起请求 159 // 调用发起请求
150 Yohobuy::yarConcurrentLoop(); 160 Yohobuy::yarConcurrentLoop();
151 - 161 +
152 return $result; 162 return $result;
153 163
154 // $goods_url = MakeUrl::h5ProductDetailUrl($baseUrl,$new_goods_info['product_id'],$new_goods_info['goods_list'][0]['goods_id'],$new_goods_info['cn_alphabet']); 164 // $goods_url = MakeUrl::h5ProductDetailUrl($baseUrl,$new_goods_info['product_id'],$new_goods_info['goods_list'][0]['goods_id'],$new_goods_info['cn_alphabet']);
@@ -98,11 +98,11 @@ class Helpers @@ -98,11 +98,11 @@ class Helpers
98 98
99 // 判断是否显示作者信息 99 // 判断是否显示作者信息
100 if ($showAuthor) { 100 if ($showAuthor) {
101 - $result['author'] = $articleData['author']; 101 + $result['author'] = empty($articleData['author']) ? false : $articleData['author'];
102 } 102 }
103 103
104 // 模板中需要的标签标识 104 // 模板中需要的标签标识
105 - if ($showTag) { 105 + if ($showTag && isset($articleData['category_id'])) {
106 switch (strval($articleData['category_id'])) { 106 switch (strval($articleData['category_id'])) {
107 case '1': // 话题 107 case '1': // 话题
108 $result['isTopic'] = true; 108 $result['isTopic'] = true;
@@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 - <title>{{title}}</title>  
6 - <meta name="keywords" content="{{keywords}}">  
7 - <meta name="description" content="{{description}}"> 5 + <title>{{title}}YOHO!有货</title>
  6 + <meta name="keywords" content="{{keywords}}Yoho! 有货官网,潮流志,潮流男装,潮牌,美国潮牌,日本潮牌,香港潮牌,潮牌店,新品首发,欧美潮流,全球购,代购,时尚,流行,特卖,B2C,正品,购物网站,网上购物,货到付款">
  7 + <meta name="description" content="{{description}}YOHO! 有货,年轻人潮流购物中心,中国最大的潮流商品购物网站。100%品牌正品保证,支持货到付款。作为YOHO!旗下的购物平台,汇集了全球潮流时尚商品和中国最流行的商品,也是国内最大的原创文化商品平台,也是香港,台湾地区流行商品的集中地。同时包含日本、韩国等众多国外潮流品牌,带给您全新潮流购物体验。">
8 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> 8 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
9 <meta http-equiv="cleartype" content="on"> 9 <meta http-equiv="cleartype" content="on">
10 <meta name="apple-mobile-web-app-status-bar-style" content="black" /> 10 <meta name="apple-mobile-web-app-status-bar-style" content="black" />
@@ -22,17 +22,15 @@ @@ -22,17 +22,15 @@
22 }()); 22 }());
23 })(document, window); 23 })(document, window);
24 </script> 24 </script>
25 - {{#if rlsEnv}}  
26 - <link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css">  
27 - {{/if}}  
28 -  
29 - {{#if rlsEnv}}  
30 - {{/if}}  
31 -  
32 - {{#if devEnv}}  
33 - <link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">  
34 - {{/if}}  
35 - 25 +{{#if rlsEnv}}
  26 + <link rel="stylesheet" href="http://cdn.yoho.cn/myohobuy/{{version}}/index.css">
  27 +{{/if}}
  28 +{{#if testEnv}}
  29 + <link rel="stylesheet" href="http://static.wap.yohobuy.com/css/index.css">
  30 +{{/if}}
  31 +{{#if devEnv}}
  32 + <link rel="stylesheet" href="http://static.dev.yohobuy.com/css/index.css">
  33 +{{/if}}
36 </head> 34 </head>
37 <body {{#if isPassportPage}}class=passport-body{{/if}}> 35 <body {{#if isPassportPage}}class=passport-body{{/if}}>
38 {{> layout/page_header}} 36 {{> layout/page_header}}
@@ -101,6 +101,7 @@ class RecomController extends AbstractAction @@ -101,6 +101,7 @@ class RecomController extends AbstractAction
101 /** 101 /**
102 * 你可能喜欢的创意生活的新品到着和人气单品列表 102 * 你可能喜欢的创意生活的新品到着和人气单品列表
103 * 103 *
  104 + * @param int page 分页的页码
104 * @return html 105 * @return html
105 */ 106 */
106 public function maylikelifeAction() 107 public function maylikelifeAction()
@@ -111,12 +112,6 @@ class RecomController extends AbstractAction @@ -111,12 +112,6 @@ class RecomController extends AbstractAction
111 break; 112 break;
112 } 113 }
113 114
114 - /* 判断分页参数是否有效 */  
115 - $page = $this->get('page', 1);  
116 - if (!is_numeric($page)) {  
117 - break;  
118 - }  
119 -  
120 /* 取可能喜欢的数据 */ 115 /* 取可能喜欢的数据 */
121 $recom = RecomData::mayLikeLifestyle(); 116 $recom = RecomData::mayLikeLifestyle();
122 if (empty($recom['data']['product_list'])) { 117 if (empty($recom['data']['product_list'])) {
@@ -42,7 +42,7 @@ class PlusstarController extends AbstractAction @@ -42,7 +42,7 @@ class PlusstarController extends AbstractAction
42 // 情况1: 多张图 42 // 情况1: 多张图
43 if (isset($star['data'][1])) { 43 if (isset($star['data'][1])) {
44 foreach ($star['data'] as $value) { 44 foreach ($star['data'] as $value) {
45 - $build['url'] = $value['url']; 45 + $build['url'] = '/guang/plusstar/detail?id=' . $star['id'] . '&gender='.$gender;
46 $build['img'] = Helpers::getImageUrl($value['src'], 640, 310); 46 $build['img'] = Helpers::getImageUrl($value['src'], 640, 310);
47 $imgs[] = $build; 47 $imgs[] = $build;
48 } 48 }
@@ -50,7 +50,7 @@ class PlusstarController extends AbstractAction @@ -50,7 +50,7 @@ class PlusstarController extends AbstractAction
50 } 50 }
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'] = '/guang/plusstar/detail?id=' . $star['id'] . '&gender='.$gender;
54 $build['img'] = Helpers::getImageUrl($star['data'][0]['src'], 640, 310); 54 $build['img'] = Helpers::getImageUrl($star['data'][0]['src'], 640, 310);
55 $data['ps']['star'][] = $build; 55 $data['ps']['star'][] = $build;
56 } 56 }
@@ -66,7 +66,7 @@ class PlusstarController extends AbstractAction @@ -66,7 +66,7 @@ class PlusstarController extends AbstractAction
66 // 情况1: 多张图 66 // 情况1: 多张图
67 if (isset($original['data'][1])) { 67 if (isset($original['data'][1])) {
68 foreach ($original['data'] as $value) { 68 foreach ($original['data'] as $value) {
69 - $build['url'] = $value['url']; 69 + $build['url'] = '/guang/plusstar/detail?id=' . $original['id'] . '&gender='.$gender;
70 $build['img'] = Helpers::getImageUrl($value['src'], 640, 310); 70 $build['img'] = Helpers::getImageUrl($value['src'], 640, 310);
71 $build['deps'] = $original['brand_title']; 71 $build['deps'] = $original['brand_title'];
72 $imgs[] = $build; 72 $imgs[] = $build;
@@ -75,7 +75,7 @@ class PlusstarController extends AbstractAction @@ -75,7 +75,7 @@ class PlusstarController extends AbstractAction
75 } 75 }
76 // 情况2: 单张图 76 // 情况2: 单张图
77 elseif (isset($original['data'][0])) { 77 elseif (isset($original['data'][0])) {
78 - $build['url'] = $original['data'][0]['url']; 78 + $build['url'] = '/guang/plusstar/detail?id=' . $original['id'] . '&gender='.$gender;
79 $build['img'] = Helpers::getImageUrl($original['data'][0]['src'], 640, 310); 79 $build['img'] = Helpers::getImageUrl($original['data'][0]['src'], 640, 310);
80 $build['deps'] = $original['brand_title']; 80 $build['deps'] = $original['brand_title'];
81 $data['ps']['plus'][] = $build; 81 $data['ps']['plus'][] = $build;
@@ -98,8 +98,8 @@ class PlusstarController extends AbstractAction @@ -98,8 +98,8 @@ class PlusstarController extends AbstractAction
98 98
99 $id = $this->get('id'); 99 $id = $this->get('id');
100 $gender = $this->get('gender', '1,3'); 100 $gender = $this->get('gender', '1,3');
101 - $uid = 0; // @todo  
102 - $udid = null; // @todo 101 + $uid = $this->getUid();
  102 + $udid = $this->getUdid();
103 103
104 do { 104 do {
105 /* 判断参数是否有效 */ 105 /* 判断参数是否有效 */
@@ -109,46 +109,30 @@ class PlusstarController extends AbstractAction @@ -109,46 +109,30 @@ class PlusstarController extends AbstractAction
109 109
110 /* 判断品牌信息是否为空 */ 110 /* 判断品牌信息是否为空 */
111 $brandInfo = PlusstarData::brandInfo($id, $gender, $uid, $udid); 111 $brandInfo = PlusstarData::brandInfo($id, $gender, $uid, $udid);
112 - if (empty($brandInfo['getBrandInfo']['brand_id'])) { 112 + if (empty($brandInfo['getBrandInfo']['data']['brand_id'])) {
113 break; 113 break;
114 } 114 }
115 115
116 $data['psDetail'] = true; 116 $data['psDetail'] = true;
117 - $data['ps']['id'] = $brandInfo['getBrandInfo']['brand_id'];  
118 - $data['ps']['banner'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['cover_img'], 640, 309);  
119 - $data['ps']['logo'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['brand_ico'], 160, 160);  
120 - $data['ps']['name'] = $brandInfo['getBrandInfo']['brand_name']; 117 + $data['ps']['id'] = $brandInfo['getBrandInfo']['data']['brand_id'];
  118 + $data['ps']['banner'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['cover_img'], 640, 309);
  119 + $data['ps']['logo'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['brand_ico'], 160, 160);
  120 + $data['ps']['name'] = $brandInfo['getBrandInfo']['data']['brand_name'];
121 $data['ps']['isLike'] = $brandInfo['getUidBrandFav']; 121 $data['ps']['isLike'] = $brandInfo['getUidBrandFav'];
122 - $data['ps']['likeUrl'] = "http://guang.m.yohobuy.com/plustar/brandinfo?id=285&amp;openby:yohobuy={&quot;action&quot;:&quot;go.weblogin&quot;,&quot;params&quot;:{&quot;jumpurl&quot;:{&quot;url&quot;:&quot;http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo&quot;,&quot;param&quot;:{&quot;id&quot;:285}},&quot;requesturl&quot;:{&quot;url&quot;:&quot;\/guang\/api\/v1\/favorite\/togglebrand&quot;,&quot;param&quot;:{&quot;brand_id&quot;:&quot;701&quot;}},&quot;priority&quot;:&quot;Y&quot;}}";  
123 - $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['brand_intro']) ? '' : strtr(strip_tags($brandInfo['getBrandInfo']['brand_intro']), 'nbsp;', ' '); 122 + $data['ps']['likeUrl'] = false; //"http://guang.m.yohobuy.com/plustar/brandinfo?id=285&amp;openby:yohobuy={&quot;action&quot;:&quot;go.weblogin&quot;,&quot;params&quot;:{&quot;jumpurl&quot;:{&quot;url&quot;:&quot;http:\/\/guang.m.yohobuy.com\/plustar\/brandinfo&quot;,&quot;param&quot;:{&quot;id&quot;:285}},&quot;requesturl&quot;:{&quot;url&quot;:&quot;\/guang\/api\/v1\/favorite\/togglebrand&quot;,&quot;param&quot;:{&quot;brand_id&quot;:&quot;701&quot;}},&quot;priority&quot;:&quot;Y&quot;}}";
  123 + $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? '' : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' ') );
124 $data['ps']['newArrival'] = array(); 124 $data['ps']['newArrival'] = array();
125 - $data['ps']['newArrival']['moreUrl'] = ''; // @todo 125 + $data['ps']['newArrival']['moreUrl'] = ''; // @todo 品牌列表页面
126 $data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct']; 126 $data['ps']['newArrival']['naList'] = $brandInfo['getNewProduct'];
127 $data['ps']['infos'] = array(); 127 $data['ps']['infos'] = array();
128 128
129 if (empty($brandInfo['getArticleByBrand'])) { 129 if (empty($brandInfo['getArticleByBrand'])) {
130 break; 130 break;
131 } 131 }
132 - 132 +
133 // 相关文章 133 // 相关文章
134 - $build = array();  
135 foreach ($brandInfo['getArticleByBrand'] as $value) { 134 foreach ($brandInfo['getArticleByBrand'] as $value) {
136 - $build = array();  
137 - $build['id'] = $value['id'];  
138 - $build['showTags'] = false; // 不显示标签  
139 - $build['img'] = Helpers::getImageUrl($value['src'], 640, 640, $value['cover_image_type']);  
140 - $build['url'] = $value['url']; // @todo  
141 - $build['title'] = $value['title'];  
142 - $build['text'] = $value['intro'];  
143 - $build['publishTime'] = $value['publish_time'];  
144 - $build['pageView'] = $value['views_num'];  
145 - $build['like'] = array();  
146 - $build['like']['isLiked'] = $value['like']['isLiked'];  
147 - $build['like']['count'] = $value['like']['count'];  
148 - $build['share'] = ''; //分享链接  
149 - $build['author'] = false; // 作者信息(接口暂未上线)  
150 -  
151 - $data['ps']['infos'][] = $build; 135 + $data['ps']['infos'][] = Helpers::formatArticle($value, false, false, false);
152 } 136 }
153 137
154 $brandInfo = array(); 138 $brandInfo = array();
@@ -2,7 +2,8 @@ @@ -2,7 +2,8 @@
2 2
3 use Action\AbstractAction; 3 use Action\AbstractAction;
4 use LibModels\Wap\Passport\BackData; 4 use LibModels\Wap\Passport\BackData;
5 -use Hood\Core\Security\AuthCode; 5 +use LibModels\Wap\Passport\RegData;
  6 +
6 /** 7 /**
7 * 频道选择 8 * 频道选择
8 */ 9 */
@@ -11,14 +12,17 @@ class BackController extends AbstractAction @@ -11,14 +12,17 @@ class BackController extends AbstractAction
11 12
12 public function emailAction() 13 public function emailAction()
13 { 14 {
  15 + $this->setTitle('找回密码-通过邮箱');
  16 +
14 $data = array( 17 $data = array(
15 - 'backUrl' => '/passport/login/index', 18 + 'backUrl' => '/signin.html',
16 'headerText' => '找回密码', 19 'headerText' => '找回密码',
17 'isPassportPage' => true, 20 'isPassportPage' => true,
18 'backEmail' => true 21 'backEmail' => true
19 ); 22 );
20 23
21 - $this->_view->assign('title', 'YOHO!有货'); 24 + // 生成HTML (emailback.html)
  25 + $this->_view->html('emailback');
22 $this->_view->display('email', $data); 26 $this->_view->display('email', $data);
23 } 27 }
24 28
@@ -60,13 +64,15 @@ class BackController extends AbstractAction @@ -60,13 +64,15 @@ class BackController extends AbstractAction
60 64
61 public function successAction() 65 public function successAction()
62 { 66 {
  67 + $this->setTitle('找回密码-通过邮箱');
  68 +
63 $email = $this->get('email', ''); 69 $email = $this->get('email', '');
64 // 获取到邮箱域名 70 // 获取到邮箱域名
65 $pattern = "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i"; 71 $pattern = "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i";
66 $domain_name = 'http://mail.'.preg_replace( $pattern ,"$2", $email ); 72 $domain_name = 'http://mail.'.preg_replace( $pattern ,"$2", $email );
67 73
68 $data = array( 74 $data = array(
69 - 'backUrl' => '/passport/back/email', 75 + 'backUrl' => 'emailback.html',
70 'headerText' => '找回密码', 76 'headerText' => '找回密码',
71 'isPassportPage' => true, 77 'isPassportPage' => true,
72 'backEmailSuccess' => true, 78 'backEmailSuccess' => true,
@@ -74,7 +80,6 @@ class BackController extends AbstractAction @@ -74,7 +80,6 @@ class BackController extends AbstractAction
74 'resendUrl' => '/passport/back/resendemail?email='.$email 80 'resendUrl' => '/passport/back/resendemail?email='.$email
75 ); 81 );
76 82
77 - $this->_view->assign('title', 'YOHO!有货');  
78 $this->_view->display('email-success', $data); 83 $this->_view->display('email-success', $data);
79 } 84 }
80 85
@@ -99,42 +104,20 @@ class BackController extends AbstractAction @@ -99,42 +104,20 @@ class BackController extends AbstractAction
99 104
100 public function mobileAction() 105 public function mobileAction()
101 { 106 {
102 - // 获取地区信息  
103 - $areas = array();  
104 - $areaDatas = $data = BackData::getAreasData();  
105 - if($areaDatas['code'] == 200)  
106 - {  
107 - $areas = $areaDatas['data'];  
108 - }  
109 - // 处理地区信息  
110 - foreach ($areas as &$val) {  
111 - $val['areaCode'] = '+'.$val['area'];  
112 - if($val['area'] === '86')  
113 - {  
114 - $val['selected'] = true;  
115 - }  
116 - unset($val['area']);  
117 - }  
118 - /*// 排序  
119 - uasort($areas, function($a, $b) {  
120 - if($a['id'] === $b['id'])  
121 - {  
122 - return 0;  
123 - }  
124 -  
125 - return ($a['id'] < $b['id'] ? -1 : 1);  
126 - });*/  
127 - 107 + $this->setTitle('找回密码-通过手机号');
  108 +
128 $data = array( 109 $data = array(
129 - 'backUrl' => '/passport/login/index', 110 + 'backUrl' => '/signin.html',
130 'headerText' => '找回密码', 111 'headerText' => '找回密码',
131 'isPassportPage' => true, 112 'isPassportPage' => true,
132 'backMobile' => true, 113 'backMobile' => true,
133 - 'countrys' => $areas, 114 + 'countrys' => RegData::getAreasData(),
134 'countryCode' => '+86' 115 'countryCode' => '+86'
135 ); 116 );
136 117
137 - $this->_view->assign('title', 'YOHO!有货'); 118 + // 生成HTML (mobileback.html)
  119 + $this->_view->html('mobileback.html');
  120 +
138 $this->_view->display('mobile', $data); 121 $this->_view->display('mobile', $data);
139 } 122 }
140 123
@@ -169,7 +152,7 @@ class BackController extends AbstractAction @@ -169,7 +152,7 @@ class BackController extends AbstractAction
169 $areaCode = '+'.$areaCode; 152 $areaCode = '+'.$areaCode;
170 153
171 $data = array( 154 $data = array(
172 - 'backUrl' => '/passport/back/mobile', 155 + 'backUrl' => '/mobileback.html',
173 'headerText' => '找回密码', 156 'headerText' => '找回密码',
174 'isPassportPage' => true, 157 'isPassportPage' => true,
175 'backCode' => true, 158 'backCode' => true,
@@ -25,9 +25,9 @@ class LoginController extends AbstractAction @@ -25,9 +25,9 @@ class LoginController extends AbstractAction
25 'showHeaderImg' => true, // 控制显示头部图片 25 'showHeaderImg' => true, // 控制显示头部图片
26 'isPassportPage' => true, // 模板中模块标识 26 'isPassportPage' => true, // 模板中模块标识
27 'registerUrl' => '/reg.html', // 注册的URL链接 27 'registerUrl' => '/reg.html', // 注册的URL链接
28 - 'aliLoginUrl' => '/passport/login/alipay', // 注册的URL链接  
29 - 'weiboLoginUrl' => '/passport/login/sina', // 注册的URL链接  
30 - 'qqLoginUrl' => '/passport/login/qq', // 注册的URL链接 28 + 'aliLoginUrl' => '/passport/login/alipay', // 支付宝快捷登录的URL链接
  29 + 'weiboLoginUrl' => '/passport/login/sina', // 微博登录的URL链接
  30 + 'qqLoginUrl' => '/passport/login/qq', // 腾讯QQ登录的URL链接
31 'interationalUrl' => '/login.html', // 国际号登录的URL链接 31 'interationalUrl' => '/login.html', // 国际号登录的URL链接
32 'phoneRetriveUrl' => '/phoneback.html', // 通过手机号找回密码的URL链接 32 'phoneRetriveUrl' => '/phoneback.html', // 通过手机号找回密码的URL链接
33 'emailRetriveUrl' => '/emailback.html', // 通过邮箱找回密码的URL链接 33 'emailRetriveUrl' => '/emailback.html', // 通过邮箱找回密码的URL链接
1 -[common]  
2 -servers.host = 127.0.0.1:11211:90  
3 -[memcached:common]  
4 -servers.hosts = 127.0.0.1:11212:90,127.0.0.1:11213:10 1 +[memcached]
  2 +master.hosts=10.170.182.9:12111,10.172.169.31:12111,10.173.8.214:12111
  3 +slave.hosts=10.170.182.9:12112,10.172.169.31:12112,10.173.8.214:12112
5 [redis] 4 [redis]
6 -servers.hosts = 127.0.0.1:6379  
  5 +servers.hosts=127.0.0.1:6379