Authored by 梁志锋

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

  1 +{
  2 + "arrivalTime": 1309514897,
  3 + "attribute": 1,
  4 + "auditingTime": 0,
  5 + "brand": {
  6 + "brandAlif": "R",
  7 + "brandBanner": "/2011/06/26/14/02d2214a0a7feb6112a8ebbd39de301192.jpg",
  8 + "brandCertificate": "",
  9 + "brandCss": "",
  10 + "brandDomain": "REVELATOR",
  11 + "brandGroupId": 0,
  12 + "brandIco": "http://img13.static.yhbimg.com/brandLogo/2011/06/26/14/020b083d91ebd1ff9a0600a8421fdbb388.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/90",
  13 + "brandInitials": "",
  14 + "brandKeyword": "REVELATOR",
  15 + "brandLevel": 1,
  16 + "brandName": "REVELATOR",
  17 + "brandNameCn": "",
  18 + "brandNameEn": "REVELATOR",
  19 + "brandOutline": "所有围绕在我们身边并且默默在对这个世界付出的人,都是我们所认知的启示者。",
  20 + "brandScale": 3,
  21 + "brandSign": "",
  22 + "brandStyle": "个性,潮流,嘻哈,街头,",
  23 + "brandTemplate": 1,
  24 + "brandTypeId": 3,
  25 + "brandUrl": "",
  26 + "hotKeyword": "REVELATOR",
  27 + "id": 119,
  28 + "isHot": "N",
  29 + "isIndependent": "N",
  30 + "orderBy": 0,
  31 + "parentId": 0,
  32 + "relateBrandIds": "",
  33 + "shelvesBrandTime": 0,
  34 + "staticContentCode": "",
  35 + "status": 0
  36 + },
  37 + "brandId": 119,
  38 + "categoryBoList": [
  39 + {
  40 + "categoryId": 1,
  41 + "categoryName": "上衣",
  42 + "isleaf": true,
  43 + "level": 1
  44 + },
  45 + {
  46 + "categoryId": 11,
  47 + "categoryName": "T恤",
  48 + "isleaf": true,
  49 + "level": 2
  50 + },
  51 + {
  52 + "categoryId": 114,
  53 + "categoryName": "T恤",
  54 + "isleaf": true,
  55 + "level": 3
  56 + }
  57 + ],
  58 + "cnAlphabet": "REVELATORTHERDuanXiuTXu",
  59 + "createTime": 1308726112,
  60 + "editTime": 0,
  61 + "erpProductId": 50004331,
  62 + "expectArrivalTime": 1309514897,
  63 + "firstShelveTime": 1309514897,
  64 + "folderId": 0,
  65 + "gender": "1",
  66 + "goodsList": [
  67 + {
  68 + "colorId": 1,
  69 + "colorImage": "http://img12.static.yhbimg.com/goodsimg/2012/03/02/14/02ea70da41df2d162fe1ec1c5d53367086.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/90",
  70 + "colorName": "白",
  71 + "factorySn": "",
  72 + "firstShelveTime": 1309514897,
  73 + "goodsImagesList": [
  74 + {
  75 + "angle": 0,
  76 + "genderCover": 0,
  77 + "goodsId": 3241,
  78 + "id": 131463,
  79 + "imageName": "",
  80 + "imageUrl": "http://img12.static.yhbimg.com/goodsimg/2012/03/02/14/02ea70da41df2d162fe1ec1c5d53367086.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/90",
  81 + "intro": 0,
  82 + "isDefault": "Y",
  83 + "orderBy": 1,
  84 + "productId": 2631,
  85 + "status": 1
  86 + },
  87 + {
  88 + "angle": 0,
  89 + "genderCover": 0,
  90 + "goodsId": 3241,
  91 + "id": 131462,
  92 + "imageName": "",
  93 + "imageUrl": "http://img13.static.yhbimg.com/goodsimg/2012/03/02/14/02df4081143c563f1d0ea8192a316f40fd.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/90",
  94 + "intro": 0,
  95 + "isDefault": "N",
  96 + "orderBy": 0,
  97 + "productId": 2631,
  98 + "status": 1
  99 + }
  100 + ],
  101 + "goodsName": "THE R TEE",
  102 + "goodsSizeBoList": [
  103 + {
  104 + "createTime": 0,
  105 + "goodsId": 3241,
  106 + "goodsSizeSkuId": 102000,
  107 + "goodsSizeStorageNum": 0,
  108 + "id": 203,
  109 + "orderBy": 1175,
  110 + "sizeName": "M",
  111 + "sortId": 0,
  112 + "updateTime": 0
  113 + },
  114 + {
  115 + "createTime": 0,
  116 + "goodsId": 3241,
  117 + "goodsSizeSkuId": 102001,
  118 + "goodsSizeStorageNum": 0,
  119 + "id": 201,
  120 + "orderBy": 1169,
  121 + "sizeName": "L",
  122 + "sortId": 0,
  123 + "updateTime": 0
  124 + }
  125 + ],
  126 + "id": 3241,
  127 + "isDefault": "N",
  128 + "isDown": "N",
  129 + "matchExplain": "",
  130 + "productId": 2631,
  131 + "productSkc": 3241,
  132 + "status": 1,
  133 + "viewNum": 0
  134 + }
  135 + ],
  136 + "id": 2631,
  137 + "isAdvance": "N",
  138 + "isAuditing": "Y",
  139 + "isDown": "N",
  140 + "isEdit": 1,
  141 + "isHot": "N",
  142 + "isJit": "N",
  143 + "isLimited": "N",
  144 + "isNew": "N",
  145 + "isOutlets": "N",
  146 + "isPromotion": 0,
  147 + "isRecommend": "N",
  148 + "isReplenishment": 0,
  149 + "isRetrieval": "N",
  150 + "isSales": "Y",
  151 + "isSpecial": "N",
  152 + "maxSortId": 1,
  153 + "middleSortId": 11,
  154 + "phrase": "以品牌字首R字母為设计重点,环绕式轮廓线营造渐层视觉 ",
  155 + "productName": "REVELATORTHER 短袖T恤",
  156 + "productPriceBo": {
  157 + "formatMarketPrice": "¥255.0",
  158 + "formatSalesPrice": "¥99.0",
  159 + "formatSpecialPrice": "¥99.0",
  160 + "marketPrice": 255,
  161 + "productId": 2631,
  162 + "salesPrice": 99,
  163 + "specialPrice": 99,
  164 + "vipPrice": "¥0.0",
  165 + "vipPrices": [
  166 + {
  167 + "vipLevel": 1,
  168 + "vipPrice": "¥94",
  169 + "vipTitle": "银卡"
  170 + },
  171 + {
  172 + "vipLevel": 2,
  173 + "vipPrice": "¥89",
  174 + "vipTitle": "金卡"
  175 + },
  176 + {
  177 + "vipLevel": 3,
  178 + "vipPrice": "¥87",
  179 + "vipTitle": "白金"
  180 + }
  181 + ]
  182 + },
  183 + "productTagBoList": [
  184 + {
  185 + "tagLabel": "is_discount",
  186 + "tagValue": "Y"
  187 + },
  188 + {
  189 + "tagLabel": "is_soon_sold_out",
  190 + "tagValue": "Y"
  191 + }
  192 + ],
  193 +
  194 + "promotionBoList": [
  195 + {
  196 + "promotionTitle": "【秋冬热促】满¥2188减¥800",
  197 + "promotionType": "满减"
  198 + },
  199 + {
  200 + "promotionTitle": "【秋冬热促】满¥1488减¥500",
  201 + "promotionType": "满减"
  202 + }
  203 + ],
  204 + "consultBoWrapper": {
  205 + "consultBoList": [
  206 + {
  207 + "answer": "您好,我们会联系品牌尽快补货,目前没有办法给您确切的答复,建议您进行到货通知的登记,补货到了,会第一时间短信联系您的。感谢您对yoho!有货的关注。",
  208 + "answerTime": "2012-05-02 15:10:08",
  209 + "ask": "请问 这件的灰色的L码还会不会补货?",
  210 + "askTime": "2012-05-02 14:23:09",
  211 + "id": 68252
  212 + }
  213 + ],
  214 + "consultTotal": 5
  215 + },
  216 +
  217 + "commentBoWrapper": {
  218 + "commentBoList": [
  219 + {
  220 + "productId": "您好,我们会联系品牌尽快补货,目前没有办法给您确切的答复,建议您进行到货通知的登记,补货到了,会第一时间短信联系您的。感谢您对yoho!有货的关注。",
  221 + "id": "2012-05-02 15:10:08",
  222 + "uid": "请问 这件的灰色的L码还会不会补货?",
  223 + "content": "2012-05-02 14:23:09",
  224 + "createTime": "2012-05-02 14:23:09",
  225 + "sizeName":"L",
  226 + "colorName":"red",
  227 + "nickName":"xieyong",
  228 + "headIcon":"http://dddd"
  229 + }
  230 + ],
  231 + "commentTotal": 5
  232 + }
  233 +
  234 + "productUrl": "http://m.yohobuy.com/product/pro_2631_3241/REVELATORTHERDuanXiuTXu.html",
  235 + "salableTime": "0",
  236 + "salesPhrase": "",
  237 + "seasons": "summer",
  238 + "sellChannels": "0",
  239 + "seriesId": 0,
  240 + "shelveTime": 1325135169,
  241 + "shopId": 0,
  242 + "smallSortId": 114,
  243 + "sortId": 0,
  244 + "status": 1,
  245 + "storage": 0,
  246 + "style": "",
  247 + "supplierId": 0,
  248 + "vipDiscountType": 1
  249 +}
  1 +{
  2 + "modelBos": [],
  3 + "null": false,
  4 + "productDescBo": {
  5 + "colorName": "灰色",
  6 + "erpProductId": "50002468",
  7 + "gender": 1,
  8 + "null": false,
  9 + "standardBos": []
  10 + },
  11 + "productExtra": {
  12 + "null": true
  13 + },
  14 + "productIntroBo": {
  15 + "productId": 10,
  16 + "productIntro": "<p>\r\n\t破壳小队长印花笔记本,夸张而卡通的设计,简单白皙的纸张,配有手缝带,味道十足。<br />\r\n\t<br />\r\n\t<br />\r\n\t<img src=\"http://img04.static.yohobuy.com/thumb/2011/06/23/04/02efe1bb1bc80d0ffd2911dc2f160c7974-0750x1500-1-goodsimg.jpg\" /><br />\r\n\t<br />\r\n\t<br />\r\n\t<img src=\"http://img04.static.yohobuy.com/thumb/2011/06/23/04/02b741288ddc8095598bbc7c487c8bc892-0750x1500-1-goodsimg.jpg\" /><br />\r\n\t<br />\r\n\t<br />\r\n\t<img src=\"http://img04.static.yohobuy.com/thumb/2011/06/23/04/028c47cc3002d40c42f35120007f13ff17-0750x1500-1-goodsimg.jpg\" /><br />\r\n\t<br />\r\n\t<br />\r\n\t<img src=\"http://img04.static.yohobuy.com/thumb/2011/06/23/04/026c9a61457a93c0473e4674f85344c8f0-0750x1500-1-goodsimg.jpg\" /><br />\r\n\t<br />\r\n\t<br />\r\n\t<img src=\"http://img04.static.yohobuy.com/thumb/2011/06/23/04/02da50cfde3d6cf203d8cb3df1eaa29353-0750x1500-1-goodsimg.jpg\" /><br />\r\n\t<br />\r\n\t&nbsp;</p>"
  17 + },
  18 + "productMaterialList": [],
  19 + "sizeImage": "http://static.yohobuy.com/images/1.jpg",
  20 + "sizeInfoBo": {
  21 + "sizeAttributeBos": [
  22 + {
  23 + "attributeName": "后衣长",
  24 + "id": 49
  25 + },
  26 + {
  27 + "attributeName": "前衣长",
  28 + "id": 48
  29 + },
  30 + {
  31 + "attributeName": "袖长",
  32 + "id": 5
  33 + },
  34 + {
  35 + "attributeName": "胸围",
  36 + "id": 4
  37 + },
  38 + {
  39 + "attributeName": "肩宽",
  40 + "id": 3
  41 + },
  42 + {
  43 + "attributeName": "后中长",
  44 + "id": 1
  45 + }
  46 + ],
  47 + "sizeBoList": [
  48 + {
  49 + "id": 201,
  50 + "sizeName": "L",
  51 + "sortAttributes": [
  52 + {
  53 + "id": 49,
  54 + "sizeValue": ""
  55 + },
  56 + {
  57 + "id": 48,
  58 + "sizeValue": ""
  59 + },
  60 + {
  61 + "id": 5,
  62 + "sizeValue": "64"
  63 + },
  64 + {
  65 + "id": 4,
  66 + "sizeValue": "108"
  67 + },
  68 + {
  69 + "id": 3,
  70 + "sizeValue": "49"
  71 + },
  72 + {
  73 + "id": 1,
  74 + "sizeValue": "67"
  75 + }
  76 + ]
  77 + },
  78 + {
  79 + "id": 203,
  80 + "sizeName": "M",
  81 + "sortAttributes": [
  82 + {
  83 + "id": 5,
  84 + "sizeValue": "62"
  85 + },
  86 + {
  87 + "id": 4,
  88 + "sizeValue": "102"
  89 + },
  90 + {
  91 + "id": 3,
  92 + "sizeValue": "46"
  93 + },
  94 + {
  95 + "id": 1,
  96 + "sizeValue": "64"
  97 + },
  98 + {
  99 + "id": 49,
  100 + "sizeValue": ""
  101 + },
  102 + {
  103 + "id": 48,
  104 + "sizeValue": ""
  105 + }
  106 + ]
  107 + }
  108 + ]
  109 + },
  110 + "washTipsBoList": [
  111 + {
  112 + "caption": "不可转笼翻转干燥",
  113 + "img": "http://static.yohobuy.com/images/wash_2.png"
  114 + },
  115 + {
  116 + "caption": "30度水温弱速洗",
  117 + "img": "http://static.yohobuy.com/images/wash_3.png"
  118 + },
  119 + {
  120 + "caption": "分色洗涤",
  121 + "img": "http://static.yohobuy.com/images/wash_7.png"
  122 + }
  123 + ]
  124 +}
