modify to close test env cache
Showing
3 changed files
with
33 additions
and
5 deletions
@@ -127,7 +127,6 @@ class Helpers | @@ -127,7 +127,6 @@ class Helpers | ||
127 | */ | 127 | */ |
128 | public static function formatProduct($productData, $showTags = true, $showNew = true, $showSale = true) | 128 | public static function formatProduct($productData, $showTags = true, $showNew = true, $showSale = true) |
129 | { | 129 | { |
130 | - | ||
131 | // 商品信息有问题,则不显示 | 130 | // 商品信息有问题,则不显示 |
132 | if (!isset($productData['product_skn']) || !isset($productData['goods_list'][0])) { | 131 | if (!isset($productData['product_skn']) || !isset($productData['goods_list'][0])) { |
133 | return false; | 132 | return false; |
@@ -146,7 +145,6 @@ class Helpers | @@ -146,7 +145,6 @@ class Helpers | ||
146 | $result = array(); | 145 | $result = array(); |
147 | $result['id'] = $productData['product_skn']; | 146 | $result['id'] = $productData['product_skn']; |
148 | $result['product_id'] = $productData['product_id']; | 147 | $result['product_id'] = $productData['product_id']; |
149 | - | ||
150 | $result['thumb'] = Images::getImageUrl($productData['default_images'], 235, 314); | 148 | $result['thumb'] = Images::getImageUrl($productData['default_images'], 235, 314); |
151 | $result['name'] = $productData['product_name']; | 149 | $result['name'] = $productData['product_name']; |
152 | $result['price'] = $productData['market_price']; | 150 | $result['price'] = $productData['market_price']; |
@@ -16,11 +16,41 @@ server | @@ -16,11 +16,41 @@ server | ||
16 | allow 172.16.0.0/16; | 16 | allow 172.16.0.0/16; |
17 | deny all; | 17 | deny all; |
18 | 18 | ||
19 | + # 子域名 | ||
20 | + if ($host = "sale.test.yoho.cn" ) { | ||
21 | + rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent; | ||
22 | + } | ||
23 | + if ($host = "cuxiao.test.yoho.cn" ) { | ||
24 | + rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent; | ||
25 | + } | ||
26 | + | ||
27 | + # 账号相关 | ||
28 | + location =/signin.html { | ||
29 | + rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent; | ||
30 | + } | ||
31 | + location /passport/auth { | ||
32 | + rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent; | ||
33 | + } | ||
34 | + location /passport/signin { | ||
35 | + rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent; | ||
36 | + } | ||
37 | + | ||
38 | + # 个人中心 | ||
39 | + location /home { | ||
40 | + rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent; | ||
41 | + } | ||
42 | + | ||
43 | + # 购物车 | ||
44 | + location /cart { | ||
45 | + rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent; | ||
46 | + } | ||
47 | + | ||
19 | location ~* \.html$ { | 48 | location ~* \.html$ { |
20 | root /Data/code/git/yohobuy/assets; | 49 | root /Data/code/git/yohobuy/assets; |
21 | - if (-f $request_filename){ | ||
22 | - expires 3m; | 50 | + if (!-f $request_filename){ |
51 | + rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent; | ||
23 | } | 52 | } |
53 | + expires 3m; | ||
24 | } | 54 | } |
25 | 55 | ||
26 | location ~* \.(ico|woff|svg|eot|ttf|otf)$ { | 56 | location ~* \.(ico|woff|svg|eot|ttf|otf)$ { |
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div class="search-page yoho-page"> | 2 | <div class="search-page yoho-page"> |
3 | {{# search}} | 3 | {{# search}} |
4 | <div id="search-input" class="search-input"> | 4 | <div id="search-input" class="search-input"> |
5 | - <form action="/product/list/index" method="get"> | 5 | + <form action="{{url}}" method="get"> |
6 | <i class="search-icon iconfont"></i> | 6 | <i class="search-icon iconfont"></i> |
7 | <input type="text" placeholder="搜索商品" name="query"> | 7 | <input type="text" placeholder="搜索商品" name="query"> |
8 | <i class="clear-input iconfont hide"></i> | 8 | <i class="clear-input iconfont hide"></i> |
-
Please register or login to post a comment