...
|
...
|
@@ -5,240 +5,244 @@ |
|
|
*/
|
|
|
'use strict';
|
|
|
|
|
|
const index = (req, res) => {
|
|
|
let data = {
|
|
|
brandBanner: {
|
|
|
bgColor: '#93897d',
|
|
|
brandLogo: {
|
|
|
link: '#',
|
|
|
img: 'http://placehold.it/{width}x{height}'
|
|
|
},
|
|
|
brandHome: {
|
|
|
link: '#'
|
|
|
}
|
|
|
},
|
|
|
nav: [
|
|
|
{
|
|
|
link: '#',
|
|
|
name: 'MEN首页'
|
|
|
},
|
|
|
{
|
|
|
link: '#',
|
|
|
name: '上衣'
|
|
|
},
|
|
|
{
|
|
|
link: '#',
|
|
|
name: '卫衣'
|
|
|
},
|
|
|
{
|
|
|
name: 'Spring 2016NEWT-Shirt 2016迷彩蝴蝶夹克'
|
|
|
}
|
|
|
],
|
|
|
goodInfo: {
|
|
|
name: 'Spring 2016NEWT-Shirt 2016迷彩蝴蝶夹克',
|
|
|
brandName: 'Supreme',
|
|
|
intro: '2016最新发布',
|
|
|
img: 'http://placehold.it/{width}x{height}',
|
|
|
sellPrice: 3199,
|
|
|
marketPrice: 4009,
|
|
|
colors: [
|
|
|
{
|
|
|
name: '黑色',
|
|
|
title: '黑色',
|
|
|
focus: true,
|
|
|
thumbs: [
|
|
|
'http://placehold.it/{width}x{height}',
|
|
|
'http://placehold.it/{width}x{height}',
|
|
|
'http://placehold.it/{width}x{height}',
|
|
|
'http://placehold.it/{width}x{height}',
|
|
|
'http://placehold.it/{width}x{height}'
|
|
|
],
|
|
|
sizes: [
|
|
|
{
|
|
|
name: 'S',
|
|
|
title: 'S',
|
|
|
sku: '12313',
|
|
|
num: 10
|
|
|
},
|
|
|
{
|
|
|
name: 'M',
|
|
|
title: 'M',
|
|
|
sku: '12314',
|
|
|
num: 14
|
|
|
},
|
|
|
{
|
|
|
name: 'L',
|
|
|
title: 'L',
|
|
|
sku: '12315',
|
|
|
num: 0
|
|
|
},
|
|
|
{
|
|
|
name: 'XL',
|
|
|
title: 'XL',
|
|
|
sku: '12316',
|
|
|
num: 0
|
|
|
}
|
|
|
],
|
|
|
rgb: '#000'
|
|
|
},
|
|
|
{
|
|
|
name: '黄色',
|
|
|
title: '黄色',
|
|
|
thumbs: [
|
|
|
'http://placehold.it/{width}x{height}',
|
|
|
'http://placehold.it/{width}x{height}'
|
|
|
],
|
|
|
rgb: '#efdc0e',
|
|
|
sizes: [
|
|
|
{
|
|
|
name: 'S',
|
|
|
title: 'S',
|
|
|
sku: '12313',
|
|
|
num: 0
|
|
|
},
|
|
|
{
|
|
|
name: 'M',
|
|
|
title: 'M',
|
|
|
sku: '12314',
|
|
|
num: 14
|
|
|
},
|
|
|
{
|
|
|
name: 'L',
|
|
|
title: 'L',
|
|
|
sku: '12315',
|
|
|
num: 0
|
|
|
},
|
|
|
{
|
|
|
name: 'XL',
|
|
|
title: 'XL',
|
|
|
sku: '12316',
|
|
|
num: 23
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
name: '蓝色',
|
|
|
title: '蓝色',
|
|
|
thumbs: [
|
|
|
'http://placehold.it/{width}x{height}',
|
|
|
'http://placehold.it/{width}x{height}',
|
|
|
'http://placehold.it/{width}x{height}',
|
|
|
'http://placehold.it/{width}x{height}'
|
|
|
],
|
|
|
rgb: '#2ea8e6'
|
|
|
},
|
|
|
{
|
|
|
name: '绿色',
|
|
|
title: '绿色',
|
|
|
thumbs: [
|
|
|
'http://placehold.it/{width}x{height}',
|
|
|
'http://placehold.it/{width}x{height}',
|
|
|
'http://placehold.it/{width}x{height}',
|
|
|
'http://placehold.it/{width}x{height}'
|
|
|
],
|
|
|
rgb: '#85b2ef'
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
description: {
|
|
|
titleEn: 'DESCRIPTION',
|
|
|
titleCn: '商品信息',
|
|
|
basic: [
|
|
|
{
|
|
|
key: '编号',
|
|
|
value: '51144694'
|
|
|
},
|
|
|
{
|
|
|
key: '颜色',
|
|
|
value: '灰色'
|
|
|
},
|
|
|
{
|
|
|
key: '性别',
|
|
|
value: '男款'
|
|
|
},
|
|
|
{
|
|
|
key: '经典款型',
|
|
|
value: '灰色'
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
material: {
|
|
|
titleEn: 'MATERIALS',
|
|
|
titleCn: '材料洗涤',
|
|
|
detail: [
|
|
|
{
|
|
|
img: 'http://placehold.it/{width}x{height}',
|
|
|
name: '皮革',
|
|
|
nameEn: 'Leather',
|
|
|
text: '不适宜沾水,避免硬物划花,使用专用清洁膏擦拭。长时间不着用,可用软毛巾抹掉表面尘土,上一层皮革保养油。建议几双鞋交替穿着,不穿时放置通风处保持鞋内干爽。'
|
|
|
}
|
|
|
],
|
|
|
wash: [
|
|
|
{
|
|
|
img: 'http://placehold.it/{width}x{height}',
|
|
|
name: '分色洗涤'
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
sizeInfo: {
|
|
|
titleEn: 'SIZEINFO',
|
|
|
titleCn: '尺码信息',
|
|
|
param: {
|
|
|
thead: [
|
|
|
{
|
|
|
width: 126,
|
|
|
name: '吊牌尺码'
|
|
|
},
|
|
|
{
|
|
|
width: 126,
|
|
|
name: '后衣长'
|
|
|
},
|
|
|
{
|
|
|
width: 126,
|
|
|
name: '前衣长'
|
|
|
}
|
|
|
],
|
|
|
tbody: [
|
|
|
['XS', 66, 66],
|
|
|
['S', 66, 66],
|
|
|
['L', 66, 66]
|
|
|
]
|
|
|
},
|
|
|
taste: {
|
|
|
thead: [
|
|
|
{
|
|
|
width: 170,
|
|
|
name: '模特'
|
|
|
},
|
|
|
{
|
|
|
width: 126,
|
|
|
name: '身高'
|
|
|
},
|
|
|
{
|
|
|
width: 126,
|
|
|
name: '体重'
|
|
|
}
|
|
|
],
|
|
|
tbody: [
|
|
|
[{
|
|
|
img: 'http://placehold.it/{width}x{height}',
|
|
|
name: 'Steven'
|
|
|
}, 187, 66],
|
|
|
[{
|
|
|
img: 'http://placehold.it/{width}x{height}',
|
|
|
name: 'Oliver'
|
|
|
}, 183, 66]
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
details: {
|
|
|
titleEn: 'DETAILS',
|
|
|
titleCn: '商品详情',
|
|
|
content: 'aaaa'
|
|
|
}
|
|
|
};
|
|
|
const Item = require('../models/item');
|
|
|
|
|
|
res.display('item', data);
|
|
|
const index = (req, res, next) => {
|
|
|
// let data = {
|
|
|
// brandBanner: {
|
|
|
// bgColor: '#93897d',
|
|
|
// brandLogo: {
|
|
|
// link: '#',
|
|
|
// img: 'http://placehold.it/{width}x{height}'
|
|
|
// },
|
|
|
// brandHome: {
|
|
|
// link: '#'
|
|
|
// }
|
|
|
// },
|
|
|
// nav: [
|
|
|
// {
|
|
|
// link: '#',
|
|
|
// name: 'MEN首页'
|
|
|
// },
|
|
|
// {
|
|
|
// link: '#',
|
|
|
// name: '上衣'
|
|
|
// },
|
|
|
// {
|
|
|
// link: '#',
|
|
|
// name: '卫衣'
|
|
|
// },
|
|
|
// {
|
|
|
// name: 'Spring 2016NEWT-Shirt 2016迷彩蝴蝶夹克'
|
|
|
// }
|
|
|
// ],
|
|
|
// goodInfo: {
|
|
|
// name: 'Spring 2016NEWT-Shirt 2016迷彩蝴蝶夹克',
|
|
|
// brandName: 'Supreme',
|
|
|
// intro: '2016最新发布',
|
|
|
// img: 'http://placehold.it/{width}x{height}',
|
|
|
// sellPrice: 3199,
|
|
|
// marketPrice: 4009,
|
|
|
// colors: [
|
|
|
// {
|
|
|
// name: '黑色',
|
|
|
// title: '黑色',
|
|
|
// focus: true,
|
|
|
// thumbs: [
|
|
|
// 'http://placehold.it/{width}x{height}',
|
|
|
// 'http://placehold.it/{width}x{height}',
|
|
|
// 'http://placehold.it/{width}x{height}',
|
|
|
// 'http://placehold.it/{width}x{height}',
|
|
|
// 'http://placehold.it/{width}x{height}'
|
|
|
// ],
|
|
|
// sizes: [
|
|
|
// {
|
|
|
// name: 'S',
|
|
|
// title: 'S',
|
|
|
// sku: '12313',
|
|
|
// num: 10
|
|
|
// },
|
|
|
// {
|
|
|
// name: 'M',
|
|
|
// title: 'M',
|
|
|
// sku: '12314',
|
|
|
// num: 14
|
|
|
// },
|
|
|
// {
|
|
|
// name: 'L',
|
|
|
// title: 'L',
|
|
|
// sku: '12315',
|
|
|
// num: 0
|
|
|
// },
|
|
|
// {
|
|
|
// name: 'XL',
|
|
|
// title: 'XL',
|
|
|
// sku: '12316',
|
|
|
// num: 0
|
|
|
// }
|
|
|
// ],
|
|
|
// rgb: '#000'
|
|
|
// },
|
|
|
// {
|
|
|
// name: '黄色',
|
|
|
// title: '黄色',
|
|
|
// thumbs: [
|
|
|
// 'http://placehold.it/{width}x{height}',
|
|
|
// 'http://placehold.it/{width}x{height}'
|
|
|
// ],
|
|
|
// rgb: '#efdc0e',
|
|
|
// sizes: [
|
|
|
// {
|
|
|
// name: 'S',
|
|
|
// title: 'S',
|
|
|
// sku: '12313',
|
|
|
// num: 0
|
|
|
// },
|
|
|
// {
|
|
|
// name: 'M',
|
|
|
// title: 'M',
|
|
|
// sku: '12314',
|
|
|
// num: 14
|
|
|
// },
|
|
|
// {
|
|
|
// name: 'L',
|
|
|
// title: 'L',
|
|
|
// sku: '12315',
|
|
|
// num: 0
|
|
|
// },
|
|
|
// {
|
|
|
// name: 'XL',
|
|
|
// title: 'XL',
|
|
|
// sku: '12316',
|
|
|
// num: 23
|
|
|
// }
|
|
|
// ]
|
|
|
// },
|
|
|
// {
|
|
|
// name: '蓝色',
|
|
|
// title: '蓝色',
|
|
|
// thumbs: [
|
|
|
// 'http://placehold.it/{width}x{height}',
|
|
|
// 'http://placehold.it/{width}x{height}',
|
|
|
// 'http://placehold.it/{width}x{height}',
|
|
|
// 'http://placehold.it/{width}x{height}'
|
|
|
// ],
|
|
|
// rgb: '#2ea8e6'
|
|
|
// },
|
|
|
// {
|
|
|
// name: '绿色',
|
|
|
// title: '绿色',
|
|
|
// thumbs: [
|
|
|
// 'http://placehold.it/{width}x{height}',
|
|
|
// 'http://placehold.it/{width}x{height}',
|
|
|
// 'http://placehold.it/{width}x{height}',
|
|
|
// 'http://placehold.it/{width}x{height}'
|
|
|
// ],
|
|
|
// rgb: '#85b2ef'
|
|
|
// }
|
|
|
// ]
|
|
|
// },
|
|
|
// description: {
|
|
|
// titleEn: 'DESCRIPTION',
|
|
|
// titleCn: '商品信息',
|
|
|
// basic: [
|
|
|
// {
|
|
|
// key: '编号',
|
|
|
// value: '51144694'
|
|
|
// },
|
|
|
// {
|
|
|
// key: '颜色',
|
|
|
// value: '灰色'
|
|
|
// },
|
|
|
// {
|
|
|
// key: '性别',
|
|
|
// value: '男款'
|
|
|
// },
|
|
|
// {
|
|
|
// key: '经典款型',
|
|
|
// value: '灰色'
|
|
|
// }
|
|
|
// ]
|
|
|
// },
|
|
|
// material: {
|
|
|
// titleEn: 'MATERIALS',
|
|
|
// titleCn: '材料洗涤',
|
|
|
// detail: [
|
|
|
// {
|
|
|
// img: 'http://placehold.it/{width}x{height}',
|
|
|
// name: '皮革',
|
|
|
// nameEn: 'Leather',
|
|
|
// text: '不适宜沾水,避免硬物划花,使用专用清洁膏擦拭。长时间不着用,可用软毛巾抹掉表面尘土,上一层皮革保养油。建议几双鞋交替穿着,不穿时放置通风处保持鞋内干爽。'
|
|
|
// }
|
|
|
// ],
|
|
|
// wash: [
|
|
|
// {
|
|
|
// img: 'http://placehold.it/{width}x{height}',
|
|
|
// name: '分色洗涤'
|
|
|
// }
|
|
|
// ]
|
|
|
// },
|
|
|
// sizeInfo: {
|
|
|
// titleEn: 'SIZEINFO',
|
|
|
// titleCn: '尺码信息',
|
|
|
// param: {
|
|
|
// thead: [
|
|
|
// {
|
|
|
// width: 126,
|
|
|
// name: '吊牌尺码'
|
|
|
// },
|
|
|
// {
|
|
|
// width: 126,
|
|
|
// name: '后衣长'
|
|
|
// },
|
|
|
// {
|
|
|
// width: 126,
|
|
|
// name: '前衣长'
|
|
|
// }
|
|
|
// ],
|
|
|
// tbody: [
|
|
|
// ['XS', 66, 66],
|
|
|
// ['S', 66, 66],
|
|
|
// ['L', 66, 66]
|
|
|
// ]
|
|
|
// },
|
|
|
// taste: {
|
|
|
// thead: [
|
|
|
// {
|
|
|
// width: 170,
|
|
|
// name: '模特'
|
|
|
// },
|
|
|
// {
|
|
|
// width: 126,
|
|
|
// name: '身高'
|
|
|
// },
|
|
|
// {
|
|
|
// width: 126,
|
|
|
// name: '体重'
|
|
|
// }
|
|
|
// ],
|
|
|
// tbody: [
|
|
|
// [{
|
|
|
// img: 'http://placehold.it/{width}x{height}',
|
|
|
// name: 'Steven'
|
|
|
// }, 187, 66],
|
|
|
// [{
|
|
|
// img: 'http://placehold.it/{width}x{height}',
|
|
|
// name: 'Oliver'
|
|
|
// }, 183, 66]
|
|
|
// ]
|
|
|
// }
|
|
|
// },
|
|
|
// details: {
|
|
|
// titleEn: 'DETAILS',
|
|
|
// titleCn: '商品详情',
|
|
|
// content: 'aaaa'
|
|
|
// }
|
|
|
// };
|
|
|
|
|
|
Item.getProductItemData(req.params).then(result => {
|
|
|
res.display('item', result);
|
|
|
}).catch(next);
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
...
|
...
|
|