Authored by lore-w

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

Conflicts:
	framework
  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 +}
@@ -35,18 +35,14 @@ class CacheConfig @@ -35,18 +35,14 @@ 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 -<<<<<<< HEAD  
39 const KEY_ACTION_HOME_GRADE = 'key_action_home_grade';//会员等级 38 const KEY_ACTION_HOME_GRADE = 'key_action_home_grade';//会员等级
40 const KEY_ACTION_HOME_PREFERENTIAL = 'key_action_home_preferential';//会员特权详情 39 const KEY_ACTION_HOME_PREFERENTIAL = 'key_action_home_preferential';//会员特权详情
41 - const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR  
42 - const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情  
43 const KEY_ACTION_HOME_ORDER_ORDER = 'key_action_home_order_order';//订单列表 40 const KEY_ACTION_HOME_ORDER_ORDER = 'key_action_home_order_order';//订单列表
44 -======= 41 +
45 const KEY_ACTION_GUANG_PLUSSTAR_INDEX = 'key_action_guang_plusstar_index'; // 国际优选 42 const KEY_ACTION_GUANG_PLUSSTAR_INDEX = 'key_action_guang_plusstar_index'; // 国际优选
46 const KEY_ACTION_GUANG_PLUSSTAR_LIST = 'key_action_guang_plusstar_list'; // 明星原创 43 const KEY_ACTION_GUANG_PLUSSTAR_LIST = 'key_action_guang_plusstar_list'; // 明星原创
47 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
48 const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情 45 const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情
49 const KEY_ACTION_GUANG_RSS_DATA = 'key_action_guang_detail_data'; // 逛订阅内容 46 const KEY_ACTION_GUANG_RSS_DATA = 'key_action_guang_detail_data'; // 逛订阅内容
50 ->>>>>>> master  
51 47
52 } 48 }
@@ -22,7 +22,7 @@ class PlusstarData @@ -22,7 +22,7 @@ class PlusstarData
22 { 22 {
23 23
24 const URI_BRANDLIST = 'guang/api/v1/plustar/getlist'; 24 const URI_BRANDLIST = 'guang/api/v1/plustar/getlist';
25 - const URI_BRANDINFO_PLUSSTAR = 'guang/service/v1/plustar/'; // 'guang/service/v3/plustar/' 25 + const URI_BRANDINFO_PLUSSTAR = 'guang/service/v3/plustar/'; // 'guang/service/v3/plustar/'
26 const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/'; 26 const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/';
27 const URI_BRANDINFO_ARTICLE = 'guang/service/v1/article/'; 27 const URI_BRANDINFO_ARTICLE = 'guang/service/v1/article/';
28 28
@@ -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 }
@@ -226,29 +226,36 @@ $basicBtnC:#eb0313; @@ -226,29 +226,36 @@ $basicBtnC:#eb0313;
226 } 226 }
227 } 227 }
228 .goodsDiscount{ 228 .goodsDiscount{
229 - min-height: pxToRem(88px);  
230 - padding-left:pxToRem(28px);  
231 - padding-right:pxToRem(28px);  
232 - font-size: pxToRem(28px);  
233 - color: $mainFontC;  
234 - line-height: pxToRem(88px);  
235 -  
236 - border-bottom: 1px solid $borderC;  
237 -  
238 - .iconfont{  
239 - display: inline-block;  
240 - width: pxToRem(35px);  
241 - font-size: pxToRem(45px);  
242 - float: right;  
243 - color:#e0e0e0;  
244 - // padding-left:pxToRem(50px);  
245 - }  
246 - } 229 +
  230 + font-size: pxToRem(28px);
  231 + color: $mainFontC;
  232 + border-bottom: 1px solid $borderC;
  233 + h1{
  234 + padding : pxToRem(30px) pxToRem(28px);
  235 + line-height: pxToRem(36px);
  236 + // line-height: pxToRem(88px);
  237 + }
  238 + .iconfont{
  239 + display: inline-block;
  240 + width: pxToRem(35px);
  241 + font-size: pxToRem(45px);
  242 + float: right;
  243 + color:#e0e0e0;
  244 + // padding-left:pxToRem(50px);
  245 + }
  246 + .discount-folder{
  247 + .folder-item{
  248 + border-top: 1px solid $borderC;
  249 + }
  250 + display: none;
  251 + }
  252 +
  253 +}
