Authored by hf

fixes bug refs YW-790

@@ -47,7 +47,7 @@ class NewSaleProcess @@ -47,7 +47,7 @@ class NewSaleProcess
47 $productsLi = array(); 47 $productsLi = array();
48 if (isset($single['product_list'])) { 48 if (isset($single['product_list'])) {
49 foreach ($single['product_list'] as $value) { 49 foreach ($single['product_list'] as $value) {
50 - $productsLi['goods'][] = Helpers::formatProduct($value, true, false); 50 + $productsLi['goods'][] = Helpers::formatProduct($value, true, false, false);
51 } 51 }
52 } 52 }
53 53
@@ -43,9 +43,10 @@ class Helpers @@ -43,9 +43,10 @@ class Helpers
43 * @param array $productData 需要格式化的商品数据 43 * @param array $productData 需要格式化的商品数据
44 * @param bool $showTag 控制是否显示标签 44 * @param bool $showTag 控制是否显示标签
45 * @param bool $showNew 控制是否显示NEW图标 45 * @param bool $showNew 控制是否显示NEW图标
  46 + * @param bool $showSale 控制是否显示SALE图标
46 * @return array | false 47 * @return array | false
47 */ 48 */
48 - public static function formatProduct($productData, $showTags = true, $showNew = true) 49 + public static function formatProduct($productData, $showTags = true, $showNew = true, $showSale = true)
49 { 50 {
50 // 商品信息有问题,则不显示 51 // 商品信息有问题,则不显示
51 if (!isset($productData['product_skn'])) { 52 if (!isset($productData['product_skn'])) {
@@ -70,7 +71,7 @@ class Helpers @@ -70,7 +71,7 @@ class Helpers
70 if ($showTags) { 71 if ($showTags) {
71 $result['tags'] = array(); 72 $result['tags'] = array();
72 $result['tags']['is_new'] = $showNew && isset($productData['is_new']) && $productData['is_new'] === 'Y'; // 新品 73 $result['tags']['is_new'] = $showNew && isset($productData['is_new']) && $productData['is_new'] === 'Y'; // 新品
73 - $result['tags']['is_discount'] = isset($productData['is_discount']) && $productData['is_discount'] === 'Y'; // 在售 74 + $result['tags']['is_discount'] = $showSale && isset($productData['is_discount']) && $productData['is_discount'] === 'Y'; // 在售
74 $result['tags']['is_limited'] = isset($productData['is_limited']) && $productData['is_limited'] === 'Y'; // 限量 75 $result['tags']['is_limited'] = isset($productData['is_limited']) && $productData['is_limited'] === 'Y'; // 限量
75 $result['tags']['is_yohood'] = isset($productData['is_yohood']) && $productData['is_yohood'] === 'Y'; // YOHOOD 76 $result['tags']['is_yohood'] = isset($productData['is_yohood']) && $productData['is_yohood'] === 'Y'; // YOHOOD
76 $result['tags']['midYear'] = isset($productData['mid-year']) && $productData['mid-year'] === 'Y'; // 年中 77 $result['tags']['midYear'] = isset($productData['mid-year']) && $productData['mid-year'] === 'Y'; // 年中
1 server 1 server
2 { 2 {
3 listen 80; 3 listen 80;
4 - server_name buy.test.yoho.cn guang.buy.test.yoho.cn; 4 + server_name buy.test.yoho.cn;
5 5
6 #access_log /Data/logs/access.buy.test.yoho.cn.log combined; 6 #access_log /Data/logs/access.buy.test.yoho.cn.log combined;
7 error_log /Data/logs/error.buy.test.yoho.cn.log warn; 7 error_log /Data/logs/error.buy.test.yoho.cn.log warn;
@@ -13,6 +13,7 @@ server @@ -13,6 +13,7 @@ server
13 allow 218.94.75.50; 13 allow 218.94.75.50;
14 allow 218.94.75.58; 14 allow 218.94.75.58;
15 allow 123.56.138.21; 15 allow 123.56.138.21;
  16 + allow 172.16.0.0/16;
16 deny all; 17 deny all;
17 18
18 location ~* \.html$ { 19 location ~* \.html$ {
@@ -22,12 +23,17 @@ server @@ -22,12 +23,17 @@ server
22 } 23 }
23 } 24 }
24 25
25 - location ~* \.(ico|woff)$ {  
26 - expires 7d; 26 + location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
  27 + expires 30d;
27 } 28 }
28 -  
29 - location = /crossdomain.xml {  
30 - expires 7d; 29 + location =/crossdomain.xml {
  30 + expires 30d;
  31 + }
  32 + location =/sitemap.xml {
  33 + expires 1d;
  34 + }
  35 + location=/robots.txt {
  36 + expires 1d;
31 } 37 }
32 38
33 location / { 39 location / {
1 { 1 {
2 "name": "yohobuy", 2 "name": "yohobuy",
3 - "version": "0.0.1", 3 + "version": "0.0.2",
4 "description": "yohobuy statics", 4 "description": "yohobuy statics",
5 "keywords": [], 5 "keywords": [],
6 "homepage": "", 6 "homepage": "",
@@ -50,4 +50,4 @@ application.template.ext = ".phtml" @@ -50,4 +50,4 @@ application.template.ext = ".phtml"
50 application.assets.path = ROOT_PATH "/assets" 50 application.assets.path = ROOT_PATH "/assets"
51 51
52 ; 应用的版本号 52 ; 应用的版本号
53 -application.version = "0.0.1"  
  53 +application.version = "0.0.2"
@@ -50,4 +50,4 @@ application.template.ext = ".phtml" @@ -50,4 +50,4 @@ application.template.ext = ".phtml"
50 application.assets.path = ROOT_PATH "/assets" 50 application.assets.path = ROOT_PATH "/assets"
51 51
52 ; 应用的版本号 52 ; 应用的版本号
53 -application.version = "0.0.1"  
  53 +application.version = "0.0.2"
@@ -50,4 +50,4 @@ application.template.ext = ".phtml" @@ -50,4 +50,4 @@ application.template.ext = ".phtml"
50 application.assets.path = ROOT_PATH "/assets" 50 application.assets.path = ROOT_PATH "/assets"
51 51
52 ; 应用的版本号 52 ; 应用的版本号
53 -application.version = "0.0.1"  
  53 +application.version = "0.0.2"