Authored by Lynnic

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

{
"arrivalTime": 1309514897,
"attribute": 1,
"auditingTime": 0,
"brand": {
"brandAlif": "R",
"brandBanner": "/2011/06/26/14/02d2214a0a7feb6112a8ebbd39de301192.jpg",
"brandCertificate": "",
"brandCss": "",
"brandDomain": "REVELATOR",
"brandGroupId": 0,
"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",
"brandInitials": "",
"brandKeyword": "REVELATOR",
"brandLevel": 1,
"brandName": "REVELATOR",
"brandNameCn": "",
"brandNameEn": "REVELATOR",
"brandOutline": "所有围绕在我们身边并且默默在对这个世界付出的人,都是我们所认知的启示者。",
"brandScale": 3,
"brandSign": "",
"brandStyle": "个性,潮流,嘻哈,街头,",
"brandTemplate": 1,
"brandTypeId": 3,
"brandUrl": "",
"hotKeyword": "REVELATOR",
"id": 119,
"isHot": "N",
"isIndependent": "N",
"orderBy": 0,
"parentId": 0,
"relateBrandIds": "",
"shelvesBrandTime": 0,
"staticContentCode": "",
"status": 0
},
"brandId": 119,
"categoryBoList": [
{
"categoryId": 1,
"categoryName": "上衣",
"isleaf": true,
"level": 1
},
{
"categoryId": 11,
"categoryName": "T恤",
"isleaf": true,
"level": 2
},
{
"categoryId": 114,
"categoryName": "T恤",
"isleaf": true,
"level": 3
}
],
"cnAlphabet": "REVELATORTHERDuanXiuTXu",
"createTime": 1308726112,
"editTime": 0,
"erpProductId": 50004331,
"expectArrivalTime": 1309514897,
"firstShelveTime": 1309514897,
"folderId": 0,
"gender": "1",
"goodsList": [
{
"colorId": 1,
"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",
"colorName": "白",
"factorySn": "",
"firstShelveTime": 1309514897,
"goodsImagesList": [
{
"angle": 0,
"genderCover": 0,
"goodsId": 3241,
"id": 131463,
"imageName": "",
"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",
"intro": 0,
"isDefault": "Y",
"orderBy": 1,
"productId": 2631,
"status": 1
},
{
"angle": 0,
"genderCover": 0,
"goodsId": 3241,
"id": 131462,
"imageName": "",
"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",
"intro": 0,
"isDefault": "N",
"orderBy": 0,
"productId": 2631,
"status": 1
}
],
"goodsName": "THE R TEE",
"goodsSizeBoList": [
{
"createTime": 0,
"goodsId": 3241,
"goodsSizeSkuId": 102000,
"goodsSizeStorageNum": 0,
"id": 203,
"orderBy": 1175,
"sizeName": "M",
"sortId": 0,
"updateTime": 0
},
{
"createTime": 0,
"goodsId": 3241,
"goodsSizeSkuId": 102001,
"goodsSizeStorageNum": 0,
"id": 201,
"orderBy": 1169,
"sizeName": "L",
"sortId": 0,
"updateTime": 0
}
],
"id": 3241,
"isDefault": "N",
"isDown": "N",
"matchExplain": "",
"productId": 2631,
"productSkc": 3241,
"status": 1,
"viewNum": 0
}
],
"id": 2631,
"isAdvance": "N",
"isAuditing": "Y",
"isDown": "N",
"isEdit": 1,
"isHot": "N",
"isJit": "N",
"isLimited": "N",
"isNew": "N",
"isOutlets": "N",
"isPromotion": 0,
"isRecommend": "N",
"isReplenishment": 0,
"isRetrieval": "N",
"isSales": "Y",
"isSpecial": "N",
"maxSortId": 1,
"middleSortId": 11,
"phrase": "以品牌字首R字母為设计重点,环绕式轮廓线营造渐层视觉 ",
"productName": "REVELATORTHER 短袖T恤",
"productPriceBo": {
"formatMarketPrice": "¥255.0",
"formatSalesPrice": "¥99.0",
"formatSpecialPrice": "¥99.0",
"marketPrice": 255,
"productId": 2631,
"salesPrice": 99,
"specialPrice": 99,
"vipPrice": "¥0.0",
"vipPrices": [
{
"vipLevel": 1,
"vipPrice": "¥94",
"vipTitle": "银卡"
},
{
"vipLevel": 2,
"vipPrice": "¥89",
"vipTitle": "金卡"
},
{
"vipLevel": 3,
"vipPrice": "¥87",
"vipTitle": "白金"
}
]
},
"productTagBoList": [
{
"tagLabel": "is_discount",
"tagValue": "Y"
},
{
"tagLabel": "is_soon_sold_out",
"tagValue": "Y"
}
],
"promotionBoList": [
{
"promotionTitle": "【秋冬热促】满¥2188减¥800",
"promotionType": "满减"
},
{
"promotionTitle": "【秋冬热促】满¥1488减¥500",
"promotionType": "满减"
}
],
"consultBoWrapper": {
"consultBoList": [
{
"answer": "您好,我们会联系品牌尽快补货,目前没有办法给您确切的答复,建议您进行到货通知的登记,补货到了,会第一时间短信联系您的。感谢您对yoho!有货的关注。",
"answerTime": "2012-05-02 15:10:08",
"ask": "请问 这件的灰色的L码还会不会补货?",
"askTime": "2012-05-02 14:23:09",
"id": 68252
}
],
"consultTotal": 5
},
"commentBoWrapper": {
"commentBoList": [
{
"productId": "您好,我们会联系品牌尽快补货,目前没有办法给您确切的答复,建议您进行到货通知的登记,补货到了,会第一时间短信联系您的。感谢您对yoho!有货的关注。",
"id": "2012-05-02 15:10:08",
"uid": "请问 这件的灰色的L码还会不会补货?",
"content": "2012-05-02 14:23:09",
"createTime": "2012-05-02 14:23:09",
"sizeName":"L",
"colorName":"red",
"nickName":"xieyong",
"headIcon":"http://dddd"
}
],
"commentTotal": 5
}
"productUrl": "http://m.yohobuy.com/product/pro_2631_3241/REVELATORTHERDuanXiuTXu.html",
"salableTime": "0",
"salesPhrase": "",
"seasons": "summer",
"sellChannels": "0",
"seriesId": 0,
"shelveTime": 1325135169,
"shopId": 0,
"smallSortId": 114,
"sortId": 0,
"status": 1,
"storage": 0,
"style": "",
"supplierId": 0,
"vipDiscountType": 1
}
\ No newline at end of file
... ...
{
"modelBos": [],
"null": false,
"productDescBo": {
"colorName": "灰色",
"erpProductId": "50002468",
"gender": 1,
"null": false,
"standardBos": []
},
"productExtra": {
"null": true
},
"productIntroBo": {
"productId": 10,
"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>"
},
"productMaterialList": [],
"sizeImage": "http://static.yohobuy.com/images/1.jpg",
"sizeInfoBo": {
"sizeAttributeBos": [
{
"attributeName": "后衣长",
"id": 49
},
{
"attributeName": "前衣长",
"id": 48
},
{
"attributeName": "袖长",
"id": 5
},
{
"attributeName": "胸围",
"id": 4
},
{
"attributeName": "肩宽",
"id": 3
},
{
"attributeName": "后中长",
"id": 1
}
],
"sizeBoList": [
{
"id": 201,
"sizeName": "L",
"sortAttributes": [
{
"id": 49,
"sizeValue": ""
},
{
"id": 48,
"sizeValue": ""
},
{
"id": 5,
"sizeValue": "64"
},
{
"id": 4,
"sizeValue": "108"
},
{
"id": 3,
"sizeValue": "49"
},
{
"id": 1,
"sizeValue": "67"
}
]
},
{
"id": 203,
"sizeName": "M",
"sortAttributes": [
{
"id": 5,
"sizeValue": "62"
},
{
"id": 4,
"sizeValue": "102"
},
{
"id": 3,
"sizeValue": "46"
},
{
"id": 1,
"sizeValue": "64"
},
{
"id": 49,
"sizeValue": ""
},
{
"id": 48,
"sizeValue": ""
}
]
}
]
},
"washTipsBoList": [
{
"caption": "不可转笼翻转干燥",
"img": "http://static.yohobuy.com/images/wash_2.png"
},
{
"caption": "30度水温弱速洗",
"img": "http://static.yohobuy.com/images/wash_3.png"
},
{
"caption": "分色洗涤",
"img": "http://static.yohobuy.com/images/wash_7.png"
}
]
}
\ No newline at end of file
... ...
framework @ 119c247f
Subproject commit e9d066dd88a8e7e37103021c427a205a5cfcdcec
Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
... ...
... ... @@ -31,6 +31,7 @@ class Yohobuy
const API_URL_SHOPINGCART = 'http://192.168.102.213:8080/api-gateway-web/'; // 我的购物车接口URL
const API_URL_PRODUCTDETAIL = 'http://172.16.6.145:8080/'; // 商品详情页
/**
* 私钥列表
*
... ...
... ... @@ -35,18 +35,14 @@ class CacheConfig
const KEY_ACTION_SEARCH_SEARCH = 'key_action_search_search'; // 搜索的数据
const KEY_ACTION_SEARCH_FILTER = 'key_action_search_filter'; // 搜索的过滤条件
<<<<<<< HEAD
const KEY_ACTION_HOME_GRADE = 'key_action_home_grade';//会员等级
const KEY_ACTION_HOME_PREFERENTIAL = 'key_action_home_preferential';//会员特权详情
const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR
const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情
const KEY_ACTION_HOME_ORDER_ORDER = 'key_action_home_order_order';//订单列表
=======
const KEY_ACTION_GUANG_PLUSSTAR_INDEX = 'key_action_guang_plusstar_index'; // 国际优选
const KEY_ACTION_GUANG_PLUSSTAR_LIST = 'key_action_guang_plusstar_list'; // 明星原创
const KEY_ACTION_GUANG_PLUSTAR_DATA = 'key_action_guang_plustar_data'; // 逛PLUSTAR
const KEY_ACTION_GUANG_DETAIL_DATA = 'key_action_guang_detail_data'; // 逛内容详情
const KEY_ACTION_GUANG_RSS_DATA = 'key_action_guang_detail_data'; // 逛订阅内容
>>>>>>> master
}
... ...
... ... @@ -22,7 +22,7 @@ class PlusstarData
{
const URI_BRANDLIST = 'guang/api/v1/plustar/getlist';
const URI_BRANDINFO_PLUSSTAR = 'guang/service/v1/plustar/'; // 'guang/service/v3/plustar/'
const URI_BRANDINFO_PLUSSTAR = 'guang/service/v3/plustar/'; // 'guang/service/v3/plustar/'
const URI_BRANDINFO_FAVORITE = 'shops/service/v1/favorite/';
const URI_BRANDINFO_ARTICLE = 'guang/service/v1/article/';
... ...
... ... @@ -26,65 +26,394 @@ class DetailData
* @param int $productId
* @return array
*/
public function product($productId)
public static function baseInfo($productId, $uid)
{
$result = array();
if (is_numeric($productId)) {
$result = Yohobuy::get(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_BASE_INFO, array('productId' => $productId) );
}
return $result;
$data = json_decode('{
"arrivalTime": 1309514897,
"attribute": 1,
"auditingTime": 0,
"brand": {
"brandAlif": "R",
"brandBanner": "/2011/06/26/14/02d2214a0a7feb6112a8ebbd39de301192.jpg",
"brandCertificate": "",
"brandCss": "",
"brandDomain": "REVELATOR",
"brandGroupId": 0,
"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",
"brandInitials": "",
"brandKeyword": "REVELATOR",
"brandLevel": 1,
"brandName": "REVELATOR",
"brandNameCn": "",
"brandNameEn": "REVELATOR",
"brandOutline": "所有围绕在我们身边并且默默在对这个世界付出的人,都是我们所认知的启示者。",
"brandScale": 3,
"brandSign": "",
"brandStyle": "个性,潮流,嘻哈,街头,",
"brandTemplate": 1,
"brandTypeId": 3,
"brandUrl": "",
"hotKeyword": "REVELATOR",
"id": 119,
"isHot": "N",
"isIndependent": "N",
"orderBy": 0,
"parentId": 0,
"relateBrandIds": "",
"shelvesBrandTime": 0,
"staticContentCode": "",
"status": 0
},
"brandId": 119,
"categoryBoList": [
{
"categoryId": 1,
"categoryName": "上衣",
"isleaf": true,
"level": 1
},
{
"categoryId": 11,
"categoryName": "T恤",
"isleaf": true,
"level": 2
},
{
"categoryId": 114,
"categoryName": "T恤",
"isleaf": true,
"level": 3
}
/**
* 商品小图
*
* @param int $goodsId
* @return array
*/
public function goods($goodsId)
],
"cnAlphabet": "REVELATORTHERDuanXiuTXu",
"createTime": 1308726112,
"editTime": 0,
"erpProductId": 50004331,
"expectArrivalTime": 1309514897,
"firstShelveTime": 1309514897,
"folderId": 0,
"gender": "1",
"goodsList": [
{
$result = array();
if (is_numeric($goodsId)) {
$result = Yohobuy::get(Yohobuy::API_URL_PRODUCTDETAIL . self::PRODUCT_GOODS_INFO, array('goodsId' => $goodsId) );
"colorId": 1,
"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",
"colorName": "白",
"factorySn": "",
"firstShelveTime": 1309514897,
"goodsImagesList": [
{
"angle": 0,
"genderCover": 0,
"goodsId": 3241,
"id": 131463,
"imageName": "",
"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",
"intro": 0,
"isDefault": "Y",
"orderBy": 1,
"productId": 2631,
"status": 1
},
{
"angle": 0,
"genderCover": 0,
"goodsId": 3241,
"id": 131462,
"imageName": "",
"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",
"intro": 0,
"isDefault": "N",
"orderBy": 0,
"productId": 2631,
"status": 1
}
return $result;
],
"goodsName": "THE R TEE",
"goodsSizeBoList": [
{
"createTime": 0,
"goodsId": 3241,
"goodsSizeSkuId": 102000,
"goodsSizeStorageNum": 0,
"id": 203,
"orderBy": 1175,
"sizeName": "M",
"sortId": 0,
"updateTime": 0
},
{
"createTime": 0,
"goodsId": 3241,
"goodsSizeSkuId": 102001,
"goodsSizeStorageNum": 0,
"id": 201,
"orderBy": 1169,
"sizeName": "L",
"sortId": 0,
"updateTime": 0
}
],
"id": 3241,
"isDefault": "N",
"isDown": "N",
"matchExplain": "",
"productId": 2631,
"productSkc": 3241,
"status": 1,
"viewNum": 0
}
/**
* 品牌
*
* @param int $brandId
* @return array
*/
public function brand($brandId)
],
"id": 2631,
"isAdvance": "N",
"isAuditing": "Y",
"isDown": "N",
"isEdit": 1,
"isHot": "N",
"isJit": "N",
"isLimited": "N",
"isNew": "N",
"isOutlets": "N",
"isPromotion": 0,
"isRecommend": "N",
"isReplenishment": 0,
"isRetrieval": "N",
"isSales": "Y",
"isSpecial": "N",
"isCollect": "N",
"maxSortId": 1,
"middleSortId": 11,
"phrase": "以品牌字首R字母為设计重点,环绕式轮廓线营造渐层视觉 ",
"productName": "REVELATORTHER 短袖T恤",
"productPriceBo": {
"formatMarketPrice": "¥255.0",
"formatSalesPrice": "¥99.0",
"formatSpecialPrice": "¥99.0",
"marketPrice": 255,
"productId": 2631,
"salesPrice": 99,
"specialPrice": 99,
"vipPrice": "¥0.0",
"vipPrices": [
{
"vipLevel": 1,
"vipPrice": "¥94",
"vipTitle": "银卡"
},
{
"vipLevel": 2,
"vipPrice": "¥89",
"vipTitle": "金卡"
},
{
"vipLevel": 3,
"vipPrice": "¥87",
"vipTitle": "白金"
}
]
},
"productTagBoList": [
{
"tagLabel": "is_discount",
"tagValue": "Y"
},
{
"tagLabel": "is_soon_sold_out",
"tagValue": "Y"
}
/**
* 库存
*
* @param int $productId
* @return int
*/
public function storage($productId)
],
"promotionBoList": [
{
"promotionTitle": "【秋冬热促】满¥2188减¥800",
"promotionType": "满减"
},
{
"promotionTitle": "【秋冬热促】满¥1488减¥500",
"promotionType": "满减"
}
],
"consultBoWrapper": {
"consultBoList": [
{
"answer": "您好,我们会联系品牌尽快补货,目前没有办法给您确切的答复,建议您进行到货通知的登记,补货到了,会第一时间短信联系您的。感谢您对yoho!有货的关注。",
"answerTime": "2012-05-02 15:10:08",
"ask": "请问 这件的灰色的L码还会不会补货?",
"askTime": "2012-05-02 14:23:09",
"id": 68252
}
],
"consultTotal": 5
},
"commentBoWrapper": {
"commentBoList": [
{
"productId":"您好,我们会联系品牌尽快补货,目前没有办法给您确切的答复,建议您进行到货通知的登记,补货到了,会第一时间短信联系您的。感谢您对yoho!有货的关注。",
"id":"2012-05-02 15:10:08",
"uid":"请问 这件的灰色的L码还会不会补货?",
"content":"2012-05-02 14:23:09",
"createTime":"2012-05-02 14:23:09",
"sizeName":"L",
"colorName":"red",
"nickName":"xieyong",
"headIcon":"http://dddd"
}
],
"commentTotal": 5
},
"productUrl":"http://m.yohobuy.com/product/pro_2631_3241/REVELATORTHERDuanXiuTXu.html",
"salableTime": "0",
"salesPhrase": "",
"seasons": "summer",
"sellChannels": "0",
"seriesId": 0,
"shelveTime": 1325135169,
"shopId": 0,
"smallSortId": 114,
"sortId": 0,
"status": 1,
"storage": 0,
"style": "",
"supplierId": 0,
"vipDiscountType": 1
}', true);
return $data;
}
/**
* 尺码
* 商品尺码信息
*
* @param int $productSkn
* @return array
*/
public function size($productSkn)
public static function sizeInfo($productSkn)
{
$data = json_decode('{
"modelBos": [],
"null": false,
"productDescBo": {
"colorName": "灰色",
"erpProductId": "50002468",
"gender": 1,
"null": false,
"standardBos": []
},
"productExtra": {
"null": true
},
"productIntroBo": {
"productId": 10,
"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>"
},
"productMaterialList": [],
"sizeImage": "http://static.yohobuy.com/images/1.jpg",
"sizeInfoBo": {
"sizeAttributeBos": [
{
"attributeName": "后衣长",
"id": 49
},
{
"attributeName": "前衣长",
"id": 48
},
{
"attributeName": "袖长",
"id": 5
},
{
"attributeName": "胸围",
"id": 4
},
{
"attributeName": "肩宽",
"id": 3
},
{
"attributeName": "后中长",
"id": 1
}
],
"sizeBoList": [
{
"id": 201,
"sizeName": "L",
"sortAttributes": [
{
"id": 49,
"sizeValue": ""
},
{
"id": 48,
"sizeValue": ""
},
{
"id": 5,
"sizeValue": "64"
},
{
"id": 4,
"sizeValue": "108"
},
{
"id": 3,
"sizeValue": "49"
},
{
"id": 1,
"sizeValue": "67"
}
]
},
{
"id": 203,
"sizeName": "M",
"sortAttributes": [
{
"id": 5,
"sizeValue": "62"
},
{
"id": 4,
"sizeValue": "102"
},
{
"id": 3,
"sizeValue": "46"
},
{
"id": 1,
"sizeValue": "64"
},
{
"id": 49,
"sizeValue": ""
},
{
"id": 48,
"sizeValue": ""
}
]
}
]
},
"washTipsBoList": [
{
"caption": "不可转笼翻转干燥",
"img": "http://static.yohobuy.com/images/wash_2.png"
},
{
"caption": "30度水温弱速洗",
"img": "http://static.yohobuy.com/images/wash_3.png"
},
{
"caption": "分色洗涤",
"img": "http://static.yohobuy.com/images/wash_7.png"
}
]
}', true);
return $data;
}
}
... ...
/*
* @Description: dialog
* @Time: 2015/11/18
* @author: chenglong.wang
*/
var $ = require('jquery'),
Handlebars = require('yoho.handlebars'),
Hammer = require('yoho.hammer');
var dialogTpl,
dialogTemplate;
dialogTpl = '<div id="dialog-wrapper" class="dialog-wrapper">' +
'<div class="dialog-box">' +
'{{# hasHeader}}' +
'{{/ hasHeader}}' +
'<div class="dialog-content">{{dialogText}}</div>' +
'{{# hasFooter}}' +
'<div class="dialog-footer">' +
'{{# leftBtnText}}' +
'<span class="dialog-left-btn">{{.}}</span>' +
'{{/ leftBtnText}}' +
'{{# rightBtnText}}' +
'<span class="dialog-right-btn">{{.}}</span>' +
'{{/ rightBtnText}}' +
'</div>' +
'{{/ hasFooter}}' +
'</div>' +
'</div>';
dialogTemplate = Handlebars.compile(dialogTpl);
exports.showDialog = function(data, callback) {
var dialogStr = dialogTemplate(data),
$dialogBox,
$dialogWrapper,
dialogWrapperHammer;
$('.dialog-wrapper').remove();
$('body').append($(dialogStr));
$dialogBox = $('.dialog-box');
$dialogWrapper = $('.dialog-wrapper');
dialogWrapperHammer = new Hammer(document.getElementById('dialog-wrapper'));
// 显示
if (data.fast) {
$dialogWrapper.css({
display: 'block'
});
} else {
$dialogWrapper.fadeIn();
}
$dialogBox.css({
top: '50%',
marginTop: -($dialogBox.height() / 2)
});
//隐藏
if (data.autoHide) {
setTimeout(function() {
$dialogWrapper.fadeOut();
}, 1000);
}
dialogWrapperHammer.on('tap', function(event) {
if ($(event.target).hasClass('dialog-left-btn')) {
$dialogWrapper.fadeOut();
} else if ($(event.target).hasClass('dialog-right-btn')) {
callback();
}
});
};
\ No newline at end of file
... ...
... ... @@ -8,32 +8,24 @@ var $ = require('jquery'),
Hammer = require('yoho.hammer'),
Swiper = require('yoho.iswiper');
var diaLog = require('./dialog');
var $navLi = $('#fav-tab > li'),
$favContainer = $('.fav-content'),
$curContainer = $favContainer.children('.fav-type').first(),
$favContainer = $('.fav-content > .fav-type'),
$swiperList = $('.swiper-container'),
swiperObj = {},
favTabHammer,
favContentHammer;
favTabHammer = new Hammer(document.getElementById('fav-tab'));
favTabHammer.on('tap', function(e) {
var $cur = $(e.target).closest('li'),
index,
id,
i;
if ($cur.length === 0 || $cur.hasClass('active')) {
return;
}
index = $cur.index();
function showFavTab(index) {
var i,
id;
$navLi.filter('.active').removeClass('active');
$cur.addClass('active');
$navLi.eq(index).addClass('active');
$curContainer.addClass('hide');
$curContainer = $favContainer.children(':eq(' + index + ')').removeClass('hide');
$favContainer.filter('.show').removeClass('show');
$favContainer.eq(index).addClass('show');
if (index === 1) {
... ... @@ -51,16 +43,46 @@ favTabHammer.on('tap', function(e) {
}
}
}
// 如果从品牌收藏入口进入
if ($('#fav-tab').hasClass('brand-tab')) {
showFavTab(1);
} else {
showFavTab(0);
}
favTabHammer = new Hammer(document.getElementById('fav-tab'));
favTabHammer.on('tap', function(e) {
var $cur = $(e.target).closest('li'),
index;
if ($cur.length === 0 || $cur.hasClass('active')) {
return;
}
index = $cur.index();
showFavTab(index);
});
//删除收藏的商品
favContentHammer = new Hammer(document.getElementById('fav-content'));
favContentHammer.on('tap', function (e) {
favContentHammer.on('tap', function(e) {
var id = '';
if (!$(e.target).hasClass('del-fav')) {
return;
}
if ($(e.target).hasClass('del-fav')) {
diaLog.showDialog({
dialogText: '您确定要取消收藏吗?',
hasFooter: {
leftBtnText: '取消',
rightBtnText: '确定'
}
}, function() {
id = $(e.target).closest('li').attr('data-id');
$.ajax({
method: 'post',
... ... @@ -68,15 +90,31 @@ favContentHammer.on('tap', function (e) {
data: {
id: id
}
}).then(function (data) {
}).then(function(data) {
if (data.code === 200) {
diaLog.showDialog({
autoHide: true,
fast: true,
dialogText: '已经取消收藏'
});
$(e.target).closest('li').remove();
} else if (data.code === 400) {
diaLog.showDialog({
autoHide: true,
fast: true,
dialogText: data.message
});
} else {
diaLog.showDialog({
autoHide: true,
fast: true,
dialogText: '取消收藏失败'
});
}
}).fail(function () {
}).fail(function() {
//TODO
});
}
});
});
\ No newline at end of file
... ...
... ... @@ -9,13 +9,23 @@ var $ = require('jquery'),
Hammer = require('yoho.hammer'),
Handlebars = require('yoho.handlebars');
var diaLog = require('./dialog');
var $uploadImgList = $('.upload-img-list'),
headerNavHammer,
imgTpl,
template;
imgTemplate,
$likeBtn = $('.suggest-item .like-btn'),
$disLikeBtn = $('.suggest-item .dislike-btn');
require('./jquery.uploadifive');
imgTpl = '{{# imgList}}' +
'<li><img src="{{imgUrl}}" /></li>' +
'{{/ imgList}}';
imgTemplate = Handlebars.compile(imgTpl);
$('#upload-img').uploadifive({
auto: true,
fileType: 'image*/*',
... ... @@ -24,25 +34,19 @@ $('#upload-img').uploadifive({
fileSizeLimit: 1024,
height: '100%',
width: '100%',
onAddQueueItem: function (files) {
onAddQueueItem: function(files) {
//TODO
},
onUploadComplete: function (file, data) {
$uploadImgList.html(template(data));
onUploadComplete: function(file, data) {
$uploadImgList.html(imgTemplate(JSON.parse(data)));
}
});
imgTpl = '{{# imgList}}' +
'<li><img src="{{imgUrl}}" /></li>' +
'{{/ imgList}}';
template = Handlebars.compile(imgTpl);
headerNavHammer = new Hammer(document.getElementById('yoho-header'));
headerNavHammer.on('tap', function (e) {
headerNavHammer.on('tap', function(e) {
var suggestText = $('#suggest-textarea').val();
... ... @@ -54,12 +58,65 @@ headerNavHammer.on('tap', function (e) {
data: {
content: suggestText
}
}).then(function (data) {
//TODO
}).fail(function () {
}).then(function(data) {
if (data.code === 200) {
diaLog.showDialog({
autoHide: true,
dialogText: '提交成功'
});
}
}).fail(function() {
//TODO
});
}
});
// 点赞与取消点赞
// suggestContentHammer = new Hammer(document.getElementById('suggest-content'));
$likeBtn.bind('click', function() {
var id = $(this).closest('.suggest-item').attr('data-id'),
$that = $(this);
$.ajax({
method: 'post',
url: '/home/upAndDown',
data: {
suggest_id: id
}
}).then(function(data) {
if (data.code === 200) {
if ($that.hasClass('active')) {
$that.closest('.suggest-type').removeClass('active')
.prev('.suggest-type').addClass('active');
} else {
$that.closest('.suggest-type').addClass('active')
.next('.suggest-type').removeClass('active');
}
}
}).fail(function(data) {
//TODO
});
});
$disLikeBtn.bind('click', function() {
var id = $(this).closest('.suggest-item').attr('data-id'),
$that = $(this);
$.ajax({
method: 'post',
url: '/home/upAndDown',
data: {
suggest_id: id
}
}).then(function(data) {
if (data.code === 200) {
$that.toggleClass('active');
}
}).fail(function(data) {
//TODO
});
});
\ No newline at end of file
... ...
... ... @@ -63,9 +63,6 @@ a {
.hide {
display: none;
}
#show {
display: block;
}
.overflow-hidden {
overflow: hidden;
... ...
... ... @@ -43,6 +43,13 @@
.fav-content {
//padding: 0 pxToRem(30px);
.fav-type {
display: none;
}
.show {
display: block;
}
.fav-null {
font-size: pxToRem(22px);
color: #444;
... ...
... ... @@ -74,26 +74,26 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px);
padding-left: pxToRem(128px);
@include box-sizing();
&.active {
color: #444;
&:nth-last-of-type(1) {
padding-left: pxToRem(0);
padding-right: pxToRem(128px);
text-align: right;
float: right;
> span {
display: inline-block;
height: 100%;
overflow: hidden;
&:nth-of-type(1) {
@include rotate(180deg);
@include transition(transform .5);
}
}
}
&:nth-last-of-type(1) {
padding-left: pxToRem(0);
padding-right: pxToRem(128px);
text-align: right;
float: right;
&.active {
color: #444;
}
}
... ... @@ -101,6 +101,9 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px);
text-align: center;
color: #444;
}
&.show {
display: block;
}
}
}
}
... ... @@ -219,4 +222,50 @@ $suggest: sprite-map("me/suggest/*.png",$spacing: 5px);
}
}
}
}
//dialog
.dialog-wrapper {
background: hsla(0, 0%, 0%, .5);
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
display: none;
.dialog-box {
width: pxToRem(540px);
@include border-radius(pxToRem(20px));
background: hsla(100, 100%, 100%, .8);
position: absolute;
left: 50%;
margin-left: pxToRem(-540px)/2;
font-size: pxToRem(30px);
text-align: center;
color: #000;
}
.dialog-content {
padding: pxToRem(60px) pxToRem(30px);
}
.dialog-footer {
border-top: 1px solid #ccc;
height: pxToRem(88px);
line-height: pxToRem(88px);
> span {
display: block;
width: 50%;
height: 100%;
float: left;
@include box-sizing();
&:nth-last-of-type(1) {
border-left: 1px solid #ccc;
color: #ee0011;
}
}
}
}
\ No newline at end of file
... ...
{{> layout/header}}
<div class="yoho-favorite-page yoho-page">
{{# favorite}}
<ul id="fav-tab" class="fav-tab">
<li class="active">收藏的商品</li>
<ul id="fav-tab" class="fav-tab {{# brandTab}}brand-tab{{/ brandTab}}">
<li>收藏的商品</li>
<li>收藏的品牌</li>
</ul>
<div class="fav-content" id="fav-content">
... ... @@ -48,7 +48,7 @@
<a class="go-shopping" href="#">随便逛逛</a>
{{/ hasFavProduct}}
</div>
<div class="fav-type hide">
<div class="fav-type">
{{# hasFavBrand}}
<div class="fav-brand-swiper">
<div class="swiper-header">
... ...
... ... @@ -8,25 +8,23 @@
<div class="suggest-content" id="suggest-content">
{{# suggestContent}}
<div class="suggest-item">
<div class="suggest-item" data-id="{{suggest_id}}">
<img src="{{imgUrl}}" alt=""/>
<h2>{{title}}</h2>
<p>{{content}}</p>
<!--bad传true表示点了不靠谱,false表示没有任何动作-->
<!--good传true表示点了靠谱,false表示没有任何动作-->
<div id="{{^ good}}show{{/ good}}" class="suggest-type">
<div>
<div class="suggest-type {{^ good}}show{{/ good}}">
<div class="like-btn">
<span class="iconfont">&#xe601;</span>
<span>靠谱</span>
</div>
<div class="{{# bad}}active{{/ bad}}">
<div class="dislike-btn {{# bad}}active{{/ bad}}">
<span class="iconfont">&#xe601;</span>
<span>不靠谱</span>
</div>
</div>
<div id="{{# good}}show{{/ good}}" class="suggest-type active">
<div class="like-btn active suggest-type {{# good}}show{{/ good}}">
<span class="iconfont">&#xe601;</span>
<span>靠谱,谢谢您的反馈</span>
</div>
... ...
<?php
namespace Product;
use LibModels\Wap\Product\DetailData;
use Plugin\Helpers;
/**
* 商品详情页模板相关的数据模型
*
* @name DetailModel
* @package Product
* @copyright yoho.inc
* @version 1.0 (2015-11-19 10:49:36)
* @author fei.hong <fei.hong@yoho.cn>
*/
class DetailModel
{
/**
* 商品基本信息
*
* @param int $productId 商品ID
* @param int $goodsId 某个颜色的商品
* @param int $uid 当前登录用户ID, 未登录为0
* @return array
*/
public static function getBaseInfo($productId, $goodsId, $uid)
{
$result = array();
if (is_numeric($productId) && is_numeric($goodsId)) {
// 调用接口
$baseInfo = DetailData::baseInfo($productId, $uid);
// 商品名称
if (isset($baseInfo['productName'])) {
$result['goodsName'] = $baseInfo['productName'];
}
// 商品价格
if (isset($baseInfo['productPriceBo'])) {
$result['goodsPrice'] = array();
$result['goodsPrice']['currentPrice'] = $baseInfo['productPriceBo']['formatSalesPrice'];
if ($baseInfo['productPriceBo']['formatMarketPrice'] !== $baseInfo['productPriceBo']['formatSalesPrice']) {
$result['goodsPrice']['previousPrice'] = $baseInfo['productPriceBo']['formatMarketPrice'];
}
}
// VIP商品价格
if (isset($baseInfo['productPriceBo']['vipPrices'])) {
$build = array();
foreach ($baseInfo['productPriceBo']['vipPrices'] as $value) {
$build['level'] = $value['vipLevel'];
$build['text'] = $value['vipPrice'];
$result['vipLevel']['list'][] = $build;
}
}
// 上市期
if (isset($baseInfo['expectArrivalTime'])) {
$result['periodOfMarket'] = date('n', $baseInfo['firstShelveTime']) . '月';
}
// 促销信息
if (isset($baseInfo['promotionBoList'])) {
$build = array();
foreach ($baseInfo['promotionBoList'] as $value) {
$build['title'] = $value['promotionTitle'];
$build['type'] = $value['promotionType'];
$result['goodsDiscount']['list'][] = $build;
}
}
// 商品咨询和商品评价
$result['feedbacks'] = array();
if (!empty($baseInfo['consultBoWrapper'])) {
$result['feedbacks']['consultNum'] = $baseInfo['consultBoWrapper']['consultTotal'];
$result['feedbacks']['consults'] = array();
$build = array();
foreach ($baseInfo['consultBoWrapper']['consultBoList'] as $value) {
$build['question'] = $value['ask'];
$build['time'] = $value['askTime'];
$build['answer'] = $value['answer'];
$result['feedbacks']['consults'][] = $build;
}
}
if (!empty($baseInfo['commentBoWrapper'])) {
$result['feedbacks']['commentNum'] = $baseInfo['commentBoWrapper']['commentTotal'];
$result['feedbacks']['comments'] = array();
$build = array();
foreach ($baseInfo['commentBoWrapper']['commentBoList'] as $value) {
$build['userName'] = $value['nickName'];
$build['desc'] = $value['colorName'] . $value['sizeName'];
$build['content'] = $value['content'];
$build['time'] = $value['createTime'];
$result['feedbacks']['comments'][] = $build;
}
}
// 品牌信息
if (!empty($baseInfo['brand'])) {
$result['enterStore'] = array(
'img' => Helpers::getImageUrl($baseInfo['brand']['brandIco'], 47, 47),
'storeName' => $baseInfo['brand']['brandName'],
'url' => Helpers::url('', array(), $baseInfo['brand']['brandDomain'])
);
}
// 商品信息
if (!empty($baseInfo['goodsList'])) {
$colorGroup = array();
$sizeGroup = array();
$goodsList = array();
$goodsGroup = array();
$colorId = 0;
foreach ($baseInfo['goodsList'] as $value) {
$colorId = intval($value['colorId']);
// 商品按颜色进行分类分组
foreach ($value['goodsImagesList'] as $goods) {
$goodsList[ $goods['goodsId'] ] = $colorId;
$goodsGroup[$colorId][] = array(
'goodsId' => $goods['goodsId'],
'img' => $goods['imageUrl'],
);
$colorGroup[$colorId] = array(
'colorId' => $colorId,
'colorName' => $value['colorName'],
'colorImage' => Helpers::getImageUrl($value['colorImage'], 60, 60),
);
}
// 商品的尺码列表
foreach ($value['goodsSizeBoList'] as $size) {
$sizeGroup[ $colorId ] = array(
'sizeName' => $size['sizeName'],
'sizeSku' => $size['goodsSizeSkuId'],
'sizeStorage' => $size['goodsSizeStorageNum'],
);
}
}
// 商品图
$goodsId = intval($goodsId);
if (isset($goodsList[$goodsId])) {
$colorId = $goodsList[$goodsId];
// 多个
if (isset($goodsGroup[$colorId][1])) {
foreach ($goodsGroup[$colorId] as $value) {
$result['bannerTop']['list'][] = array(
'img' => Helpers::getImageUrl($value['img'], 450, 600)
);
}
}
// 单个
elseif (isset($goodsGroup[$colorId][0])) {
$result['bannerTop'] = array(
'img' => Helpers::getImageUrl($goodsGroup[$colorId][0]['img'], 450, 600)
);
}
}
}
// 调用尺码需要的SKN号
if (isset($baseInfo['erpProductId'])) {
$result['skn'] = $baseInfo['erpProductId'];
}
}
return $result;
}
/**
* 商品尺码信息
*
* @param int $productSkn
* @return array
*/
public static function getSizeInfo($productSkn)
{
$sizeInfo = DetailData::sizeInfo($productSkn);
var_dump($sizeInfo);
}
}
... ...
... ... @@ -3,6 +3,7 @@
use Action\AbstractAction;
use LibModels\Wap\Guang\PlusstarData;
use Plugin\Helpers;
use Plugin\Images;
/**
* 明星品牌和原创品牌
... ... @@ -131,7 +132,7 @@ class PlusstarController extends AbstractAction
$data['psDetail'] = true;
$data['ps']['id'] = $brandId;
$data['ps']['banner'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['cover_img'], 640, 309);
$data['ps']['logo'] = Helpers::getImageUrl($brandInfo['getBrandInfo']['data']['brand_ico'], 160, 160);
$data['ps']['logo'] = Images::getSourceUrl($brandInfo['getBrandInfo']['data']['brand_ico'],'brandLogo');
$data['ps']['name'] = $brandInfo['getBrandInfo']['data']['brand_name'];
$data['ps']['isLike'] = $brandInfo['getUidBrandFav'];
$data['ps']['intro'] = empty($brandInfo['getBrandInfo']['data']['brand_intro']) ? false : strtr(strip_tags($brandInfo['getBrandInfo']['data']['brand_intro']), array('&nbsp;' => ' '));
... ...
<?php
use Action\AbstractAction;
/**
... ... @@ -6,345 +7,352 @@ use Action\AbstractAction;
*/
class DetailController extends AbstractAction
{
/**
* 商品详情
*
* @param
* @param int productId
* @param int goodsId
*/
public function indexAction()
{
$data = array (
'goodsDetailPage' => true,
'pageHeader' => array (
{
$productId = $this->param('productId', 123);
$goodsId = $this->param('goodsId', 3241);
$uid = $this->getUid();
$data = \Product\DetailModel::getBaseInfo($productId, $goodsId, $uid);
$data['goodsDetailPage'] = true;
if (isset($data['goodsName'])) {
$this->setTitle($data['goodsName']);
}
$this->setNavHeader('商品详情');
// $data = array (
// 'goodsDetailPage' => true,
// 'pageHeader' => array (
// 'navBack' => 'sss ',
// 'navHome' => 'sss ',
// 'navTitle' => '商品详情TEST'
// ),
//
// 'bannerTop' => array (
// 'list' => array (
// array (
// 'url' => '',
// 'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/10/18/03/0250c3935f86dbd2baa7d45603d19fd637.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
// ),
// array (
// 'url' => '',
// 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01bf4cf4444035a1930d33a9d0f8bff4fa.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
// ),
// array (
// 'url' => '',
// 'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01d7ef2f624eeea15e80bb374607aea317.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
// )
// )
// ),
// 'goodsName' => 'Stussy No. 4 BOX TEE DC SPAR HIGH WC
//SHOE BQT KEN BLOCK',
// 'goodsSubtitle'=>'【全民拼抢购】经典印花T恤,满4件免一件!全场低至
//9.9元,拼购时代High起来。',
//
// 'goodsPrice' =>array(
// 'currentPrice'=>'¥298.00',
// 'previousPrice'=>'¥598.00'
// ),
// 'periodOfMarket'=>'11月',
// 'goodsTitle' => '¥298.00',
// 'vipLevel' => array (
// 'list' => array (
// array (
// 'img'=>'http://static.dev.yohobuy.com/img/product/silver.png',
// 'text' => '¥284.00'
// ),
// array (
// 'img'=>'http://static.dev.yohobuy.com/img/product/golden.png',
// 'text' => '¥269.00'
// ),
// array (
// 'img'=>'http://static.dev.yohobuy.com/img/product/platinum.png',
// 'text' => '¥263.00'
// )
// )
// ),
// 'goodsDiscount'=>array(
// 'list'=>array(
// '【summer final sale】满¥499立享6.8折',
// '【BACK TO SCHOOL】满¥499赠送Paul
// Franke帽子一个,多买多送!',
// '【BACK TO SCHOOL】满¥499赠送Paul
// Franke帽子一个,多买多送!'
// )
// ),
// 'feedbacks'=>array(
// 'commentsNum'=>0,
// 'consultsNum'=>1,
// // 'commentName'=>'商品评价',
// // 'consultName' =>'购买咨询',
// 'link'=>'',
// 'comments'=>array(
// array(
// 'userName'=>'Lynnic',
// 'desc'=>'购买了白色Mate7',
// 'content'=>'活动时买的,挺超值。上身效果也不错。质量
//很好,买送人的,很满意。而且物流相当给...',
// 'time'=>'2014-08-12 10:24:26'
// )
// ),
// 'consults'=>array(
// array(
// 'question' =>'您好 我一米七七 140斤 穿M的行吗',
// 'time'=>'2014-08-12 10:24:26',
// 'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
// )
// )
// ),
//
// 'enterStore'=>array(
// 'img'=>'http://static.dev.yohobuy.com/img/product/store.png',
// 'storeName'=>'Stussy',
// 'url'=>'http://stussy.m.yohobuy.com/'
// ),
//
// 'goodsDescription'=>array(
// 'title' =>'商品描述',
// 'enTitle'=>'DESCRIPTON',
//
// 'detail'=>array(
// 'nubmer' =>'51018059',
// 'color' =>'黑',
// 'type' =>'帽子',
// 'gender' =>'女款',
// 'hatType' =>'棒球帽',
// 'bongrace' =>'平檐款式',
// 'goodsDetail'=>'字母图案',
// 'style'=>'街头'
// )
// ),
//
// 'sizeInfo'=>array(
// 'title' => '尺码信息',
// 'enTitle' =>'xSIZE INFO',
//
// 'detail' =>array(
// 'list'=>array(
// array(
// 'name'=>'尺寸',
// 'sizem'=>'m',
// 'sizexl' =>'XL'
// ),
// array(
// 'name'=>'肩宽',
// 'sizem'=>'43',
// 'sizexl' =>'46'
// ),
// array(
// 'name'=>'衣长',
// 'sizem'=>'102',
// 'sizexl' =>'106'
// ),
// array(
// 'name'=>'肩宽',
// 'sizem'=>'90',
// 'sizexl' =>'96'
// ),
// array(
// 'name'=>'胸围',
// 'sizem'=>'90',
// 'sizexl' =>'96'
// ),
// array(
// 'name'=>'xx',
// 'sizem'=>'xx',
// 'sizexl' =>'xx'
// )
// )
// )
// ),
//
// 'measurementMethod'=>array(
// 'title' => '测量方式',
// 'enTitle' =>'MEASUREMENT METHOD',
//
// 'detail'=>array(
// 'sort' =>'上衣' ,
// 'enSort'=>'TOPS',
// 'img' =>'http://static.dev.yohobuy.com/img/product/tops.png',
// 'items'=>array(
// '肩宽(两端肩线间的直线长度)',
// '胸围(两端肩线间的直线长度)',
// '肩宽(两端肩线间的直线长度)',
// '肩宽(两端肩线间的直线长度)',
// '肩宽(两端肩线间的直线长度)',
// '肩宽(两端肩线间的直线长度)'
// )
// )
// ),
//
// 'reference' => array(
// 'title' => '模特试穿',
// 'enTitle' =>'REFERENCE',
//
// 'detail' =>array(
// 'list'=>array(
// array(
// 'fieldName'=>'1 ',
// 'firstModel'=>'http://static.dev.yohobuy.com/img/product/avatar1.png',
// 'secondModel' =>'http://static.dev.yohobuy.com/img/product/avatar2.png'
// ),
// array(
// 'fieldName'=>'模特',
// 'firstModel'=>'Oliver',
// 'secondModel' =>'Jvly'
// ),
// array(
// 'fieldName'=>'身高',
// 'firstModel'=>'175',
// 'secondModel' =>'170'
// ),
// array(
// 'fieldName'=>'体重',
// 'firstModel'=>'53',
// 'secondModel' =>'59'
// ),
// array(
// 'fieldName'=>'三围',
// 'firstModel'=>'78/70/87',
// 'secondModel' =>'78/70/87'
// ),
// array(
// 'fieldName'=>'吊牌尺',
// 'firstModel'=>'S',
// 'secondModel' =>'L'
// )
// )
// )
// ),
//
// 'materials' => array(
// 'title' => '商品材质',
// 'enTitle' =>'MATERIALS',
// 'img' => 'http://static.dev.yohobuy.com/img/product/material.png',
// 'desc' =>'用各种洗涤剂,可手洗机洗,但不宜氯漂,宜阴干,避免曝晒,以免深色衣物褪色,在日光下晾晒时,将里面朝外。浸泡时间不能太长,避免褪色,深色与浅色衣服最好请分开洗涤,避免染色。',
// 'materialType'=>'http://static.dev.yohobuy.com/img/product/material-type.png'
// ),
//
// 'productDetail' =>array(
// 'title' => '商品详情',
// 'enTitle' =>'DETAILS',
// 'desc' => 'Married to the MOB是由Leah McSweeney创立的女装品牌,一向标榜不羁、大胆的女性streetwear设计。喜欢恶搞的女生们,赶紧入手吧。',
// 'img' =>'http://static.dev.yohobuy.com/img/product/product.png'
// ),
//
// 'cartInfo' =>array(
// 'numInCart' => 3,
// 'goodsInstore'=>0
// )
//
// );
// 渲染模板
$this->_view->display('index', $data);
}
public function commentsAction()
{
$data = array(
'goodsCommentsPage' => true,
'pageHeader' => array(
'navBack' => 'sss ',
'navHome' => 'sss ',
'navTitle' => '商品详情TEST'
// 'navHome' => 'sss ',
'navTitle' => '购买评价(6)'
),
'bannerTop' => array (
'list' => array (
array (
'url' => '',
'img' => 'http://img13.static.yhbimg.com/goodsimg/2015/10/18/03/0250c3935f86dbd2baa7d45603d19fd637.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
'pageFooter' => true,
'comments' => array(
'list' => array(
array(
'userName' => 'Lynnic',
'desc' => '购买了白色Mate7',
'content' => '活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time' => '2014-08-12 10:24:26'
),
array (
'url' => '',
'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01bf4cf4444035a1930d33a9d0f8bff4fa.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
array(
'userName' => 'Lynnic',
'desc' => '购买了白色Mate7',
'content' => '活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time' => '2014-08-12 10:24:26'
),
array (
'url' => '',
'img' => 'http://img11.static.yhbimg.com/goodsimg/2015/10/12/03/01d7ef2f624eeea15e80bb374607aea317.jpg?imageMogr2/thumbnail/450x600/extent/450x600/background/d2hpdGU=/position/center/quality/90'
array(
'userName' => 'Lynnic',
'desc' => '购买了白色Mate7',
'content' => '活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time' => '2014-08-12 10:24:26'
)
)
),
'goodsName' => 'Stussy No. 4 BOX TEE DC SPAR HIGH WC
SHOE BQT KEN BLOCK',
'goodsSubtitle'=>'【全民拼抢购】经典印花T恤,满4件免一件!全场低至
9.9元,拼购时代High起来。',
);
'goodsPrice' =>array(
'currentPrice'=>'¥298.00',
'previousPrice'=>'¥598.00'
),
'periodOfMarket'=>'11月',
'goodsTitle' => '¥298.00',
'vipLevel' => array (
'list' => array (
array (
'img'=>'http://static.dev.yohobuy.com/img/product/silver.png',
'text' => '¥284.00'
),
array (
'img'=>'http://static.dev.yohobuy.com/img/product/golden.png',
'text' => '¥269.00'
),
array (
'img'=>'http://static.dev.yohobuy.com/img/product/platinum.png',
'text' => '¥263.00'
)
)
$this->_view->assign('title', '购买评价');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('comments', $data);
}
public function consultsAction()
{
$data = array(
'goodsConsultsPage' => true,
'pageHeader' => array(
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '购买咨询(6)'
),
'goodsDiscount'=>array(
'list'=>array(
'【summer final sale】满¥499立享6.8折',
'【BACK TO SCHOOL】满¥499赠送Paul
Franke帽子一个,多买多送!',
'【BACK TO SCHOOL】满¥499赠送Paul
Franke帽子一个,多买多送!'
)
),
'feedbacks'=>array(
'commentsNum'=>0,
'consultsNum'=>0,
// 'commentName'=>'商品评价',
// 'consultName' =>'购买咨询',
'link'=>'',
'comments'=>array(
array(
'userName'=>'Lynnic',
'desc'=>'购买了白色Mate7',
'content'=>'活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time'=>'2014-08-12 10:24:26'
)
'pageFooter' => true,
'consults' => array(
'list' => array(
array(
'question' => '您好 我一米七七 140斤 穿M的行吗',
'time' => '2014-08-12 10:24:26',
'answer' => '您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
),
'consults'=>array(
array(
'question' =>'您好 我一米七七 140斤 穿M的行吗',
'time'=>'2014-08-12 10:24:26',
'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
)
'question' => '您好 我一米七七 140斤 穿M的行吗',
'time' => '2014-08-12 10:24:26',
'answer' => '您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
),
array(
'question' => '您好 我一米七七 140斤 穿M的行吗',
'time' => '2014-08-12 10:24:26',
'answer' => '您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
)
),
'enterStore'=>array(
'img'=>'http://static.dev.yohobuy.com/img/product/store.png',
'storeName'=>'Stussy',
'url'=>'http://stussy.m.yohobuy.com/'
),
'goodsDescription'=>array(
'title' =>'商品描述',
'enTitle'=>'DESCRIPTON',
'detail'=>array(
'nubmer' =>'51018059',
'color' =>'黑',
'type' =>'帽子',
'gender' =>'女款',
'hatType' =>'棒球帽',
'bongrace' =>'平檐款式',
'goodsDetail'=>'字母图案',
'style'=>'街头'
)
),
'sizeInfo'=>array(
'title' => '尺码信息',
'enTitle' =>'xSIZE INFO',
'detail' =>array(
'list'=>array(
array(
'name'=>'尺寸',
'sizem'=>'m',
'sizexl' =>'XL'
),
array(
'name'=>'肩宽',
'sizem'=>'43',
'sizexl' =>'46'
),
array(
'name'=>'衣长',
'sizem'=>'102',
'sizexl' =>'106'
),
array(
'name'=>'肩宽',
'sizem'=>'90',
'sizexl' =>'96'
),
array(
'name'=>'胸围',
'sizem'=>'90',
'sizexl' =>'96'
),
array(
'name'=>'xx',
'sizem'=>'xx',
'sizexl' =>'xx'
)
)
)
)
),
'measurementMethod'=>array(
'title' => '测量方式',
'enTitle' =>'MEASUREMENT METHOD',
'detail'=>array(
'sort' =>'上衣' ,
'enSort'=>'TOPS',
'img' =>'http://static.dev.yohobuy.com/img/product/tops.png',
'items'=>array(
'肩宽(两端肩线间的直线长度)',
'胸围(两端肩线间的直线长度)',
'肩宽(两端肩线间的直线长度)',
'肩宽(两端肩线间的直线长度)',
'肩宽(两端肩线间的直线长度)',
'肩宽(两端肩线间的直线长度)'
)
)
),
'reference' => array(
'title' => '模特试穿',
'enTitle' =>'REFERENCE',
'detail' =>array(
'list'=>array(
array(
'fieldName'=>'1 ',
'firstModel'=>'http://static.dev.yohobuy.com/img/product/avatar1.png',
'secondModel' =>'http://static.dev.yohobuy.com/img/product/avatar2.png'
),
array(
'fieldName'=>'模特',
'firstModel'=>'Oliver',
'secondModel' =>'Jvly'
),
array(
'fieldName'=>'身高',
'firstModel'=>'175',
'secondModel' =>'170'
),
array(
'fieldName'=>'体重',
'firstModel'=>'53',
'secondModel' =>'59'
),
array(
'fieldName'=>'三围',
'firstModel'=>'78/70/87',
'secondModel' =>'78/70/87'
),
array(
'fieldName'=>'吊牌尺',
'firstModel'=>'S',
'secondModel' =>'L'
)
)
)
),
'materials' => array(
'title' => '商品材质',
'enTitle' =>'MATERIALS',
'img' => 'http://static.dev.yohobuy.com/img/product/material.png',
'desc' =>'用各种洗涤剂,可手洗机洗,但不宜氯漂,宜阴干,避免曝晒,以免深色衣物褪色,在日光下晾晒时,将里面朝外。浸泡时间不能太长,避免褪色,深色与浅色衣服最好请分开洗涤,避免染色。',
'materialType'=>'http://static.dev.yohobuy.com/img/product/material-type.png'
),
'productDetail' =>array(
'title' => '商品详情',
'enTitle' =>'DETAILS',
'desc' => 'Married to the MOB是由Leah McSweeney创立的女装品牌,一向标榜不羁、大胆的女性streetwear设计。喜欢恶搞的女生们,赶紧入手吧。',
'img' =>'http://static.dev.yohobuy.com/img/product/product.png'
),
'cartInfo' =>array(
'numInCart' => 3,
'goodsInstore'=>0
)
);
$this->_view->assign('title', '商品详情');
// $this->_view->display('brand', compact('brands'));
$this->_view->assign('title', '购买咨询');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('index', $data);
$this->_view->display('consults', $data);
}
public function commentsAction(){
$data = array(
'goodsCommentsPage' =>true,
'pageHeader' => array (
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '购买评价(6)'
),
'pageFooter' => true,
'comments'=>array(
'list' =>array(
array(
'userName'=>'Lynnic',
'desc'=>'购买了白色Mate7',
'content'=>'活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time'=>'2014-08-12 10:24:26'
),
array(
'userName'=>'Lynnic',
'desc'=>'购买了白色Mate7',
'content'=>'活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time'=>'2014-08-12 10:24:26'
),
array(
'userName'=>'Lynnic',
'desc'=>'购买了白色Mate7',
'content'=>'活动时买的,挺超值。上身效果也不错。质量
很好,买送人的,很满意。而且物流相当给...',
'time'=>'2014-08-12 10:24:26'
)
)
),
);
$this->_view->assign('title', '购买评价');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('comments', $data);
}
public function consultsAction(){
$data = array(
'goodsConsultsPage' =>true,
'pageHeader' => array (
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '购买咨询(6)'
),
'pageFooter' => true,
'consults'=>array(
'list' =>array(
array(
'question' =>'您好 我一米七七 140斤 穿M的行吗',
'time'=>'2014-08-12 10:24:26',
'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
),
array(
'question' =>'您好 我一米七七 140斤 穿M的行吗',
'time'=>'2014-08-12 10:24:26',
'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
),
array(
'question' =>'您好 我一米七七 140斤 穿M的行吗',
'time'=>'2014-08-12 10:24:26',
'answer'=>'您好,建议您参考XL的款式,由于版型和个人穿衣风格不同,需要'
)
)
),
);
$this->_view->assign('title', '购买咨询');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('consults', $data);
}
public function consultformAction(){
$data = array(
'consultform' =>true,
'pageHeader' => array (
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '我要咨询'
)
);
public function consultformAction()
{
$data = array(
'consultform' => true,
'pageHeader' => array(
'navBack' => 'sss ',
// 'navHome' => 'sss ',
'navTitle' => '我要咨询'
)
);
$this->_view->assign('title', '我要咨询');
//$this->_view->display('brand', compact('brands'));
$this->_view->assign('title', '我要咨询');
//$this->_view->display('brand', compact('brands'));
// 渲染模板
$this->_view->display('consultform', $data);
}
// 渲染模板
$this->_view->display('consultform', $data);
}
}
\ No newline at end of file
}
... ...
... ... @@ -3,4 +3,20 @@ routes.goodsfilter.type = "rewrite"
routes.goodsfilter.match = "/search/filter"
routes.goodsfilter.route.module = Index
routes.goodsfilter.route.controller = Search
routes.goodsfilter.route.action = Filter
\ No newline at end of file
routes.goodsfilter.route.action = Filter
routes.product.type = "regex"
routes.product.match = "#/product/pro_([0-9]+)_([0-9]+)/(.*)#"
routes.product.route.module = Product
routes.product.route.controller = Detail
routes.product.route.action = Index
routes.product.map.1 = productId
routes.product.map.2 = goodsId
routes.buy.type = "regex"
routes.buy.match = "#/product/buy_([0-9]+)_([0-9]+).html#"
routes.buy.route.module = Product
routes.buy.route.controller = Detail
routes.buy.route.action = Index
routes.buy.map.1 = productId
routes.buy.map.2 = goodsId
\ No newline at end of file
... ...