247 .goodsSubtitle, 254 .goodsSubtitle,
248 .goodsDiscount{ 255 .goodsDiscount{
249 text-indent: pxToRem(-14px); 256 text-indent: pxToRem(-14px);
250 } 257 }
251 - .feedback-list-page { 258 + .feedback-list {
252 padding-top: pxToRem(30px); 259 padding-top: pxToRem(30px);
253 background-color: #f0f0f0; 260 background-color: #f0f0f0;
254 261
@@ -404,7 +411,20 @@ $basicBtnC:#eb0313; @@ -404,7 +411,20 @@ $basicBtnC:#eb0313;
404 display: none; 411 display: none;
405 } 412 }
406 } 413 }
407 - 414 +.feedback-list .nodata{
  415 + height: pxToRem(88px);
  416 + font-size: pxToRem(28px);
  417 + line-height: pxToRem(88px);
  418 + background-color: #fff;
  419 + padding:0 pxToRem(28px);
  420 + .go-consult{
  421 + float: right;
  422 + color: $subFontC;
  423 + span{
  424 + font-size: pxToRem(28px);
  425 + }
  426 + }
  427 +}
408 .enter-store{ 428 .enter-store{
409 min-height: pxToRem(100px); 429 min-height: pxToRem(100px);
410 display: table; 430 display: table;
@@ -484,6 +504,8 @@ $basicBtnC:#eb0313; @@ -484,6 +504,8 @@ $basicBtnC:#eb0313;
484 504
485 .detail-swiper{ 505 .detail-swiper{
486 .swiper-wrapper{ 506 .swiper-wrapper{
  507 + height: pxToRem(200px);
  508 + overflow: hidden;
487 .swiper-slide{ 509 .swiper-slide{
488 width: pxToRem(114px); 510 width: pxToRem(114px);
489 div{ 511 div{
@@ -516,7 +538,7 @@ $basicBtnC:#eb0313; @@ -516,7 +538,7 @@ $basicBtnC:#eb0313;
516 .measurement-method{ 538 .measurement-method{
517 .detail{ 539 .detail{
518 width: 100%; 540 width: 100%;
519 - // height: pxToRem(300px); 541 + height: pxToRem(260px);
520 img{ 542 img{
521 float:left; 543 float:left;
522 width: pxToRem(270px); 544 width: pxToRem(270px);
@@ -584,7 +606,8 @@ $basicBtnC:#eb0313; @@ -584,7 +606,8 @@ $basicBtnC:#eb0313;
584 font-size: pxToRem(34px); 606 font-size: pxToRem(34px);
585 color:$basicBtnC; 607 color:$basicBtnC;
586 } 608 }
587 - &.addto-cart{ 609 + &.addto-cart,
  610 + &.sold-out{
588 height: pxToRem(80px); 611 height: pxToRem(80px);
589 width: pxToRem(260px); 612 width: pxToRem(260px);
590 margin:0 pxToRem(100px) 0 pxToRem(115px); 613 margin:0 pxToRem(100px) 0 pxToRem(115px);
@@ -594,6 +617,9 @@ $basicBtnC:#eb0313; @@ -594,6 +617,9 @@ $basicBtnC:#eb0313;
594 line-height: pxToRem(80px); 617 line-height: pxToRem(80px);
595 text-align: center; 618 text-align: center;
596 } 619 }
  620 + &.sold-out{
  621 + background-color: #f58189;
  622 + }
597 } 623 }
598 .num-tag{ 624 .num-tag{
599 position: absolute; 625 position: absolute;
@@ -57,22 +57,93 @@ @@ -57,22 +57,93 @@
57 57
58 <div class="feedback-list "> 58 <div class="feedback-list ">
59 {{# feedbacks}} 59 {{# feedbacks}}
60 - {{#if nodata}}  
61 - <div class="nodata">  
62 - <span>暂无商品评价和咨询</span>  
63 - <a class="go-consult">我要咨询<i class="iconfont"><span class="iconfont">&#xe604;</span></a> 60 + {{#if commentsNum}}
  61 + <!--tab begin-->
  62 + <ul id="nav-tab" class="nav-tab clearfix">
  63 + <li class="comment-nav">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li>
  64 + <li class="consult-nav">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li>
  65 + </ul>
  66 + <div id="feedback-content" >
  67 +
  68 + <div class="comment-content content ">
  69 + {{#if commentsNum}}
  70 + <div class="comment-content-main content-main">
  71 + {{# comments}}
  72 + <span class="user-name">
  73 + {{userName}}
  74 + </span>
  75 + <span class="goods-spec">
  76 + {{desc}}
  77 + </span>
  78 + <p class="detail-content">
  79 + {{content}}
  80 + </p>
  81 + <span class="comment-time">
  82 + {{time}}
  83 + </span>
  84 + {{/ comments}}
  85 + </div>
  86 + {{else}}
  87 + <div class="comment-content-main content-main no-item">
  88 + <span class="iconfont">&#xe63c;</span>暂无评论
  89 + </div>
  90 + {{/if}}
  91 + <div class="comment-content-footer">
  92 + <a href="{{link}}">查看更多 <span class="iconfont">&#xe604;</span></a>
  93 + </div>
64 </div> 94 </div>
  95 +
  96 +
  97 + <div class="consult-content content hide ">
  98 + {{#if consultsNum}}
  99 + <div class="consult-content-main content-main">
  100 + {{# consults}}
  101 + <div class="question">
  102 + <span class="iconfont">&#xe639;</span>
  103 + <p>{{question}}
  104 + <span class="time">
  105 + {{time}}
  106 + </span>
  107 + </p>
  108 + </div>
  109 +
  110 + <div class="answer">
  111 + <span class="iconfont">&#xe63c;</span>
  112 + <p>{{answer}}</p>
  113 + </div>
  114 + {{/ consults}}
  115 + </div>
  116 + <div class="consult-content-footer">
  117 + <a href="{{link}}">
  118 + 查看更多
  119 + <span class="iconfont">&#xe604;</span></a>
  120 + </div>
  121 + {{else}}
  122 + <div class="comment-content-main content-main no-item">
  123 + <span class="iconfont">&#xe63c;</span>暂无咨询
  124 + </div>
  125 + <div class="consult-content-footer">
  126 + <a href="{{link}}">
  127 + 我要咨询
  128 + <span class="iconfont">&#xe604;</span></a>
  129 + </div>
  130 + {{/if}}
  131 +
  132 + </div>
  133 + </div>
  134 + <!--/tab end-->
65 {{else}} 135 {{else}}
66 -  
67 - <ul id="nav-tab" class="nav-tab clearfix">  
68 - <li class="comment-nav">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li>  
69 - <li class="consult-nav">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li>  
70 - </ul>  
71 - <div id="feedback-content" >  
72 -  
73 - <div class="comment-content content ">  
74 - {{#if commentsNum}}  
75 - <div class="comment-content-main content-main"> 136 + {{#if consultsNum}}
  137 + <!--tab begin-->
  138 + <ul id="nav-tab" class="nav-tab clearfix">
  139 + <li class="comment-nav">商品评价(<span class="comments-num">{{commentsNum}}</span>)</li>
  140 + <li class="consult-nav">购买咨询(<span class="consults-num">{{consultsNum}}</span>)</li>
  141 + </ul>
  142 + <div id="feedback-content" >
  143 +
  144 + <div class="comment-content content ">
  145 + {{#if commentsNum}}
  146 + <div class="comment-content-main content-main">
76 {{# comments}} 147 {{# comments}}
77 <span class="user-name"> 148 <span class="user-name">
78 {{userName}} 149 {{userName}}
@@ -88,13 +159,13 @@ @@ -88,13 +159,13 @@
88 </span> 159 </span>
89 {{/ comments}} 160 {{/ comments}}
90 </div> 161 </div>
91 - {{else}}  
92 - <div class="comment-content-main content-main no-item">  
93 - <span class="iconfont">&#xe63c;</span>暂无评论  
94 - </div> 162 + {{else}}
  163 + <div class="comment-content-main content-main no-item">
  164 + <span class="iconfont">&#xe63c;</span>暂无评论
  165 + </div>
95 {{/if}} 166 {{/if}}
96 <div class="comment-content-footer"> 167 <div class="comment-content-footer">
97 - <a href="{{moreComments}}">查看更多 <span class="iconfont">&#xe604;</span></a> 168 + <a href="{{link}}">查看更多 <span class="iconfont">&#xe604;</span></a>
98 </div> 169 </div>
99 </div> 170 </div>
100 171
@@ -109,7 +180,7 @@ @@ -109,7 +180,7 @@
109 <span class="time"> 180 <span class="time">
110 {{time}} 181 {{time}}
111 </span> 182 </span>
112 - </p> 183 + </p>
113 </div> 184 </div>
114 185
115 <div class="answer"> 186 <div class="answer">
@@ -119,24 +190,34 @@ @@ -119,24 +190,34 @@
119 {{/ consults}} 190 {{/ consults}}
120 </div> 191 </div>
121 <div class="consult-content-footer"> 192 <div class="consult-content-footer">
122 - <a href="{{moreConsults}}"> 193 + <a href="{{link}}">
123 查看更多 194 查看更多
124 <span class="iconfont">&#xe604;</span></a> 195 <span class="iconfont">&#xe604;</span></a>
125 - </div> 196 + </div>
126 {{else}} 197 {{else}}
127 - <div class="comment-content-main content-main no-item">  
128 - <span class="iconfont">&#xe63c;</span>暂无咨询  
129 - </div>  
130 - <div class="consult-content-footer">  
131 - <a href="{{gotoConsults}}"> 198 + <div class="comment-content-main content-main no-item">
  199 + <span class="iconfont">&#xe63c;</span>暂无咨询
  200 + </div>
  201 + <div class="consult-content-footer">
  202 + <a href="{{link}}">
132 我要咨询 203 我要咨询
133 <span class="iconfont">&#xe604;</span></a> 204 <span class="iconfont">&#xe604;</span></a>
134 </div> 205 </div>
135 - {{/if}} 206 + {{/if}}
136 207
  208 + </div>
  209 + </div>
  210 + <!--/tab end-->
  211 + {{else}}
  212 + <div class="nodata">
  213 + <span>暂无商品评价和咨询</span>
  214 + <a class="go-consult">我要咨询<span class="iconfont">&#xe604;</span></a>
137 </div> 215 </div>
138 - </div> 216 + {{/if}}
139 {{/if}} 217 {{/if}}
  218 +
  219 +
  220 +
140 {{/ feedbacks}} 221 {{/ feedbacks}}
141 </div> 222 </div>
142 223
  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 +}
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 use Action\AbstractAction; 3 use Action\AbstractAction;
4 use LibModels\Wap\Guang\PlusstarData; 4 use LibModels\Wap\Guang\PlusstarData;
5 use Plugin\Helpers; 5 use Plugin\Helpers;
  6 +use Plugin\Images;
6 7
7 /** 8 /**
8 * 明星品牌和原创品牌 9 * 明星品牌和原创品牌
@@ -131,7 +132,7 @@ class PlusstarController extends AbstractAction @@ -131,7 +132,7 @@ class PlusstarController extends AbstractAction
131 $data['psDetail'] = true; 132 $data['psDetail'] = true;
132 $data['ps']['id'] = $brandId; 133 $data['ps']['id'] = $brandId;
133 $data['ps']['banner'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['cover_img'], 640, 309); 134 $data['ps']['banner'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['cover_img'], 640, 309);
134 - $data['ps']['logo'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['brand_ico'], 160, 160); 135 + $data['ps']['logo'] = Images::getSourceUrl($brandInfo['getBrandInfo']['data']['brand_ico'],'brandLogo');
135 $data['ps']['name'] = $brandInfo['getBrandInfo']['data']['brand_name']; 136 $data['ps']['name'] = $brandInfo['getBrandInfo']['data']['brand_name'];
136 $data['ps']['isLike'] = $brandInfo['getUidBrandFav']; 137 $data['ps']['isLike'] = $brandInfo['getUidBrandFav'];
137 $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? false : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' ')); 138 $data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? false : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' '));
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'=>1,  
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