framework @ 119c247f
1 -Subproject commit e9d066dd88a8e7e37103021c427a205a5cfcdcec 1 +Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
@@ -31,6 +31,7 @@ class Yohobuy @@ -31,6 +31,7 @@ class Yohobuy
31 const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL 31 const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL
32 const API_URL_PRODUCTDETAIL = 'http://172.16.6.145:8080/'; // 商品详情页 32 const API_URL_PRODUCTDETAIL = 'http://172.16.6.145:8080/'; // 商品详情页
33 33
  34 +
34 /** 35 /**
35 * 私钥列表 36 * 私钥列表
36 * 37 *
@@ -35,6 +35,10 @@ class CacheConfig @@ -35,6 +35,10 @@ class CacheConfig
35 const KEY_ACTION_SEARCH_SEARCH = 'key_action_search_search'; // 搜索的数据 35 const KEY_ACTION_SEARCH_SEARCH = 'key_action_search_search'; // 搜索的数据
36 const KEY_ACTION_SEARCH_FILTER = 'key_action_search_filter'; // 搜索的过滤条件 36 const KEY_ACTION_SEARCH_FILTER = 'key_action_search_filter'; // 搜索的过滤条件
37 37
  38 + const KEY_ACTION_HOME_GRADE = 'key_action_home_grade';//会员等级
  39 + const KEY_ACTION_HOME_PREFERENTIAL = 'key_action_home_preferential';//会员特权详情
  40 + const KEY_ACTION_HOME_ORDER_ORDER = 'key_action_home_order_order';//订单列表
  41 +
38 const KEY_ACTION_GUANG_PLUSSTAR_INDEX = 'key_action_guang_plusstar_index'; // 国际优选 42 const KEY_ACTION_GUANG_PLUSSTAR_INDEX = 'key_action_guang_plusstar_index'; // 国际优选
39 const KEY_ACTION_GUANG_PLUSSTAR_LIST = 'key_action_guang_plusstar_list'; // 明星原创 43 const KEY_ACTION_GUANG_PLUSSTAR_LIST = 'key_action_guang_plusstar_list'; // 明星原创
40 const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR 44 const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR
@@ -26,65 +26,394 @@ class DetailData @@ -26,65 +26,394 @@ class DetailData
26 * @param int $productId 26 * @param int $productId
27 * @return array 27 * @return array
28 */ 28 */
29 - public function product($productId) 29 + public static function baseInfo($productId, $uid)
30 { 30 {
31 - $result = array();  
32 31
33 - if (is_numeric($productId)) {  
34 - $result = Yohobuy::get(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_BASE_INFO, array('productId' => $productId) );  
35 - }  
36 -  
37 - return $result; 32 + $data = json_decode('{
  33 + "arrivalTime": 1309514897,
  34 + "attribute": 1,
  35 + "auditingTime": 0,
  36 + "brand": {
  37 + "brandAlif": "R",
  38 + "brandBanner": "/2011/06/26/14/02d2214a0a7feb6112a8ebbd39de301192.jpg",
  39 + "brandCertificate": "",
  40 + "brandCss": "",
  41 + "brandDomain": "REVELATOR",
  42 + "brandGroupId": 0,
  43 + "brandIco": "http://img13.static.yhbimg.com/brandLogo/2011/06/26/14/020b083d91ebd1ff9a0600a8421fdbb388.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/90",
  44 + "brandInitials": "",
  45 + "brandKeyword": "REVELATOR",
  46 + "brandLevel": 1,
  47 + "brandName": "REVELATOR",
  48 + "brandNameCn": "",
  49 + "brandNameEn": "REVELATOR",
  50 + "brandOutline": "所有围绕在我们身边并且默默在对这个世界付出的人,都是我们所认知的启示者。",
  51 + "brandScale": 3,
  52 + "brandSign": "",
  53 + "brandStyle": "个性,潮流,嘻哈,街头,",
  54 + "brandTemplate": 1,
  55 + "brandTypeId": 3,
  56 + "brandUrl": "",
  57 + "hotKeyword": "REVELATOR",
  58 + "id": 119,
  59 + "isHot": "N",
  60 + "isIndependent": "N",
  61 + "orderBy": 0,
  62 + "parentId": 0,
  63 + "relateBrandIds": "",
  64 + "shelvesBrandTime": 0,
  65 + "staticContentCode": "",
  66 + "status": 0
  67 + },
  68 + "brandId": 119,
  69 + "categoryBoList": [
  70 + {
  71 + "categoryId": 1,
  72 + "categoryName": "上衣",
  73 + "isleaf": true,
  74 + "level": 1
  75 + },
  76 + {
  77 + "categoryId": 11,
  78 + "categoryName": "T恤",
  79 + "isleaf": true,
  80 + "level": 2
  81 + },
  82 + {
  83 + "categoryId": 114,
  84 + "categoryName": "T恤",
  85 + "isleaf": true,
  86 + "level": 3
38 } 87 }
39 -  
40 - /**  
41 - * 商品小图  
42 - *  
43 - * @param int $goodsId  
44 - * @return array  
45 - */  
46 - public function goods($goodsId) 88 + ],
  89 + "cnAlphabet": "REVELATORTHERDuanXiuTXu",
  90 + "createTime": 1308726112,
  91 + "editTime": 0,
  92 + "erpProductId": 50004331,
  93 + "expectArrivalTime": 1309514897,
  94 + "firstShelveTime": 1309514897,
  95 + "folderId": 0,
  96 + "gender": "1",
  97 + "goodsList": [
47 { 98 {
48 - $result = array();  
49 -  
50 - if (is_numeric($goodsId)) {  
51 - $result = Yohobuy::get(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_GOODS_INFO, array('goodsId' => $goodsId) ); 99 + "colorId": 1,
  100 + "colorImage": "http://img12.static.yhbimg.com/goodsimg/2012/03/02/14/02ea70da41df2d162fe1ec1c5d53367086.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/90",
  101 + "colorName": "白",
  102 + "factorySn": "",
  103 + "firstShelveTime": 1309514897,
  104 + "goodsImagesList": [
  105 + {
  106 + "angle": 0,
  107 + "genderCover": 0,
  108 + "goodsId": 3241,
  109 + "id": 131463,
  110 + "imageName": "",
  111 + "imageUrl": "http://img12.static.yhbimg.com/goodsimg/2012/03/02/14/02ea70da41df2d162fe1ec1c5d53367086.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/90",
  112 + "intro": 0,
  113 + "isDefault": "Y",
  114 + "orderBy": 1,
  115 + "productId": 2631,
  116 + "status": 1
  117 + },
  118 + {
  119 + "angle": 0,
  120 + "genderCover": 0,
  121 + "goodsId": 3241,
  122 + "id": 131462,
  123 + "imageName": "",
  124 + "imageUrl": "http://img13.static.yhbimg.com/goodsimg/2012/03/02/14/02df4081143c563f1d0ea8192a316f40fd.jpg?imageMogr2/thumbnail/{width}x{height}/extent/{width}x{height}/background/d2hpdGU=/position/center/quality/90",
  125 + "intro": 0,
  126 + "isDefault": "N",
  127 + "orderBy": 0,
  128 + "productId": 2631,
  129 + "status": 1
52 } 130 }
53 -  
54 - return $result; 131 + ],
  132 + "goodsName": "THE R TEE",
  133 + "goodsSizeBoList": [
  134 + {
  135 + "createTime": 0,
  136 + "goodsId": 3241,
  137 + "goodsSizeSkuId": 102000,
  138 + "goodsSizeStorageNum": 0,
  139 + "id": 203,
  140 + "orderBy": 1175,
  141 + "sizeName": "M",
  142 + "sortId": 0,
  143 + "updateTime": 0
  144 + },
  145 + {
  146 + "createTime": 0,
  147 + "goodsId": 3241,
  148 + "goodsSizeSkuId": 102001,
  149 + "goodsSizeStorageNum": 0,
  150 + "id": 201,
  151 + "orderBy": 1169,
  152 + "sizeName": "L",
  153 + "sortId": 0,
  154 + "updateTime": 0
  155 + }
  156 + ],
  157 + "id": 3241,
  158 + "isDefault": "N",
  159 + "isDown": "N",
  160 + "matchExplain": "",
  161 + "productId": 2631,
  162 + "productSkc": 3241,
  163 + "status": 1,
  164 + "viewNum": 0
55 } 165 }
56 -  
57 - /**  
58 - * 品牌  
59 - *  
60 - * @param int $brandId  
61 - * @return array  
62 - */  
63 - public function brand($brandId) 166 + ],
  167 + "id": 2631,
  168 + "isAdvance": "N",
  169 + "isAuditing": "Y",
  170 + "isDown": "N",
  171 + "isEdit": 1,
  172 + "isHot": "N",
  173 + "isJit": "N",
  174 + "isLimited": "N",
  175 + "isNew": "N",
  176 + "isOutlets": "N",
  177 + "isPromotion": 0,
  178 + "isRecommend": "N",
  179 + "isReplenishment": 0,
  180 + "isRetrieval": "N",
  181 + "isSales": "Y",
  182 + "isSpecial": "N",
  183 + "isCollect": "N",
  184 + "maxSortId": 1,
  185 + "middleSortId": 11,
  186 + "phrase": "以品牌字首R字母為设计重点,环绕式轮廓线营造渐层视觉 ",
  187 + "productName": "REVELATORTHER 短袖T恤",
  188 + "productPriceBo": {
  189 + "formatMarketPrice": "¥255.0",
  190 + "formatSalesPrice": "¥99.0",
  191 + "formatSpecialPrice": "¥99.0",
  192 + "marketPrice": 255,
  193 + "productId": 2631,
  194 + "salesPrice": 99,
  195 + "specialPrice": 99,
  196 + "vipPrice": "¥0.0",
  197 + "vipPrices": [
  198 + {
  199 + "vipLevel": 1,
  200 + "vipPrice": "¥94",
  201 + "vipTitle": "银卡"
  202 + },
  203 + {
  204 + "vipLevel": 2,
  205 + "vipPrice": "¥89",
  206 + "vipTitle": "金卡"
  207 + },
  208 + {
  209 + "vipLevel": 3,
  210 + "vipPrice": "¥87",
  211 + "vipTitle": "白金"
  212 + }
  213 + ]
  214 + },
  215 + "productTagBoList": [
64 { 216 {
65 - 217 + "tagLabel": "is_discount",
  218 + "tagValue": "Y"
  219 + },
  220 + {
  221 + "tagLabel": "is_soon_sold_out",
  222 + "tagValue": "Y"
66 } 223 }
67 -  
68 - /**  
69 - * 库存  
70 - *  
71 - * @param int $productId  
72 - * @return int  
73 - */  
74 - public function storage($productId) 224 + ],
  225 + "promotionBoList": [
  226 + {
  227 + "promotionTitle": "【秋冬热促】满¥2188减¥800",
  228 + "promotionType": "满减"
  229 + },
75 { 230 {
  231 + "promotionTitle": "【秋冬热促】满¥1488减¥500",
  232 + "promotionType": "满减"
  233 + }
  234 + ],
  235 + "consultBoWrapper": {
  236 + "consultBoList": [
  237 + {
  238 + "answer": "您好,我们会联系品牌尽快补货,目前没有办法给您确切的答复,建议您进行到货通知的登记,补货到了,会第一时间短信联系您的。感谢您对yoho!有货的关注。",
  239 + "answerTime": "2012-05-02 15:10:08",
  240 + "ask": "请问 这件的灰色的L码还会不会补货?",
  241 + "askTime": "2012-05-02 14:23:09",
  242 + "id": 68252
  243 + }
  244 + ],
  245 + "consultTotal": 5
  246 + },
  247 + "commentBoWrapper": {
  248 + "commentBoList": [
  249 + {
  250 + "productId":"您好,我们会联系品牌尽快补货,目前没有办法给您确切的答复,建议您进行到货通知的登记,补货到了,会第一时间短信联系您的。感谢您对yoho!有货的关注。",
  251 + "id":"2012-05-02 15:10:08",
  252 + "uid":"请问 这件的灰色的L码还会不会补货?",
  253 + "content":"2012-05-02 14:23:09",
  254 + "createTime":"2012-05-02 14:23:09",
  255 + "sizeName":"L",
  256 + "colorName":"red",
  257 + "nickName":"xieyong",
  258 + "headIcon":"http://dddd"
  259 + }
  260 + ],
  261 + "commentTotal": 5
  262 + },
  263 + "productUrl":"http://m.yohobuy.com/product/pro_2631_3241/REVELATORTHERDuanXiuTXu.html",
  264 + "salableTime": "0",
  265 + "salesPhrase": "",
  266 + "seasons": "summer",
  267 + "sellChannels": "0",
  268 + "seriesId": 0,
  269 + "shelveTime": 1325135169,
  270 + "shopId": 0,
  271 + "smallSortId": 114,
  272 + "sortId": 0,
  273 + "status": 1,
  274 + "storage": 0,
  275 + "style": "",
  276 + "supplierId": 0,
  277 + "vipDiscountType": 1
  278 +}', true);
76 279
  280 + return $data;
77 } 281 }
78 282
79 /** 283 /**
80 - * 尺码 284 + * 商品尺码信息
81 * 285 *
82 * @param int $productSkn 286 * @param int $productSkn
83 * @return array 287 * @return array
84 */ 288 */
85 - public function size($productSkn) 289 + public static function sizeInfo($productSkn)
  290 + {
  291 + $data = json_decode('{
  292 + "modelBos": [],
  293 + "null": false,
  294 + "productDescBo": {
  295 + "colorName": "灰色",
  296 + "erpProductId": "50002468",
  297 + "gender": 1,
  298 + "null": false,
  299 + "standardBos": []
  300 + },
  301 + "productExtra": {
  302 + "null": true
  303 + },
  304 + "productIntroBo": {
  305 + "productId": 10,
  306 + "productIntro": "<p>\r\n\t破壳小队长印花笔记本,夸张而卡通的设计,简单白皙的纸张,配有手缝带,味道十足。<br />\r\n\t<br />\r\n\t<br />\r\n\t<img src=\"http://img04.static.yohobuy.com/thumb/2011/06/23/04/02efe1bb1bc80d0ffd2911dc2f160c7974-0750x1500-1-goodsimg.jpg\" /><br />\r\n\t<br />\r\n\t<br />\r\n\t<img src=\"http://img04.static.yohobuy.com/thumb/2011/06/23/04/02b741288ddc8095598bbc7c487c8bc892-0750x1500-1-goodsimg.jpg\" /><br />\r\n\t<br />\r\n\t<br />\r\n\t<img src=\"http://img04.static.yohobuy.com/thumb/2011/06/23/04/028c47cc3002d40c42f35120007f13ff17-0750x1500-1-goodsimg.jpg\" /><br />\r\n\t<br />\r\n\t<br />\r\n\t<img src=\"http://img04.static.yohobuy.com/thumb/2011/06/23/04/026c9a61457a93c0473e4674f85344c8f0-0750x1500-1-goodsimg.jpg\" /><br />\r\n\t<br />\r\n\t<br />\r\n\t<img src=\"http://img04.static.yohobuy.com/thumb/2011/06/23/04/02da50cfde3d6cf203d8cb3df1eaa29353-0750x1500-1-goodsimg.jpg\" /><br />\r\n\t<br />\r\n\t&nbsp;</p>"
  307 + },
  308 + "productMaterialList": [],
  309 + "sizeImage": "http://static.yohobuy.com/images/1.jpg",
  310 + "sizeInfoBo": {
  311 + "sizeAttributeBos": [
  312 + {
  313 + "attributeName": "后衣长",
  314 + "id": 49
  315 + },
  316 + {
  317 + "attributeName": "前衣长",
  318 + "id": 48
  319 + },
  320 + {
  321 + "attributeName": "袖长",
  322 + "id": 5
  323 + },
  324 + {
  325 + "attributeName": "胸围",
  326 + "id": 4
  327 + },
  328 + {
  329 + "attributeName": "肩宽",
  330 + "id": 3
  331 + },
  332 + {
  333 + "attributeName": "后中长",
  334 + "id": 1
  335 + }
  336 + ],
  337 + "sizeBoList": [
  338 + {
  339 + "id": 201,
  340 + "sizeName": "L",
  341 + "sortAttributes": [
  342 + {
  343 + "id": 49,
  344 + "sizeValue": ""
  345 + },
  346 + {
  347 + "id": 48,
  348 + "sizeValue": ""
  349 + },
  350 + {
  351 + "id": 5,
  352 + "sizeValue": "64"
  353 + },
  354 + {
  355 + "id": 4,
  356 + "sizeValue": "108"
  357 + },
  358 + {
  359 + "id": 3,
  360 + "sizeValue": "49"
  361 + },
  362 + {
  363 + "id": 1,
  364 + "sizeValue": "67"
  365 + }
  366 + ]
  367 + },
  368 + {
  369 + "id": 203,
  370 + "sizeName": "M",
  371 + "sortAttributes": [
  372 + {
  373 + "id": 5,
  374 + "sizeValue": "62"
  375 + },
  376 + {
  377 + "id": 4,
  378 + "sizeValue": "102"
  379 + },
  380 + {
  381 + "id": 3,
  382 + "sizeValue": "46"
  383 + },
  384 + {
  385 + "id": 1,
  386 + "sizeValue": "64"
  387 + },
  388 + {
  389 + "id": 49,
  390 + "sizeValue": ""
  391 + },
  392 + {
  393 + "id": 48,
  394 + "sizeValue": ""
  395 + }
  396 + ]
  397 + }
  398 + ]
  399 + },
  400 + "washTipsBoList": [
86 { 401 {
  402 + "caption": "不可转笼翻转干燥",
  403 + "img": "http://static.yohobuy.com/images/wash_2.png"
  404 + },
  405 + {
  406 + "caption": "30度水温弱速洗",
  407 + "img": "http://static.yohobuy.com/images/wash_3.png"
  408 + },
  409 + {
  410 + "caption": "分色洗涤",
  411 + "img": "http://static.yohobuy.com/images/wash_7.png"
  412 + }
  413 + ]
  414 +}', true);
87 415
  416 + return $data;
88 } 417 }
89 418
90 } 419 }
  1 +/*
  2 + * @Description: dialog
  3 + * @Time: 2015/11/18
  4 + * @author: chenglong.wang
  5 + */
  6 +
  7 +var $ = require('jquery'),
  8 + Handlebars = require('yoho.handlebars'),
  9 + Hammer = require('yoho.hammer');
  10 +
  11 +var dialogTpl,
  12 + dialogTemplate;
  13 +
  14 +
  15 +dialogTpl = '<div id="dialog-wrapper" class="dialog-wrapper">' +
  16 + '<div class="dialog-box">' +
  17 + '{{# hasHeader}}' +
  18 + '{{/ hasHeader}}' +
  19 + '<div class="dialog-content">{{dialogText}}</div>' +
  20 + '{{# hasFooter}}' +
  21 + '<div class="dialog-footer">' +
  22 + '{{# leftBtnText}}' +
  23 + '<span class="dialog-left-btn">{{.}}</span>' +
  24 + '{{/ leftBtnText}}' +
  25 + '{{# rightBtnText}}' +
  26 + '<span class="dialog-right-btn">{{.}}</span>' +
  27 + '{{/ rightBtnText}}' +
  28 + '</div>' +
  29 + '{{/ hasFooter}}' +
  30 + '</div>' +
  31 + '</div>';
  32 +
  33 +dialogTemplate = Handlebars.compile(dialogTpl);
  34 +
  35 +exports.showDialog = function(data, callback) {
  36 +
  37 + var dialogStr = dialogTemplate(data),
  38 + $dialogBox,
  39 + $dialogWrapper,
  40 + dialogWrapperHammer;
  41 +
  42 + $('.dialog-wrapper').remove();
  43 +
  44 + $('body').append($(dialogStr));
  45 +
  46 + $dialogBox = $('.dialog-box');
  47 + $dialogWrapper = $('.dialog-wrapper');
  48 + dialogWrapperHammer = new Hammer(document.getElementById('dialog-wrapper'));
  49 +
  50 + // 显示
  51 + if (data.fast) {
  52 + $dialogWrapper.css({
  53 + display: 'block'
  54 + });
  55 + } else {
  56 + $dialogWrapper.fadeIn();
  57 + }
  58 +
  59 + $dialogBox.css({
  60 + top: '50%',
  61 + marginTop: -($dialogBox.height() / 2)
  62 + });
  63 +
  64 + //隐藏
  65 + if (data.autoHide) {
  66 + setTimeout(function() {
  67 + $dialogWrapper.fadeOut();
  68 + }, 1000);
  69 + }
  70 +
  71 + dialogWrapperHammer.on('tap', function(event) {
  72 +
  73 + if ($(event.target).hasClass('dialog-left-btn')) {
  74 + $dialogWrapper.fadeOut();
  75 + } else if ($(event.target).hasClass('dialog-right-btn')) {
  76 + callback();
  77 + }
  78 + });
  79 +
  80 +};
