Authored by 姜枫

handle merge

... ... @@ -20,19 +20,21 @@ const index = (req, res, next) => {
let limit = req.query.limit || 20;
let appType = 1;
let udid = md5(req.ip);
let channel = req.cookies._Channel || 'men';
let channel = req.cookies._Channel || 'women';
let gender = '';
let name = '';
if (channel === 'men') {
gender = '1,3';
name = 'MEN首页';
} else if (channel === 'women') {
gender = '2,3';
name = 'WOMEN首页';
} else {
gender = '3,3';
name = ' LIFESTYLE首页';
}
console.log(gender);
editorialModel.getIndexData(pageNum, limit, appType, udid, gender).then((result) => {
res.display('index', {
... ... @@ -44,7 +46,7 @@ const index = (req, res, next) => {
{
link: '/editorial?type=0',
pathTitle: '首页',
name: 'MEN首页'
name: name
},
{
pathTitle: '资讯',
... ... @@ -79,8 +81,22 @@ const list = (req, res) => {
let tag = req.query.query;
let authorId = req.query.authorId;
let udid = md5(req.ip);
let channel = req.cookies._Channel || 'men';
let gender = '';
let name = '';
editorialModel.getListData(pageNum, limit, tag, authorId, udid).then((result) => {
if (channel === 'men') {
gender = '1,3';
name = 'MEN首页';
} else if (channel === 'women') {
gender = '2,3';
name = 'WOMEN首页';
} else {
gender = '3,3';
name = ' LIFESTYLE首页';
}
editorialModel.getListData(pageNum, limit, tag, authorId, udid, gender).then((result) => {
res.display('list', {
module: 'editorial',
... ... @@ -91,7 +107,7 @@ const list = (req, res) => {
{
link: '/editorial?type=0',
pathTitle: '首页',
name: 'MEN首页'
name: name
},
{
link: '/editorial?type=1',
... ... @@ -130,8 +146,6 @@ const detail = (req, res, next) => {
let id = req.params.id;
let appType = 1;
// let clientType = 'pc';
editorialModel.getDetailData(id, appType).then((result) => {
res.display('detail', {
module: 'editorial',
... ...
... ... @@ -50,8 +50,6 @@ const _processListData = (list) => {
});
listData.tabs = list.list.artList;
// console.log(listData)
return listData;
};
... ... @@ -73,7 +71,6 @@ const getIndexData = (pageNum, limit, appType, udid, gender) => {
gender: gender
}).then((result) => {
if (result && result.code === 200) {
// console.log(result)
return _processListData(result.data);
} else {
logger.error('Information page list data return code is not 200');
... ... @@ -90,11 +87,12 @@ const getIndexData = (pageNum, limit, appType, udid, gender) => {
* @param authorId
* @returns {*}
*/
const getListData = (pageNum, limit, tag, authorId, udid) => {
const getListData = (pageNum, limit, tag, authorId, udid, gender) => {
let param = {
page: pageNum,
limit: limit,
udid: udid
udid: udid,
gender: gender
};
if (tag) {
... ... @@ -140,6 +138,7 @@ const _getAuthorData = (id) => {
* @returns {*}
*/
const _processHeadData = (list) => {
return co(function*() {
list = list || [];
list = camelCase(list);
... ... @@ -157,7 +156,7 @@ const _processHeadData = (list) => {
data.isFavor = data.isFavor === 'Y';
newData.headData = {
title: data.intro,
title: data.title,
click: data.viewNum,
time: data.publishTime,
isLike: data.isPraise,
... ... @@ -249,8 +248,6 @@ const _processContentData = (list) => {
list = list || [];
list = camelCase(list);
// console.log(list)
let contentData = {
contents: []
};
... ... @@ -335,7 +332,6 @@ const _processContentData = (list) => {
return contentData;
});
// console.log(contentData)
return contentData;
};
... ... @@ -441,18 +437,23 @@ const _getRelateBrand = (id) => {
});
};
/**
* 获取详情页上一篇
* @param id
* @returns {*}
*/
const _getArticlePre = (id, appType) => {
return serviceAPI.get('guang/api/*/article/getArticlePre', {
return serviceAPI.get('/guang/api/*/article/getArticlePre', {
id: id,
app_type: appType
}).then((result) => {
//console.log(result.message)
if (result && result.code === 200) {
// console.log(1)
// let id = result.data.articleIdPre;
// _getHeadData(id, appType);
return result;
//console.log(result)
return camelCase(result.data);
} else {
logger.error('上一篇不是200');
logger.error('上一篇 is not 200');
return {};
}
});
... ...
... ... @@ -141,7 +141,7 @@ const isMobileOrder = {
// 转换时间戳
const _convertUnixTime = src => {
return moment.unix(src).format('YYYY-MM-DD hh:mm:ss');
return moment.unix(src).format('YYYY-MM-DD HH:mm:ss');
};
/**
... ... @@ -440,11 +440,13 @@ const getOrderData = (uid, type, page) => {
},
2: {
emptyMsg: '没有待付款的订单哦~',
showEmptyEn: true,
btnText: '查看全部订单',
url: '/me/'
},
3: {
emptyMsg: '没有待收货的订单哦~',
showEmptyEn: true,
btnText: '查看全部订单',
url: '/me/'
}
... ...
... ... @@ -282,7 +282,7 @@ const filterCartData = (result, uid) => {
ordinaryGoods = _.concat(ordinaryGoods, ordinaryCartData.goods_list, soldOutWithStorage); // 正常商品
invalidGoods = _.concat(invalidGoods, ordinaryCartData.off_shelves_goods_list, soldOutWithoutStorage); // 失效商品
_.forEach(ordinaryGoods, function(good) {
_.forEach(ordinaryGoods, good => {
buyNumber = parseInt(good.buy_number, 10);
storageNumber = parseInt(good.storage_number, 10);
totalNum += buyNumber;
... ...
... ... @@ -79,7 +79,7 @@
</a>
</li>
<li class="pro-info">
{{!-- <div class="brand-name">{{brandName}}</div> --}}
<a class="brand-name" href="/product/shop/{{brand_domain}}">{{brand_name}}</a>
<div class="pro-name"><a href="/product/pro_{{product_id}}_{{goods_id}}/{{cn_alphabet}}.html" target="_blank">{{product_name}}</a></div>
<div class="color-size editable" data-productId="{{product_id}}" id="edit_{{product_id}}" data-productSkn="{{product_skn}}">
{{#if color_name}}
... ...
... ... @@ -234,8 +234,8 @@ $refundTable.on('change', '.refund-reason', function() {
$this.addClass('hide');
}
data.src = result.data;
if (data.imgs && data.imgs.length) {
data.url = data.imgs[0];
if (result.imgs && result.imgs.length) {
data.url = result.imgs[0];
}
$this.siblings('.img-up-tip').text(++num + '/4');
$this.data('num', num);
... ...
... ... @@ -195,7 +195,8 @@ function addressDialogFactory(opt, $the) {
area_code: data.data.area_code, // eslint-disable-line
address_id: opt.id,
focus: $the.hasClass('focus'),
area: $el.address.getAreaLabels().replace(/,/g, ' ')
area: $el.address.getAreaLabels().replace(/,/g, ' '),
is_default: $the.hasClass('default') ? 'Y' : 'N'
};
$the.before(addressTpl({
... ...
... ... @@ -14,6 +14,10 @@
height: $sliderHeight;
}
.slide-pagination {
bottom: 110px;
}
.slide-thumb-container {
height: 510px;
}
... ... @@ -85,12 +89,12 @@
&.prev {
left: 50%;
margin-left: -515px;
margin-left: -620px;
}
&.next {
right: 50%;
margin-right: -515px;
margin-right: -620px;
}
&:hover {
... ... @@ -270,7 +274,7 @@
.main-container {
position: relative;
top: -60px;
top: -85px;
margin: 0 auto;
box-sizing: border-box;
}
... ...
.new-arrival {
$textHeight: 47px;
$imgHeight: 490px;
$imgHeight: 496px;
@extend .resource-container;
... ...
... ... @@ -36,7 +36,7 @@
.brand-text-box {
$size: 16px;
$line-height: 1.2;
$line-height: 1.4;
$lines-to-show: 3;
width: 0;
... ... @@ -58,7 +58,8 @@
left: calc($width/2-$buttonWidth/2); /* stylelint-disable-line */
}
* {
p,
h4 {
display: none;
}
}
... ...
... ... @@ -53,8 +53,9 @@ $hoverColor: #379ed6;
padding: 24px 30px;
li {
float: left;
display: table-cell;
height: 134px;
vertical-align: middle;
}
.chk {
... ... @@ -92,10 +93,17 @@ $hoverColor: #379ed6;
width: 342px;
padding-left: 42px;
font-size: 12px;
font-weight: bold;
.brand-name {
margin-bottom: 19px;
display: block;
font-size: 18px;
font-weight: bold;
line-height: 50px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 300px;
}
.size {
... ... @@ -108,11 +116,10 @@ $hoverColor: #379ed6;
}
.pro-name {
height: 30px;
height: 36px;
width: 234px;
word-wrap: break-word;
margin-bottom: 13px;
line-height: 1.3em;
margin-bottom: 5px;
overflow: hidden;
:hover {
cursor: pointer;
... ... @@ -123,6 +130,7 @@ $hoverColor: #379ed6;
.pro-name > a {
height: 100%;
display: block;
line-height: 18px;
}
.price {
... ... @@ -165,7 +173,7 @@ $hoverColor: #379ed6;
}
.editable {
padding: 5px;
padding: 5px 0;
width: 200px;
position: relative;
... ...
... ... @@ -427,6 +427,10 @@
.brand-name {
display: block;
line-height: 50px;
width: 338px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.name {
... ...
<div class="thumb-box" data-img="{{url}}">
<div class="thumb-box" data-img="{{this.url}}">
<img class="envidence" src="{{src}}" alt="凭证图片">
<div class="operation-box">
<a href="{{src}}" target="_blank">查看</a>
... ...