Authored by wangqing

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

@@ -482,7 +482,7 @@ class WebAction extends Controller_Abstract @@ -482,7 +482,7 @@ class WebAction extends Controller_Abstract
482 'gobytype'=> 'gobuy'.$channel, 482 'gobytype'=> 'gobuy'.$channel,
483 'searchcate'=>'searchcate'.$channel, 483 'searchcate'=>'searchcate'.$channel,
484 'header'=> true, 484 'header'=> true,
485 - 'apiDomain'=>'' 485 + 'apiDomain'=> $apiDomain
486 ); 486 );
487 $this->_view->assign('headerdata', $header); 487 $this->_view->assign('headerdata', $header);
488 } 488 }
@@ -56,7 +56,7 @@ class SearchData extends \LibModels\Wap\Product\SearchData @@ -56,7 +56,7 @@ class SearchData extends \LibModels\Wap\Product\SearchData
56 return 'http://101.200.31.165/yohosearch/shops.json'; 56 return 'http://101.200.31.165/yohosearch/shops.json';
57 } 57 }
58 return 'http://101.200.31.165/yohosearch/search.json'; 58 return 'http://101.200.31.165/yohosearch/search.json';
59 - case 'test': 59 + case 'testing':
60 case 'developer': 60 case 'developer':
61 default: 61 default:
62 if ($type == 'sort') { 62 if ($type == 'sort') {
@@ -1027,13 +1027,13 @@ class HelperSearch @@ -1027,13 +1027,13 @@ class HelperSearch
1027 'order' => 'p_d_asc' 1027 'order' => 'p_d_asc'
1028 ))); 1028 )));
1029 $active = ''; 1029 $active = '';
1030 - $desc = true; 1030 + $desc = '';
1031 } 1031 }
1032 else if (self::$params['order'] == 'p_d_asc') { 1032 else if (self::$params['order'] == 'p_d_asc') {
1033 $url = self::buildUrl(array_merge($params, array( 1033 $url = self::buildUrl(array_merge($params, array(
1034 'order' => 'p_d_desc' 1034 'order' => 'p_d_desc'
1035 ))); 1035 )));
1036 - $desc = false; 1036 + $desc = true;
1037 $active = true; 1037 $active = true;
1038 } 1038 }
1039 else { 1039 else {
  1 +server
  2 +{
  3 + listen 80;
  4 + server_name www.yohobuy.com;
  5 + root /Data/PE/yohobuy-pc/yohobuy/www.yohobuy.com/public;
  6 +
  7 + # 频道相关
  8 + location = / {
  9 + proxy_redirect off;
  10 + proxy_pass http://yohobuy-pc;
  11 + proxy_set_header Host $host;
  12 + proxy_set_header X-Real-IP $remote_addr;
  13 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  14 + proxy_set_header Accept-Encoding "gzip";
  15 + }
  16 + location = /woman {
  17 + proxy_redirect off;
  18 + proxy_pass http://yohobuy-pc;
  19 + proxy_set_header Host $host;
  20 + proxy_set_header X-Real-IP $remote_addr;
  21 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  22 + proxy_set_header Accept-Encoding "gzip";
  23 + }
  24 + location = /kids {
  25 + proxy_redirect off;
  26 + proxy_pass http://yohobuy-pc;
  27 + proxy_set_header Host $host;
  28 + proxy_set_header X-Real-IP $remote_addr;
  29 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  30 + proxy_set_header Accept-Encoding "gzip";
  31 + }
  32 + location = /lifestyle {
  33 + proxy_redirect off;
  34 + proxy_pass http://yohobuy-pc;
  35 + proxy_set_header Host $host;
  36 + proxy_set_header X-Real-IP $remote_addr;
  37 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  38 + proxy_set_header Accept-Encoding "gzip";
  39 + }
  40 +
  41 + location ^~ /common {
  42 + proxy_redirect off;
  43 + proxy_pass http://yohobuy-pc;
  44 + proxy_set_header Host $host;
  45 + proxy_set_header X-Real-IP $remote_addr;
  46 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  47 + proxy_set_header Accept-Encoding "gzip";
  48 + }
  49 + location ^~ /tools {
  50 + proxy_redirect off;
  51 + proxy_pass http://yohobuy-pc;
  52 + proxy_set_header Host $host;
  53 + proxy_set_header X-Real-IP $remote_addr;
  54 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  55 + proxy_set_header Accept-Encoding "gzip";
  56 + }
  57 +
  58 + # 其它默认
  59 + location / {
  60 + proxy_redirect off;
  61 + proxy_pass http://yohobuy-old-www;
  62 + proxy_set_header Host $host;
  63 + proxy_set_header X-Real-IP $remote_addr;
  64 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  65 + proxy_set_header Accept-Encoding "gzip";
  66 + }
  67 +
  68 + location =/favicon.ico {
  69 + expires 30d;
  70 + }
  71 + location =/crossdomain.xml {
  72 + expires 30d;
  73 + }
  74 + location =/robots.txt {
  75 + expires 1d;
  76 + }
  77 +}
  78 +
  79 +server
  80 +{
  81 + listen 80;
  82 + server_name new.yohobuy.com;
  83 + root /Data/PE/yohobuy-pc/yohobuy/www.yohobuy.com/public;
  84 +
  85 + # 频道相关
  86 + location = / {
  87 + proxy_redirect off;
  88 + proxy_pass http://yohobuy-pc;
  89 + proxy_set_header Host $host;
  90 + proxy_set_header X-Real-IP $remote_addr;
  91 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  92 + proxy_set_header Accept-Encoding "gzip";
  93 + }
  94 + location = /woman {
  95 + proxy_redirect off;
  96 + proxy_pass http://yohobuy-pc;
  97 + proxy_set_header Host $host;
  98 + proxy_set_header X-Real-IP $remote_addr;
  99 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  100 + proxy_set_header Accept-Encoding "gzip";
  101 + }
  102 + location = /kids {
  103 + proxy_redirect off;
  104 + proxy_pass http://yohobuy-pc;
  105 + proxy_set_header Host $host;
  106 + proxy_set_header X-Real-IP $remote_addr;
  107 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  108 + proxy_set_header Accept-Encoding "gzip";
  109 + }
  110 + location = /lifestyle {
  111 + proxy_redirect off;
  112 + proxy_pass http://yohobuy-pc;
  113 + proxy_set_header Host $host;
  114 + proxy_set_header X-Real-IP $remote_addr;
  115 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  116 + proxy_set_header Accept-Encoding "gzip";
  117 + }
  118 +
  119 + location ^~ /common {
  120 + proxy_redirect off;
  121 + proxy_pass http://yohobuy-pc;
  122 + proxy_set_header Host $host;
  123 + proxy_set_header X-Real-IP $remote_addr;
  124 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  125 + proxy_set_header Accept-Encoding "gzip";
  126 + }
  127 +
  128 + # 其它默认
  129 + location / {
  130 + proxy_redirect off;
  131 + proxy_pass http://yohobuy-old-new;
  132 + proxy_set_header Host $host;
  133 + proxy_set_header X-Real-IP $remote_addr;
  134 + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  135 + proxy_set_header Accept-Encoding "gzip";
  136 + }
  137 +
  138 + location =/favicon.ico {
  139 + expires 30d;
  140 + }
  141 + location =/crossdomain.xml {
  142 + expires 30d;
  143 + }
  144 + location =/robots.txt {
  145 + expires 1d;
  146 + }
  147 +}
  148 +
@@ -9,6 +9,11 @@ use LibModels\Web\Home\IndexData; @@ -9,6 +9,11 @@ use LibModels\Web\Home\IndexData;
9 use LibModels\Web\Product\SearchData; 9 use LibModels\Web\Product\SearchData;
10 use WebPlugin\DataProcess\Channel as ChannelProcess; 10 use WebPlugin\DataProcess\Channel as ChannelProcess;
11 11
  12 +define('CODE_BOYS_CHANNEL_TMP', (APPLICATION_ENV == 'release' || APPLICATION_ENV == 'preview') ? '79372627eee75d73afe7f9bac91e5ce6' : 'c15bf0cbfbd4893fd70c869c991f6d3d');
  13 +define('CODE_GIRLS_CHANNEL_TMP', (APPLICATION_ENV == 'release' || APPLICATION_ENV == 'preview') ? '75215008957605c05e8cd375eac4f817' : 'a519ba44ef3a85cf3c05e405c6ba8e53');
  14 +define('CODE_KIDS_CHANNEL_TMP', (APPLICATION_ENV == 'release' || APPLICATION_ENV == 'preview') ? 'd71f4b27f2a7229fbb31a4bc490a6f36' : 'a7741b94e8bb9d56d0d36e00c05956f7');
  15 +define('CODE_LIFESTYLE_CHANNEL_TMP', (APPLICATION_ENV == 'release' || APPLICATION_ENV == 'preview') ? '8a341ca7eacc069ba80f02dec80eaf34' : '1b053fd044834f5c86d5eb15fb237af9');
  16 +
12 /** 17 /**
13 * web首页模板数据模型 18 * web首页模板数据模型
14 * 19 *
@@ -34,21 +39,21 @@ class HomeModel @@ -34,21 +39,21 @@ class HomeModel
34 const COOKIE_NAME_LIFESTYLE = 'lifestyle'; 39 const COOKIE_NAME_LIFESTYLE = 'lifestyle';
35 40
36 //release: test: 41 //release: test:
37 - //boys:79372627eee75d73afe7f9bac91e5ce6, c15bf0cbfbd4893fd70c869c991f6d3d  
38 - //girls: 75215008957605c05e8cd375eac4f817, a519ba44ef3a85cf3c05e405c6ba8e53  
39 - //kids:d71f4b27f2a7229fbb31a4bc490a6f36,a7741b94e8bb9d56d0d36e00c05956f7  
40 - //lifestyle:8a341ca7eacc069ba80f02dec80eaf34,1b053fd044834f5c86d5eb15fb237af9 42 + //boys:79372627eee75d73afe7f9bac91e5ce6, c15bf0cbfbd4893fd70c869c991f6d3d
  43 + //girls: 75215008957605c05e8cd375eac4f817, a519ba44ef3a85cf3c05e405c6ba8e53
  44 + //kids:d71f4b27f2a7229fbb31a4bc490a6f36,a7741b94e8bb9d56d0d36e00c05956f7
  45 + //lifestyle:8a341ca7eacc069ba80f02dec80eaf34,1b053fd044834f5c86d5eb15fb237af9
41 46
42 // 男首首页 47 // 男首首页
43 - const CODE_BOYS_CHANNEL = '79372627eee75d73afe7f9bac91e5ce6';//'c15bf0cbfbd4893fd70c869c991f6d3d'; 48 + const CODE_BOYS_CHANNEL = CODE_BOYS_CHANNEL_TMP;
44 // 女首首页 49 // 女首首页
45 - const CODE_GIRLS_CHANNEL = '75215008957605c05e8cd375eac4f817';//'a519ba44ef3a85cf3c05e405c6ba8e53'; 50 + const CODE_GIRLS_CHANNEL = CODE_GIRLS_CHANNEL_TMP;
46 51
47 // 潮童首页 52 // 潮童首页
48 - const CODE_KIDS_CHANNEL = 'd71f4b27f2a7229fbb31a4bc490a6f36';//'a7741b94e8bb9d56d0d36e00c05956f7'; 53 + const CODE_KIDS_CHANNEL = CODE_KIDS_CHANNEL_TMP;
49 54
50 // 创意生活新 55 // 创意生活新
51 - const CODE_LIFESTYLE_CHANNEL = '8a341ca7eacc069ba80f02dec80eaf34';//'8a341ca7eacc069ba80f02dec80eaf34'; 56 + const CODE_LIFESTYLE_CHANNEL = CODE_LIFESTYLE_CHANNEL_TMP;
52 57
53 // 创意生活 58 // 创意生活
54 const CODE_LIFESTYLE_CHANNEL_1 = '380c38155fd8beee10913a3f5b462da6'; 59 const CODE_LIFESTYLE_CHANNEL_1 = '380c38155fd8beee10913a3f5b462da6';
@@ -254,7 +259,7 @@ class HomeModel @@ -254,7 +259,7 @@ class HomeModel
254 { 259 {
255 $key = WebCacheConfig::KEY_WEB_HOME_CHANNEL_NEWARRIVAL_DATA . '_' . $channel; 260 $key = WebCacheConfig::KEY_WEB_HOME_CHANNEL_NEWARRIVAL_DATA . '_' . $channel;
256 //缓存数据 261 //缓存数据
257 - $result = '';//Cache::get($key); 262 + $result = Cache::get($key);
258 if (empty($result)) { 263 if (empty($result)) {
259 $params = array( 264 $params = array(
260 'order' => 's_t_desc', 265 'order' => 's_t_desc',
1 [memcached] 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  
4 -session.hosts=10.170.182.9:12111,10.172.169.31:12111,10.173.8.214:12111 2 +master.hosts=192.168.166.16:12111,192.168.166.17:12111,192.168.166.18:12111
  3 +slave.hosts=192.168.166.16:12112,192.168.166.17:12112,192.168.166.18:12112
  4 +session.hosts=192.168.166.16:12111,192.168.166.17:12111,192.168.166.18:12111
5 5
6 [redis] 6 [redis]
7 servers.hosts=127.0.0.1:6379 7 servers.hosts=127.0.0.1:6379