@@ -8,32 +8,24 @@ var $ = require('jquery'), @@ -8,32 +8,24 @@ var $ = require('jquery'),
8 Hammer = require('yoho.hammer'), 8 Hammer = require('yoho.hammer'),
9 Swiper = require('yoho.iswiper'); 9 Swiper = require('yoho.iswiper');
10 10
  11 +var diaLog = require('./dialog');
  12 +
11 var $navLi = $('#fav-tab > li'), 13 var $navLi = $('#fav-tab > li'),
12 - $favContainer = $('.fav-content'),  
13 - $curContainer = $favContainer.children('.fav-type').first(), 14 + $favContainer = $('.fav-content > .fav-type'),
14 $swiperList = $('.swiper-container'), 15 $swiperList = $('.swiper-container'),
15 swiperObj = {}, 16 swiperObj = {},
16 favTabHammer, 17 favTabHammer,
17 favContentHammer; 18 favContentHammer;
18 19
19 -favTabHammer = new Hammer(document.getElementById('fav-tab'));  
20 -favTabHammer.on('tap', function(e) {  
21 - var $cur = $(e.target).closest('li'),  
22 - index,  
23 - id,  
24 - i;  
25 -  
26 - if ($cur.length === 0 || $cur.hasClass('active')) {  
27 - return;  
28 - }  
29 -  
30 - index = $cur.index(); 20 +function showFavTab(index) {
  21 + var i,
  22 + id;
31 23
32 $navLi.filter('.active').removeClass('active'); 24 $navLi.filter('.active').removeClass('active');
33 - $cur.addClass('active'); 25 + $navLi.eq(index).addClass('active');
34 26
35 - $curContainer.addClass('hide');  
36 - $curContainer = $favContainer.children(':eq(' + index + ')').removeClass('hide'); 27 + $favContainer.filter('.show').removeClass('show');
  28 + $favContainer.eq(index).addClass('show');
37 29
38 if (index === 1) { 30 if (index === 1) {
39 31
@@ -51,16 +43,46 @@ favTabHammer.on('tap', function(e) { @@ -51,16 +43,46 @@ favTabHammer.on('tap', function(e) {
51 } 43 }
52 44
53 } 45 }
  46 +}
  47 +
  48 +// 如果从品牌收藏入口进入
  49 +if ($('#fav-tab').hasClass('brand-tab')) {
  50 + showFavTab(1);
  51 +} else {
  52 + showFavTab(0);
  53 +}
  54 +
  55 +favTabHammer = new Hammer(document.getElementById('fav-tab'));
  56 +favTabHammer.on('tap', function(e) {
  57 + var $cur = $(e.target).closest('li'),
  58 + index;
  59 +
  60 + if ($cur.length === 0 || $cur.hasClass('active')) {
  61 + return;
  62 + }
  63 +
  64 + index = $cur.index();
  65 + showFavTab(index);
  66 +
54 }); 67 });
55 68
56 //删除收藏的商品 69 //删除收藏的商品
57 favContentHammer = new Hammer(document.getElementById('fav-content')); 70 favContentHammer = new Hammer(document.getElementById('fav-content'));
58 71
59 -favContentHammer.on('tap', function (e) { 72 +favContentHammer.on('tap', function(e) {
60 var id = ''; 73 var id = '';
61 74
  75 + if (!$(e.target).hasClass('del-fav')) {
  76 + return;
  77 + }
62 78
63 - if ($(e.target).hasClass('del-fav')) { 79 + diaLog.showDialog({
  80 + dialogText: '您确定要取消收藏吗?',
  81 + hasFooter: {
  82 + leftBtnText: '取消',
  83 + rightBtnText: '确定'
  84 + }
  85 + }, function() {
64 id = $(e.target).closest('li').attr('data-id'); 86 id = $(e.target).closest('li').attr('data-id');
65 $.ajax({ 87 $.ajax({
66 method: 'post', 88 method: 'post',
@@ -68,15 +90,31 @@ favContentHammer.on('tap', function (e) { @@ -68,15 +90,31 @@ favContentHammer.on('tap', function (e) {
68 data: { 90 data: {
69 id: id 91 id: id
70 } 92 }
71 - }).then(function (data) {  
72 - 93 + }).then(function(data) {
73 94
74 if (data.code === 200) { 95 if (data.code === 200) {
  96 + diaLog.showDialog({
  97 + autoHide: true,
  98 + fast: true,
  99 + dialogText: '已经取消收藏'
  100 + });
75 $(e.target).closest('li').remove(); 101 $(e.target).closest('li').remove();
  102 + } else if (data.code === 400) {
  103 + diaLog.showDialog({
  104 + autoHide: true,
  105 + fast: true,
  106 + dialogText: data.message
  107 + });
  108 + } else {
  109 + diaLog.showDialog({
  110 + autoHide: true,
  111 + fast: true,
  112 + dialogText: '取消收藏失败'
  113 + });
76 } 114 }
77 - }).fail(function () { 115 + }).fail(function() {
78 116
79 //TODO 117 //TODO
80 }); 118 });
81 - } 119 + });
82 }); 120 });
@@ -9,13 +9,23 @@ var $ = require('jquery'), @@ -9,13 +9,23 @@ var $ = require('jquery'),
9 Hammer = require('yoho.hammer'), 9 Hammer = require('yoho.hammer'),
10 Handlebars = require('yoho.handlebars'); 10 Handlebars = require('yoho.handlebars');
11 11
  12 +var diaLog = require('./dialog');
  13 +
12 var $uploadImgList = $('.upload-img-list'), 14 var $uploadImgList = $('.upload-img-list'),
13 headerNavHammer, 15 headerNavHammer,
14 imgTpl, 16 imgTpl,
15 - template; 17 + imgTemplate,
  18 + $likeBtn = $('.suggest-item .like-btn'),
  19 + $disLikeBtn = $('.suggest-item .dislike-btn');
16 20
17 require('./jquery.uploadifive'); 21 require('./jquery.uploadifive');
18 22
  23 +imgTpl = '{{# imgList}}' +
  24 + '<li><img src="{{imgUrl}}" /></li>' +
  25 + '{{/ imgList}}';
  26 +
  27 +imgTemplate = Handlebars.compile(imgTpl);
  28 +
19 $('#upload-img').uploadifive({ 29 $('#upload-img').uploadifive({
20 auto: true, 30 auto: true,
21 fileType: 'image*/*', 31 fileType: 'image*/*',
@@ -24,25 +34,19 @@ $('#upload-img').uploadifive({ @@ -24,25 +34,19 @@ $('#upload-img').uploadifive({
24 fileSizeLimit: 1024, 34 fileSizeLimit: 1024,
25 height: '100%', 35 height: '100%',
26 width: '100%', 36 width: '100%',
27 - onAddQueueItem: function (files) { 37 +
  38 + onAddQueueItem: function(files) {
28 39
29 //TODO 40 //TODO
30 }, 41 },
31 - onUploadComplete: function (file, data) {  
32 - $uploadImgList.html(template(data)); 42 + onUploadComplete: function(file, data) {
  43 + $uploadImgList.html(imgTemplate(JSON.parse(data)));
33 } 44 }
34 }); 45 });
35 46
36 -  
37 -imgTpl = '{{# imgList}}' +  
38 - '<li><img src="{{imgUrl}}" /></li>' +  
39 - '{{/ imgList}}';  
40 -  
41 -template = Handlebars.compile(imgTpl);  
42 -  
43 headerNavHammer = new Hammer(document.getElementById('yoho-header')); 47 headerNavHammer = new Hammer(document.getElementById('yoho-header'));
44 48
45 -headerNavHammer.on('tap', function (e) { 49 +headerNavHammer.on('tap', function(e) {
46 var suggestText = $('#suggest-textarea').val(); 50 var suggestText = $('#suggest-textarea').val();
47 51
48 52
@@ -54,12 +58,65 @@ headerNavHammer.on('tap', function (e) { @@ -54,12 +58,65 @@ headerNavHammer.on('tap', function (e) {
54 data: { 58 data: {
55 content: suggestText 59 content: suggestText
56 } 60 }
57 - }).then(function (data) {  
58 -  
59 - //TODO  
60 - }).fail(function () { 61 + }).then(function(data) {
  62 + if (data.code === 200) {
  63 + diaLog.showDialog({
  64 + autoHide: true,
  65 + dialogText: '提交成功'
  66 + });
  67 + }
  68 + }).fail(function() {
61 69
62 //TODO 70 //TODO
63 }); 71 });
64 } 72 }
  73 +});
  74 +
  75 +// 点赞与取消点赞
  76 +// suggestContentHammer = new Hammer(document.getElementById('suggest-content'));
  77 +
  78 +$likeBtn.bind('click', function() {
  79 + var id = $(this).closest('.suggest-item').attr('data-id'),
  80 + $that = $(this);
  81 +
  82 + $.ajax({
  83 + method: 'post',
  84 + url: '/home/upAndDown',
  85 + data: {
  86 + suggest_id: id
  87 + }
  88 + }).then(function(data) {
  89 + if (data.code === 200) {
  90 + if ($that.hasClass('active')) {
  91 + $that.closest('.suggest-type').removeClass('active')
  92 + .prev('.suggest-type').addClass('active');
  93 + } else {
  94 + $that.closest('.suggest-type').addClass('active')
  95 + .next('.suggest-type').removeClass('active');
  96 + }
  97 + }
  98 + }).fail(function(data) {
  99 +
  100 + //TODO
  101 + });
  102 +});
  103 +
  104 +$disLikeBtn.bind('click', function() {
  105 + var id = $(this).closest('.suggest-item').attr('data-id'),
  106 + $that = $(this);
  107 +
  108 + $.ajax({
  109 + method: 'post',
  110 + url: '/home/upAndDown',
  111 + data: {
  112 + suggest_id: id
  113 + }
  114 + }).then(function(data) {
  115 + if (data.code === 200) {
  116 + $that.toggleClass('active');
  117 + }
  118 + }).fail(function(data) {
  119 +
  120 + //TODO
  121 + });
65 }); 122 });
@@ -63,9 +63,6 @@ a { @@ -63,9 +63,6 @@ a {
63 .hide { 63 .hide {
64 display: none; 64 display: none;
65 } 65 }
66 -#show {  
67 - display: block;  
68 -}  
69 66
70 .overflow-hidden { 67 .overflow-hidden {
71 overflow: hidden; 68 overflow: hidden;
@@ -43,6 +43,13 @@ @@ -43,6 +43,13 @@
43 .fav-content { 43 .fav-content {
44 //padding: 0 pxToRem(30px); 44 //padding: 0 pxToRem(30px);
45 45
  46 + .fav-type {
  47 + display: none;
  48 + }
  49 + .show {
  50 + display: block;
  51 + }
  52 +
46 .fav-null { 53 .fav-null {
47 font-size: pxToRem(22px); 54 font-size: pxToRem(22px);
48 color: #444; 55 color: #444;
@@ -74,26 +74,26 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); @@ -74,26 +74,26 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px);
74 padding-left: pxToRem(128px); 74 padding-left: pxToRem(128px);
75 @include box-sizing(); 75 @include box-sizing();
76 76
77 - &.active {  
78 - color: #444; 77 + &:nth-last-of-type(1) {
  78 + padding-left: pxToRem(0);
  79 + padding-right: pxToRem(128px);
  80 + text-align: right;
  81 + float: right;
79 82
80 > span { 83 > span {
  84 +
81 display: inline-block; 85 display: inline-block;
82 height: 100%; 86 height: 100%;
83 overflow: hidden; 87 overflow: hidden;
84 88
85 &:nth-of-type(1) { 89 &:nth-of-type(1) {
86 @include rotate(180deg); 90 @include rotate(180deg);
87 - @include transition(transform .5);  
88 } 91 }
89 } 92 }
90 } 93 }
91 94
92 - &:nth-last-of-type(1) {  
93 - padding-left: pxToRem(0);  
94 - padding-right: pxToRem(128px);  
95 - text-align: right;  
96 - float: right; 95 + &.active {
  96 + color: #444;
97 } 97 }
98 } 98 }
99 99
@@ -101,6 +101,9 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); @@ -101,6 +101,9 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px);
101 text-align: center; 101 text-align: center;
102 color: #444; 102 color: #444;
103 } 103 }
  104 + &.show {
  105 + display: block;
  106 + }
104 } 107 }
105 } 108 }
106 } 109 }
@@ -219,4 +222,50 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px); @@ -219,4 +222,50 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px);
219 } 222 }
220 } 223 }
221 } 224 }
  225 +}
  226 +
  227 +//dialog
  228 +.dialog-wrapper {
  229 + background: hsla(0, 0%, 0%, .5);
  230 + position: fixed;
  231 + top: 0;
  232 + right: 0;
  233 + bottom: 0;
  234 + left: 0;
  235 + display: none;
  236 +
  237 + .dialog-box {
  238 + width: pxToRem(540px);
  239 + @include border-radius(pxToRem(20px));
  240 + background: hsla(100, 100%, 100%, .8);
  241 + position: absolute;
  242 + left: 50%;
  243 + margin-left: pxToRem(-540px)/2;
  244 + font-size: pxToRem(30px);
  245 + text-align: center;
  246 + color: #000;
  247 + }
  248 +
  249 + .dialog-content {
  250 + padding: pxToRem(60px) pxToRem(30px);
  251 + }
  252 +
  253 + .dialog-footer {
  254 + border-top: 1px solid #ccc;
  255 + height: pxToRem(88px);
  256 + line-height: pxToRem(88px);
  257 +
  258 + > span {
  259 + display: block;
  260 + width: 50%;
  261 + height: 100%;
  262 + float: left;
  263 + @include box-sizing();
  264 +
  265 + &:nth-last-of-type(1) {
  266 + border-left: 1px solid #ccc;
  267 + color: #ee0011;
  268 + }
  269 + }
  270 + }
222 } 271 }
1 {{> layout/header}} 1 {{> layout/header}}
2 <div class="yoho-favorite-page yoho-page"> 2 <div class="yoho-favorite-page yoho-page">
3 {{# favorite}} 3 {{# favorite}}
4 - <ul id="fav-tab" class="fav-tab">  
5 - <li class="active">收藏的商品</li> 4 + <ul id="fav-tab" class="fav-tab {{# brandTab}}brand-tab{{/ brandTab}}">
  5 + <li>收藏的商品</li>
6 <li>收藏的品牌</li> 6 <li>收藏的品牌</li>
7 </ul> 7 </ul>
8 <div class="fav-content" id="fav-content"> 8 <div class="fav-content" id="fav-content">
@@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
48 <a class="go-shopping" href="#">随便逛逛</a> 48 <a class="go-shopping" href="#">随便逛逛</a>
49 {{/ hasFavProduct}} 49 {{/ hasFavProduct}}
50 </div> 50 </div>
51 - <div class="fav-type hide"> 51 + <div class="fav-type">
52 {{# hasFavBrand}} 52 {{# hasFavBrand}}
53 <div class="fav-brand-swiper"> 53 <div class="fav-brand-swiper">
54 <div class="swiper-header"> 54 <div class="swiper-header">
@@ -8,25 +8,23 @@ @@ -8,25 +8,23 @@
8 8
9 <div class="suggest-content" id="suggest-content"> 9 <div class="suggest-content" id="suggest-content">
10 {{# suggestContent}} 10 {{# suggestContent}}
11 - <div class="suggest-item"> 11 + <div class="suggest-item" data-id="{{suggest_id}}">
12 <img src="{{imgUrl}}" alt=""/> 12 <img src="{{imgUrl}}" alt=""/>
13 <h2>{{title}}</h2> 13 <h2>{{title}}</h2>
14 <p>{{content}}</p> 14 <p>{{content}}</p>
15 15
16 - <!--bad传true表示点了不靠谱,false表示没有任何动作-->  
17 - <!--good传true表示点了靠谱,false表示没有任何动作-->  
18 - <div id="{{^ good}}show{{/ good}}" class="suggest-type">  
19 - <div> 16 + <div class="suggest-type {{^ good}}show{{/ good}}">
  17 + <div class="like-btn">
20 <span class="iconfont">&#xe601;</span> 18 <span class="iconfont">&#xe601;</span>
21 <span>靠谱</span> 19 <span>靠谱</span>
22 </div> 20 </div>
23 - <div class="{{# bad}}active{{/ bad}}"> 21 + <div class="dislike-btn {{# bad}}active{{/ bad}}">
24 <span class="iconfont">&#xe601;</span> 22 <span class="iconfont">&#xe601;</span>
25 <span>不靠谱</span> 23 <span>不靠谱</span>
26 </div> 24 </div>
27 </div> 25 </div>
28 26
29 - <div id="{{# good}}show{{/ good}}" class="suggest-type active"> 27 + <div class="like-btn active suggest-type {{# good}}show{{/ good}}">
30 <span class="iconfont">&#xe601;</span> 28 <span class="iconfont">&#xe601;</span>
31 <span>靠谱,谢谢您的反馈</span> 29 <span>靠谱,谢谢您的反馈</span>
32 </div> 30 </div>
  1 +<?php
  2 +
  3 +namespace Product;
  4 +
  5 +use LibModels\Wap\Product\DetailData;
  6 +use Plugin\Helpers;
  7 +
  8 +/**
  9 + * 商品详情页模板相关的数据模型
  10 + *
  11 + * @name DetailModel
  12 + * @package Product
  13 + * @copyright yoho.inc
  14 + * @version 1.0 (2015-11-19 10:49:36)
  15 + * @author fei.hong <fei.hong@yoho.cn>
  16 + */
  17 +class DetailModel
  18 +{
  19 +
  20 + /**
  21 + * 商品基本信息
  22 + *
  23 + * @param int $productId 商品ID
  24 + * @param int $goodsId 某个颜色的商品
  25 + * @param int $uid 当前登录用户ID, 未登录为0
  26 + * @return array
  27 + */
  28 + public static function getBaseInfo($productId, $goodsId, $uid)
  29 + {
  30 + $result = array();
  31 +
  32 + if (is_numeric($productId) && is_numeric($goodsId)) {
  33 + // 调用接口
  34 + $baseInfo = DetailData::baseInfo($productId, $uid);
  35 +
  36 + // 商品名称
  37 + if (isset($baseInfo['productName'])) {
  38 + $result['goodsName'] = $baseInfo['productName'];
  39 + }
  40 +
  41 + // 商品价格
  42 + if (isset($baseInfo['productPriceBo'])) {
  43 + $result['goodsPrice'] = array();
  44 + $result['goodsPrice']['currentPrice'] = $baseInfo['productPriceBo']['formatSalesPrice'];
  45 + if ($baseInfo['productPriceBo']['formatMarketPrice'] !== $baseInfo['productPriceBo']['formatSalesPrice']) {
  46 + $result['goodsPrice']['previousPrice'] = $baseInfo['productPriceBo']['formatMarketPrice'];
  47 + }
  48 + }
  49 + // VIP商品价格
  50 + if (isset($baseInfo['productPriceBo']['vipPrices'])) {
  51 + $build = array();
  52 + foreach ($baseInfo['productPriceBo']['vipPrices'] as $value) {
  53 + $build['level'] = $value['vipLevel'];
  54 + $build['text'] = $value['vipPrice'];
  55 + $result['vipLevel']['list'][] = $build;
  56 + }
  57 + }
  58 +
  59 + // 上市期
  60 + if (isset($baseInfo['expectArrivalTime'])) {
  61 + $result['periodOfMarket'] = date('n', $baseInfo['firstShelveTime']) . '月';
  62 + }
  63 +
  64 + // 促销信息
  65 + if (isset($baseInfo['promotionBoList'])) {
  66 + $build = array();
  67 + foreach ($baseInfo['promotionBoList'] as $value) {
  68 + $build['title'] = $value['promotionTitle'];
  69 + $build['type'] = $value['promotionType'];
  70 + $result['goodsDiscount']['list'][] = $build;
  71 + }
  72 + }
  73 +
  74 + // 商品咨询和商品评价
  75 + $result['feedbacks'] = array();
  76 + if (!empty($baseInfo['consultBoWrapper'])) {
  77 + $result['feedbacks']['consultNum'] = $baseInfo['consultBoWrapper']['consultTotal'];
  78 + $result['feedbacks']['consults'] = array();
  79 + $build = array();
  80 + foreach ($baseInfo['consultBoWrapper']['consultBoList'] as $value) {
  81 + $build['question'] = $value['ask'];
  82 + $build['time'] = $value['askTime'];
  83 + $build['answer'] = $value['answer'];
  84 + $result['feedbacks']['consults'][] = $build;
  85 + }
  86 + }
  87 + if (!empty($baseInfo['commentBoWrapper'])) {
  88 + $result['feedbacks']['commentNum'] = $baseInfo['commentBoWrapper']['commentTotal'];
  89 + $result['feedbacks']['comments'] = array();
  90 + $build = array();
  91 + foreach ($baseInfo['commentBoWrapper']['commentBoList'] as $value) {
  92 + $build['userName'] = $value['nickName'];
  93 + $build['desc'] = $value['colorName'] . $value['sizeName'];
  94 + $build['content'] = $value['content'];
  95 + $build['time'] = $value['createTime'];
  96 + $result['feedbacks']['comments'][] = $build;
  97 + }
  98 + }
  99 +
  100 + // 品牌信息
  101 + if (!empty($baseInfo['brand'])) {
  102 + $result['enterStore'] = array(
  103 + 'img' => Helpers::getImageUrl($baseInfo['brand']['brandIco'], 47, 47),
  104 + 'storeName' => $baseInfo['brand']['brandName'],
  105 + 'url' => Helpers::url('', array(), $baseInfo['brand']['brandDomain'])
  106 + );
  107 + }
  108 +
  109 + // 商品信息
  110 + if (!empty($baseInfo['goodsList'])) {
  111 + $colorGroup = array();
  112 + $sizeGroup = array();
  113 + $goodsList = array();
  114 + $goodsGroup = array();
  115 + $colorId = 0;
  116 + foreach ($baseInfo['goodsList'] as $value) {
  117 + $colorId = intval($value['colorId']);
  118 + // 商品按颜色进行分类分组
  119 + foreach ($value['goodsImagesList'] as $goods) {
  120 + $goodsList[ $goods['goodsId'] ] = $colorId;
  121 + $goodsGroup[$colorId][] = array(
  122 + 'goodsId' => $goods['goodsId'],
  123 + 'img' => $goods['imageUrl'],
  124 + );
  125 + $colorGroup[$colorId] = array(
  126 + 'colorId' => $colorId,
  127 + 'colorName' => $value['colorName'],
  128 + 'colorImage' => Helpers::getImageUrl($value['colorImage'], 60, 60),
  129 + );
  130 + }
  131 + // 商品的尺码列表
  132 + foreach ($value['goodsSizeBoList'] as $size) {
  133 + $sizeGroup[ $colorId ] = array(
  134 + 'sizeName' => $size['sizeName'],
  135 + 'sizeSku' => $size['goodsSizeSkuId'],
  136 + 'sizeStorage' => $size['goodsSizeStorageNum'],
  137 + );
  138 + }
  139 + }
  140 +
  141 + // 商品图
  142 + $goodsId = intval($goodsId);
  143 + if (isset($goodsList[$goodsId])) {
  144 + $colorId = $goodsList[$goodsId];
  145 + // 多个
  146 + if (isset($goodsGroup[$colorId][1])) {
  147 + foreach ($goodsGroup[$colorId] as $value) {
  148 + $result['bannerTop']['list'][] = array(
  149 + 'img' => Helpers::getImageUrl($value['img'], 450, 600)
  150 + );
  151 + }
  152 + }
  153 + // 单个
  154 + elseif (isset($goodsGroup[$colorId][0])) {
  155 + $result['bannerTop'] = array(
  156 + 'img' => Helpers::getImageUrl($goodsGroup[$colorId][0]['img'], 450, 600)
  157 + );
  158 + }
  159 + }
  160 + }
  161 +
  162 + // 调用尺码需要的SKN号
  163 + if (isset($baseInfo['erpProductId'])) {
  164 + $result['skn'] = $baseInfo['erpProductId'];
  165 + }
  166 + }
  167 +
  168 + return $result;
  169 + }
  170 +
  171 + /**
  172 + * 商品尺码信息
  173 + *
  174 + * @param int $productSkn
  175 + * @return array
  176 + */
  177 + public static function getSizeInfo($productSkn)
  178 + {
  179 + $sizeInfo = DetailData::sizeInfo($productSkn);
  180 + var_dump($sizeInfo);
  181 + }
  182 +
  183 +}
1 <?php 1 <?php
  2 +
2 use Action\AbstractAction; 3 use Action\AbstractAction;
3 4
4 /** 5 /**
@@ -6,345 +7,352 @@ use Action\AbstractAction; @@ -6,345 +7,352 @@ use Action\AbstractAction;
6 */ 7 */
7 class DetailController extends AbstractAction 8 class DetailController extends AbstractAction
8 { 9 {
  10 +
9 /** 11 /**
10 * 商品详情 12 * 商品详情
11 * 13 *
12 - * @param 14 + * @param int productId
  15 + * @param int goodsId
13 */ 16 */
14 public function indexAction() 17 public function indexAction()
15 - {  
16 - $data = array (  
17 - 'goodsDetailPage' => true,  
18 - 'pageHeader' => array ( 18 + {
  19 + $productId = $this->param('productId', 123);
  20 + $goodsId = $this->param('goodsId', 3241);
  21 + $uid = $this->getUid();
  22 +
  23 + $data = \Product\DetailModel::getBaseInfo($productId, $goodsId, $uid);
  24 + $data['goodsDetailPage'] = true;
  25 +
  26 + if (isset($data['goodsName'])) {
  27 + $this->setTitle($data['goodsName']);
  28 + }
  29 + $this->setNavHeader('商品详情');
  30 +
  31 +// $data = array (
  32 +// 'goodsDetailPage' => true,
  33 +// 'pageHeader' => array (
  34 +// 'navBack' => 'sss ',
  35 +// 'navHome' => 'sss ',
  36 +// 'navTitle' => '商品详情TEST'
  37 +// ),
  38 +//
  39 +// 'bannerTop' => array (
  40 +// 'list' => array (
  41 +// array (
  42 +// 'url' => '',
  43 +// 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/10/18/03/0250c3935f86dbd2baa7d45603d19fd637.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
  44 +// ),
  45 +// array (
  46 +// 'url' => '',
  47 +// 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01bf4cf4444035a1930d33a9d0f8bff4fa.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
  48 +// ),
  49 +// array (
  50 +// 'url' => '',
  51 +// 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01d7ef2f624eeea15e80bb374607aea317.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
  52 +// )
  53 +// )
  54 +// ),
  55 +// 'goodsName' => 'Stussy No. 4 BOX TEE DC SPAR HIGH WC
  56 +//SHOE BQT KEN BLOCK',
  57 +// 'goodsSubtitle'=>'【全民拼抢购】经典印花T恤,满4件免一件!全场低至
  58 +//9.9元,拼购时代High起来。',
  59 +//
  60 +// 'goodsPrice' =>array(
  61 +// 'currentPrice'=>'¥298.00',
  62 +// 'previousPrice'=>'¥598.00'
  63 +// ),
  64 +// 'periodOfMarket'=>'11月',
  65 +// 'goodsTitle' => '¥298.00',
  66 +// 'vipLevel' => array (
  67 +// 'list' => array (
  68 +// array (
  69 +// 'img'=>'http://static.dev.yohobuy.com/img/product/silver.png',
  70 +// 'text' => '¥284.00'
  71 +// ),
  72 +// array (
  73 +// 'img'=>'http://static.dev.yohobuy.com/img/product/golden.png',
  74 +// 'text' => '¥269.00'
  75 +// ),
  76 +// array (
  77 +// 'img'=>'http://static.dev.yohobuy.com/img/product/platinum.png',
  78 +// 'text' => '¥263.00'
  79 +// )
  80 +// )
  81 +// ),
  82 +// 'goodsDiscount'=>array(
  83 +// 'list'=>array(
  84 +// '【summer final sale】满¥499立享6.8折',
  85 +// '【BACK TO SCHOOL】满¥499赠送Paul
  86 +// Franke帽子一个,多买多送!',
  87 +// '【BACK TO SCHOOL】满¥499赠送Paul
  88 +// Franke帽子一个,多买多送!'
  89 +// )
  90 +// ),
  91 +// 'feedbacks'=>array(
  92 +// 'commentsNum'=>0,
  93 +// 'consultsNum'=>1,
  94 +// // 'commentName'=>'商品评价',
  95 +// // 'consultName' =>'购买咨询',
  96 +// 'link'=>'',
  97 +// 'comments'=>array(
  98 +// array(
  99 +// 'userName'=>'Lynnic',
  100 +// 'desc'=>'购买了白色Mate7',
  101 +// 'content'=>'活动时买的,挺超值。上身效果也不错。质量
  102 +//很好,买送人的,很满意。而且物流相当给...',
  103 +// 'time'=>'2014-08-12 10:24:26'
  104 +// )
  105 +// ),
  106 +// 'consults'=>array(
  107 +// array(
  108 +// 'question' =>'您好 我一米七七 140斤 穿M的行吗',
  109 +// 'time'=>'2014-08-12 10:24:26',
  110 +// 'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
  111 +// )
  112 +// )
  113 +// ),
  114 +//
  115 +// 'enterStore'=>array(
  116 +// 'img'=>'http://static.dev.yohobuy.com/img/product/store.png',
  117 +// 'storeName'=>'Stussy',
  118 +// 'url'=>'http://stussy.m.yohobuy.com/'
  119 +// ),
  120 +//
  121 +// 'goodsDescription'=>array(
  122 +// 'title' =>'商品描述',
  123 +// 'enTitle'=>'DESCRIPTON',
  124 +//
  125 +// 'detail'=>array(
  126 +// 'nubmer' =>'51018059',
  127 +// 'color' =>'黑',
  128 +// 'type' =>'帽子',
  129 +// 'gender' =>'女款',
  130 +// 'hatType' =>'棒球帽',
  131 +// 'bongrace' =>'平檐款式',
  132 +// 'goodsDetail'=>'字母图案',
  133 +// 'style'=>'街头'
  134 +// )
  135 +// ),
  136 +//
  137 +// 'sizeInfo'=>array(
  138 +// 'title' => '尺码信息',
  139 +// 'enTitle' =>'xSIZE INFO',
  140 +//
  141 +// 'detail' =>array(
  142 +// 'list'=>array(
  143 +// array(
  144 +// 'name'=>'尺寸',
  145 +// 'sizem'=>'m',
  146 +// 'sizexl' =>'XL'
  147 +// ),
  148 +// array(
  149 +// 'name'=>'肩宽',
  150 +// 'sizem'=>'43',
  151 +// 'sizexl' =>'46'
  152 +// ),
  153 +// array(
  154 +// 'name'=>'衣长',
  155 +// 'sizem'=>'102',
  156 +// 'sizexl' =>'106'
  157 +// ),
  158 +// array(
  159 +// 'name'=>'肩宽',
  160 +// 'sizem'=>'90',
  161 +// 'sizexl' =>'96'
  162 +// ),
  163 +// array(
  164 +// 'name'=>'胸围',
  165 +// 'sizem'=>'90',
  166 +// 'sizexl' =>'96'
  167 +// ),
  168 +// array(
  169 +// 'name'=>'xx',
  170 +// 'sizem'=>'xx',
  171 +// 'sizexl' =>'xx'
  172 +// )
  173 +// )
  174 +// )
  175 +// ),
  176 +//
  177 +// 'measurementMethod'=>array(
  178 +// 'title' => '测量方式',
  179 +// 'enTitle' =>'MEASUREMENT METHOD',
  180 +//
  181 +// 'detail'=>array(
  182 +// 'sort' =>'上衣' ,
  183 +// 'enSort'=>'TOPS',
  184 +// 'img' =>'http://static.dev.yohobuy.com/img/product/tops.png',
  185 +// 'items'=>array(
  186 +// '肩宽(两端肩线间的直线长度)',
  187 +// '胸围(两端肩线间的直线长度)',
  188 +// '肩宽(两端肩线间的直线长度)',
  189 +// '肩宽(两端肩线间的直线长度)',
  190 +// '肩宽(两端肩线间的直线长度)',
  191 +// '肩宽(两端肩线间的直线长度)'
  192 +// )
  193 +// )
  194 +// ),
  195 +//
  196 +// 'reference' => array(
  197 +// 'title' => '模特试穿',
  198 +// 'enTitle' =>'REFERENCE',
  199 +//
  200 +// 'detail' =>array(
  201 +// 'list'=>array(
  202 +// array(
  203 +// 'fieldName'=>'1 ',
  204 +// 'firstModel'=>'http://static.dev.yohobuy.com/img/product/avatar1.png',
  205 +// 'secondModel' =>'http://static.dev.yohobuy.com/img/product/avatar2.png'
  206 +// ),
  207 +// array(
  208 +// 'fieldName'=>'模特',
  209 +// 'firstModel'=>'Oliver',
  210 +// 'secondModel' =>'Jvly'
  211 +// ),
  212 +// array(
  213 +// 'fieldName'=>'身高',
  214 +// 'firstModel'=>'175',
  215 +// 'secondModel' =>'170'
  216 +// ),
  217 +// array(
  218 +// 'fieldName'=>'体重',
  219 +// 'firstModel'=>'53',
  220 +// 'secondModel' =>'59'
  221 +// ),
  222 +// array(
  223 +// 'fieldName'=>'三围',
  224 +// 'firstModel'=>'78/70/87',
  225 +// 'secondModel' =>'78/70/87'
  226 +// ),
  227 +// array(
  228 +// 'fieldName'=>'吊牌尺',
  229 +// 'firstModel'=>'S',
  230 +// 'secondModel' =>'L'
  231 +// )
  232 +// )
  233 +// )
  234 +// ),
  235 +//
  236 +// 'materials' => array(
  237 +// 'title' => '商品材质',
  238 +// 'enTitle' =>'MATERIALS',
  239 +// 'img' => 'http://static.dev.yohobuy.com/img/product/material.png',
  240 +// 'desc' =>'用各种洗涤剂,可手洗机洗,但不宜氯漂,宜阴干,避免曝晒,以免深色衣物褪色,在日光下晾晒时,将里面朝外。浸泡时间不能太长,避免褪色,深色与浅色衣服最好请分开洗涤,避免染色。',
  241 +// 'materialType'=>'http://static.dev.yohobuy.com/img/product/material-type.png'
  242 +// ),
  243 +//
  244 +// 'productDetail' =>array(
  245 +// 'title' => '商品详情',
  246 +// 'enTitle' =>'DETAILS',
  247 +// 'desc' => 'Married to the MOB是由Leah McSweeney创立的女装品牌,一向标榜不羁、大胆的女性streetwear设计。喜欢恶搞的女生们,赶紧入手吧。',
  248 +// 'img' =>'http://static.dev.yohobuy.com/img/product/product.png'
  249 +// ),
  250 +//
  251 +// 'cartInfo' =>array(
  252 +// 'numInCart' => 3,
  253 +// 'goodsInstore'=>0
  254 +// )
  255 +//
  256 +// );
  257 + // 渲染模板
  258 + $this->_view->display('index', $data);
  259 + }
  260 +
  261 + public function commentsAction()
  262 + {
  263 + $data = array(
  264 + 'goodsCommentsPage' => true,
  265 + 'pageHeader' => array(
19 'navBack' => 'sss ', 266 'navBack' => 'sss ',
20 - 'navHome' => 'sss ',  
21 - 'navTitle' => '商品详情TEST' 267 + // 'navHome' => 'sss ',
  268 + 'navTitle' => '购买评价(6)'
22 ), 269 ),
23 -  
24 - 'bannerTop' => array (  
25 - 'list' => array (  
26 - array (  
27 - 'url' => '',  
28 - 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/10/18/03/0250c3935f86dbd2baa7d45603d19fd637.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90' 270 + 'pageFooter' => true,
  271 + 'comments' => array(
  272 + 'list' => array(
  273 + array(
  274 + 'userName' => 'Lynnic',
  275 + 'desc' => '购买了白色Mate7',
  276 + 'content' => '活动时买的,挺超值。上身效果也不错。质量
  277 + 很好,买送人的,很满意。而且物流相当给...',
  278 + 'time' => '2014-08-12 10:24:26'
29 ), 279 ),
30 - array (  
31 - 'url' => '',  
32 - 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01bf4cf4444035a1930d33a9d0f8bff4fa.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90' 280 + array(
  281 + 'userName' => 'Lynnic',
  282 + 'desc' => '购买了白色Mate7',
  283 + 'content' => '活动时买的,挺超值。上身效果也不错。质量
  284 + 很好,买送人的,很满意。而且物流相当给...',
  285 + 'time' => '2014-08-12 10:24:26'
33 ), 286 ),
34 - array (  
35 - 'url' => '',  
36 - 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01d7ef2f624eeea15e80bb374607aea317.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90' 287 + array(
  288 + 'userName' => 'Lynnic',
  289 + 'desc' => '购买了白色Mate7',
  290 + 'content' => '活动时买的,挺超值。上身效果也不错。质量
  291 + 很好,买送人的,很满意。而且物流相当给...',
  292 + 'time' => '2014-08-12 10:24:26'
37 ) 293 )
38 ) 294 )
39 ), 295 ),
40 - 'goodsName' => 'Stussy No. 4 BOX TEE DC SPAR HIGH WC  
41 -SHOE BQT KEN BLOCK',  
42 - 'goodsSubtitle'=>'【全民拼抢购】经典印花T恤,满4件免一件!全场低至  
43 -9.9元,拼购时代High起来。', 296 + );
44 297
45 - 'goodsPrice' =>array(  
46 - 'currentPrice'=>'¥298.00',  
47 - 'previousPrice'=>'¥598.00'  
48 - ),  
49 - 'periodOfMarket'=>'11月',  
50 - 'goodsTitle' => '¥298.00',  
51 - 'vipLevel' => array (  
52 - 'list' => array (  
53 - array (  
54 - 'img'=>'http://static.dev.yohobuy.com/img/product/silver.png',  
55 - 'text' => '¥284.00'  
56 - ),  
57 - array (  
58 - 'img'=>'http://static.dev.yohobuy.com/img/product/golden.png',  
59 - 'text' => '¥269.00'  
60 - ),  
61 - array (  
62 - 'img'=>'http://static.dev.yohobuy.com/img/product/platinum.png',  
63 - 'text' => '¥263.00'  
64 - )  
65 - ) 298 + $this->_view->assign('title', '购买评价');
  299 + //$this->_view->display('brand', compact('brands'));
  300 + // 渲染模板
  301 + $this->_view->display('comments', $data);
  302 + }
  303 +
  304 + public function consultsAction()
  305 + {
  306 + $data = array(
  307 + 'goodsConsultsPage' => true,
  308 + 'pageHeader' => array(
  309 + 'navBack' => 'sss ',
  310 + // 'navHome' => 'sss ',
  311 + 'navTitle' => '购买咨询(6)'
66 ), 312 ),
67 - 'goodsDiscount'=>array(  
68 - 'list'=>array(  
69 - '【summer final sale】满¥499立享6.8折',  
70 - '【BACK TO SCHOOL】满¥499赠送Paul  
71 - Franke帽子一个,多买多送!',  
72 - '【BACK TO SCHOOL】满¥499赠送Paul  
73 - Franke帽子一个,多买多送!'  
74 - )  
75 - ),  
76 - 'feedbacks'=>array(  
77 - 'commentsNum'=>0,  
78 - 'consultsNum'=>0,  
79 - // 'commentName'=>'商品评价',  
80 - // 'consultName' =>'购买咨询',  
81 - 'link'=>'',  
82 - 'comments'=>array(  
83 - array(  
84 - 'userName'=>'Lynnic',  
85 - 'desc'=>'购买了白色Mate7',  
86 - 'content'=>'活动时买的,挺超值。上身效果也不错。质量  
87 -很好,买送人的,很满意。而且物流相当给...',  
88 - 'time'=>'2014-08-12 10:24:26'  
89 - ) 313 + 'pageFooter' => true,
  314 + 'consults' => array(
  315 + 'list' => array(
  316 + array(
  317 + 'question' => '您好 我一米七七 140斤 穿M的行吗',
  318 + 'time' => '2014-08-12 10:24:26',
  319 + 'answer' => '您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
90 ), 320 ),
91 - 'consults'=>array(  
92 array( 321 array(
93 - 'question' =>'您好 我一米七七 140斤 穿M的行吗',  
94 - 'time'=>'2014-08-12 10:24:26',  
95 - 'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'  
96 - ) 322 + 'question' => '您好 我一米七七 140斤 穿M的行吗',
  323 + 'time' => '2014-08-12 10:24:26',
  324 + 'answer' => '您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
  325 + ),
  326 + array(
  327 + 'question' => '您好 我一米七七 140斤 穿M的行吗',
  328 + 'time' => '2014-08-12 10:24:26',
  329 + 'answer' => '您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
97 ) 330 )
98 - ),  
99 -  
100 - 'enterStore'=>array(  
101 - 'img'=>'http://static.dev.yohobuy.com/img/product/store.png',  
102 - 'storeName'=>'Stussy',  
103 - 'url'=>'http://stussy.m.yohobuy.com/'  
104 - ),  
105 -  
106 - 'goodsDescription'=>array(  
107 - 'title' =>'商品描述',  
108 - 'enTitle'=>'DESCRIPTON',  
109 -  
110 - 'detail'=>array(  
111 - 'nubmer' =>'51018059',  
112 - 'color' =>'黑',  
113 - 'type' =>'帽子',  
114 - 'gender' =>'女款',  
115 - 'hatType' =>'棒球帽',  
116 - 'bongrace' =>'平檐款式',  
117 - 'goodsDetail'=>'字母图案',  
118 - 'style'=>'街头'  
119 - )  
120 - ),  
121 -  
122 - 'sizeInfo'=>array(  
123 - 'title' => '尺码信息',  
124 - 'enTitle' =>'xSIZE INFO',  
125 -  
126 - 'detail' =>array(  
127 - 'list'=>array(  
128 - array(  
129 - 'name'=>'尺寸',  
130 - 'sizem'=>'m',  
131 - 'sizexl' =>'XL'  
132 - ),  
133 - array(  
134 - 'name'=>'肩宽',  
135 - 'sizem'=>'43',  
136 - 'sizexl' =>'46'  
137 - ),  
138 - array(  
139 - 'name'=>'衣长',  
140 - 'sizem'=>'102',  
141 - 'sizexl' =>'106'  
142 - ),  
143 - array(  
144 - 'name'=>'肩宽',  
145 - 'sizem'=>'90',  
146 - 'sizexl' =>'96'  
147 - ),  
148 - array(  
149 - 'name'=>'胸围',  
150 - 'sizem'=>'90',  
151 - 'sizexl' =>'96'  
152 - ),  
153 - array(  
154 - 'name'=>'xx',  
155 - 'sizem'=>'xx',  
156 - 'sizexl' =>'xx'  
157 - )  
158 - )  
159 - ) 331 + )
160 ), 332 ),
161 -  
162 - 'measurementMethod'=>array(  
163 - 'title' => '测量方式',  
164 - 'enTitle' =>'MEASUREMENT METHOD',  
165 -  
166 - 'detail'=>array(  
167 - 'sort' =>'上衣' ,  
168 - 'enSort'=>'TOPS',  
169 - 'img' =>'http://static.dev.yohobuy.com/img/product/tops.png',  
170 - 'items'=>array(  
171 - '肩宽(两端肩线间的直线长度)',  
172 - '胸围(两端肩线间的直线长度)',  
173 - '肩宽(两端肩线间的直线长度)',  
174 - '肩宽(两端肩线间的直线长度)',  
175 - '肩宽(两端肩线间的直线长度)',  
176 - '肩宽(两端肩线间的直线长度)'  
177 - )  
178 - )  
179 - ),  
180 -  
181 - 'reference' => array(  
182 - 'title' => '模特试穿',  
183 - 'enTitle' =>'REFERENCE',  
184 -  
185 - 'detail' =>array(  
186 - 'list'=>array(  
187 - array(  
188 - 'fieldName'=>'1 ',  
189 - 'firstModel'=>'http://static.dev.yohobuy.com/img/product/avatar1.png',  
190 - 'secondModel' =>'http://static.dev.yohobuy.com/img/product/avatar2.png'  
191 - ),  
192 - array(  
193 - 'fieldName'=>'模特',  
194 - 'firstModel'=>'Oliver',  
195 - 'secondModel' =>'Jvly'  
196 - ),  
197 - array(  
198 - 'fieldName'=>'身高',  
199 - 'firstModel'=>'175',  
200 - 'secondModel' =>'170'  
201 - ),  
202 - array(  
203 - 'fieldName'=>'体重',  
204 - 'firstModel'=>'53',  
205 - 'secondModel' =>'59'  
206 - ),  
207 - array(  
208 - 'fieldName'=>'三围',  
209 - 'firstModel'=>'78/70/87',  
210 - 'secondModel' =>'78/70/87'  
211 - ),  
212 - array(  
213 - 'fieldName'=>'吊牌尺',  
214 - 'firstModel'=>'S',  
215 - 'secondModel' =>'L'  
216 - )  
217 - )  
218 - )  
219 - ),  
220 -  
221 - 'materials' => array(  
222 - 'title' => '商品材质',  
223 - 'enTitle' =>'MATERIALS',  
224 - 'img' => 'http://static.dev.yohobuy.com/img/product/material.png',  
225 - 'desc' =>'用各种洗涤剂,可手洗机洗,但不宜氯漂,宜阴干,避免曝晒,以免深色衣物褪色,在日光下晾晒时,将里面朝外。浸泡时间不能太长,避免褪色,深色与浅色衣服最好请分开洗涤,避免染色。',  
226 - 'materialType'=>'http://static.dev.yohobuy.com/img/product/material-type.png'  
227 - ),  
228 -  
229 - 'productDetail' =>array(  
230 - 'title' => '商品详情',  
231 - 'enTitle' =>'DETAILS',  
232 - 'desc' => 'Married to the MOB是由Leah McSweeney创立的女装品牌,一向标榜不羁、大胆的女性streetwear设计。喜欢恶搞的女生们,赶紧入手吧。',  
233 - 'img' =>'http://static.dev.yohobuy.com/img/product/product.png'  
234 - ),  
235 -  
236 - 'cartInfo' =>array(  
237 - 'numInCart' => 3,  
238 - 'goodsInstore'=>0  
239 - )  
240 -  
241 ); 333 );
242 -  
243 - $this->_view->assign('title', '商品详情');  
244 - // $this->_view->display('brand', compact('brands'));  
245 334
  335 + $this->_view->assign('title', '购买咨询');
  336 + //$this->_view->display('brand', compact('brands'));
246 // 渲染模板 337 // 渲染模板
247 - $this->_view->display('index', $data); 338 + $this->_view->display('consults', $data);
248 } 339 }
249 340
250 - public function commentsAction(){  
251 - $data = array(  
252 -  
253 - 'goodsCommentsPage' =>true,  
254 - 'pageHeader' => array (  
255 - 'navBack' => 'sss ',  
256 - // 'navHome' => 'sss ',  
257 - 'navTitle' => '购买评价(6)'  
258 - ),  
259 - 'pageFooter' => true,  
260 - 'comments'=>array(  
261 - 'list' =>array(  
262 - array(  
263 - 'userName'=>'Lynnic',  
264 - 'desc'=>'购买了白色Mate7',  
265 - 'content'=>'活动时买的,挺超值。上身效果也不错。质量  
266 - 很好,买送人的,很满意。而且物流相当给...',  
267 - 'time'=>'2014-08-12 10:24:26'  
268 - ),  
269 - array(  
270 - 'userName'=>'Lynnic',  
271 - 'desc'=>'购买了白色Mate7',  
272 - 'content'=>'活动时买的,挺超值。上身效果也不错。质量  
273 - 很好,买送人的,很满意。而且物流相当给...',  
274 - 'time'=>'2014-08-12 10:24:26'  
275 - ),  
276 - array(  
277 - 'userName'=>'Lynnic',  
278 - 'desc'=>'购买了白色Mate7',  
279 - 'content'=>'活动时买的,挺超值。上身效果也不错。质量  
280 - 很好,买送人的,很满意。而且物流相当给...',  
281 - 'time'=>'2014-08-12 10:24:26'  
282 - )  
283 -  
284 - )  
285 - ),  
286 - );  
287 -  
288 - $this->_view->assign('title', '购买评价');  
289 - //$this->_view->display('brand', compact('brands'));  
290 -  
291 - // 渲染模板  
292 - $this->_view->display('comments', $data);  
293 - }  
294 -  
295 -  
296 - public function consultsAction(){  
297 - $data = array(  
298 - 'goodsConsultsPage' =>true,  
299 - 'pageHeader' => array (  
300 - 'navBack' => 'sss ',  
301 - // 'navHome' => 'sss ',  
302 - 'navTitle' => '购买咨询(6)'  
303 - ),  
304 - 'pageFooter' => true,  
305 - 'consults'=>array(  
306 - 'list' =>array(  
307 - array(  
308 - 'question' =>'您好 我一米七七 140斤 穿M的行吗',  
309 - 'time'=>'2014-08-12 10:24:26',  
310 - 'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'  
311 - ),  
312 - array(  
313 - 'question' =>'您好 我一米七七 140斤 穿M的行吗',  
314 - 'time'=>'2014-08-12 10:24:26',  
315 - 'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'  
316 - ),  
317 - array(  
318 - 'question' =>'您好 我一米七七 140斤 穿M的行吗',  
319 - 'time'=>'2014-08-12 10:24:26',  
320 - 'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'  
321 - )  
322 -  
323 - )  
324 - ),  
325 - );  
326 -  
327 - $this->_view->assign('title', '购买咨询');  
328 - //$this->_view->display('brand', compact('brands'));  
329 -  
330 - // 渲染模板  
331 - $this->_view->display('consults', $data);  
332 - }  
333 -  
334 - public function consultformAction(){  
335 - $data = array(  
336 - 'consultform' =>true,  
337 - 'pageHeader' => array (  
338 - 'navBack' => 'sss ',  
339 - // 'navHome' => 'sss ',  
340 - 'navTitle' => '我要咨询'  
341 - )  
342 - ); 341 + public function consultformAction()
  342 + {
  343 + $data = array(
  344 + 'consultform' => true,
  345 + 'pageHeader' => array(
  346 + 'navBack' => 'sss ',
  347 + // 'navHome' => 'sss ',
  348 + 'navTitle' => '我要咨询'
  349 + )
  350 + );
343 351
344 - $this->_view->assign('title', '我要咨询');  
345 - //$this->_view->display('brand', compact('brands')); 352 + $this->_view->assign('title', '我要咨询');
  353 + //$this->_view->display('brand', compact('brands'));
  354 + // 渲染模板
  355 + $this->_view->display('consultform', $data);
  356 + }
346 357
347 - // 渲染模板  
348 - $this->_view->display('consultform', $data);  
349 - }  
350 -}  
  358 +}
@@ -3,4 +3,20 @@ routes.goodsfilter.type = "rewrite" @@ -3,4 +3,20 @@ routes.goodsfilter.type = "rewrite"
3 routes.goodsfilter.match = "/search/filter" 3 routes.goodsfilter.match = "/search/filter"
4 routes.goodsfilter.route.module = Index 4 routes.goodsfilter.route.module = Index
5 routes.goodsfilter.route.controller = Search 5 routes.goodsfilter.route.controller = Search
6 -routes.goodsfilter.route.action = Filter  
  6 +routes.goodsfilter.route.action = Filter
  7 +
  8 +routes.product.type = "regex"
  9 +routes.product.match = "#/product/pro_([0-9]+)_([0-9]+)/(.*)#"
  10 +routes.product.route.module = Product
  11 +routes.product.route.controller = Detail
  12 +routes.product.route.action = Index
  13 +routes.product.map.1 = productId
  14 +routes.product.map.2 = goodsId
  15 +
  16 +routes.buy.type = "regex"
  17 +routes.buy.match = "#/product/buy_([0-9]+)_([0-9]+).html#"
  18 +routes.buy.route.module = Product
  19 +routes.buy.route.controller = Detail
  20 +routes.buy.route.action = Index
  21 +routes.buy.map.1 = productId
  22 +routes.buy.map.2 = goodsId