Authored by yyq

Merge branch 'release/1.0' of git.yoho.cn:fe/yoho-blk into release/1.0

... ... @@ -225,11 +225,10 @@ const _getRelatedData = (idList) => {
productList.push({
name: data.product_name,
price: data.sales_price,
id: data.product_id,
productId: data.product_id,
cnAlphabet: data.cn_alphabet
});
});
console.log(productList);
return productList;
} else {
logger.error('推荐商品 cood 不是 200');
... ... @@ -246,7 +245,6 @@ const _getRelatedData = (idList) => {
const _processContentData = (list) => {
list = list || [];
list = camelCase(list);
console.log(list);
let contentData = {
contents: []
... ... @@ -282,7 +280,6 @@ const _processContentData = (list) => {
if (value.goods) {
_.forEach(value.goods.data, function(data) {
console.log(data);
idList += data.id + ',';
related.relatedReco.push(data);
... ... @@ -305,15 +302,19 @@ const _processContentData = (list) => {
}
});
_getRelatedData(idList).then((result) => {
return _getRelatedData(idList).then((result) => {
if (related.relatedReco) {
_.forEach(related.relatedReco, function(data, index) {
data = _.assign(data, {
// link: `${config.siteUrl}/product/list/pro_${result[index].id}_data.${data.productSkc}`
});
data = _.assign(data, result[index]);
if (result[index]) {
data = _.assign(data, {
// link: `${config.siteUrl}/product/list/pro_${result[index].productId}_${data.productSkc}/${result[index].cnAlphabet}.html`,
link: config.siteUrl + '/product/list/pro_' +
result[index].productId + '_' + data.productSkc + '/' +
result[index].cnAlphabet + '.html'
});
data = _.assign(data, result[index]);
}
});
result.splice(0, recoLength.length);
}
... ... @@ -335,8 +336,6 @@ const _processContentData = (list) => {
return contentData;
});
return contentData;
};
/**
... ... @@ -459,7 +458,7 @@ const _getArticlePre = (id, appType) => {
id: id,
app_type: appType
}).then((result) => {
console.log(result);
if (result && result.code === 200) {
let perArticle = {};
... ...
... ... @@ -87,7 +87,6 @@ const favorite = {
ret.content.favorite.data = retData;
ret.content.banner = thumb;
console.log(retData);
}
res.display('index', ret);
... ...
... ... @@ -148,28 +148,30 @@ const bindMobile = (req, res, next) => {
settingModel.getUserInfo(uid).then(result=> {
if (result.info.verify_mobile !== '') {
let info = result.info;
info.ellipsisMobile = info.verify_mobile.replace(regMobile, '$1****$2');
info.checkCode = settingModel.cipheriv(info.uid + '.completeverify');
res.display('index', {
module: 'me',
page: 'setting',
isMe: true,
content: {
region: passportHelper.getCountry(),
location: '+86',
nav: mcHandler.getMeCrumb('个人设置'),
navigation: mcHandler.getSideMenu('个人设置'),
banner: 'http://placehold.it/150x120',
validateStep: true,
title: _getTitle(type).typeName,
proTitle: _getTitle(type).proName,
captchaUrl: captchaUrl,
isShowMobile: true,
data: info
}
mcHandler.getMeThumb().then((thumb) => {
let info = result.info;
info.ellipsisMobile = info.verify_mobile.replace(regMobile, '$1****$2');
info.checkCode = settingModel.cipheriv(info.uid + '.completeverify');
res.display('index', {
module: 'me',
page: 'setting',
isMe: true,
content: {
region: passportHelper.getCountry(),
location: '+86',
nav: mcHandler.getMeCrumb('个人设置'),
navigation: mcHandler.getSideMenu('个人设置'),
banner: thumb,
validateStep: true,
title: _getTitle(type).typeName,
proTitle: _getTitle(type).proName,
captchaUrl: captchaUrl,
isShowMobile: true,
data: info
}
});
});
}
next();
... ... @@ -189,21 +191,24 @@ const bindEmail = (req, res, next) => {
info.ellipsisEmail = info.verify_email.replace(regEmail, '$1****');
info.checkCode = settingModel.cipheriv(info.uid + '.completeverify');
res.display('index', {
module: 'me',
page: 'setting',
isMe: true,
content: {
nav: mcHandler.getMeCrumb('个人设置'),
navigation: mcHandler.getSideMenu('个人设置'),
banner: 'http://placehold.it/150x120',
validateStep: true,
title: _getTitle(type).typeName,
proTitle: _getTitle(type).proName,
captchaUrl: captchaUrl,
isShowEmail: true,
data: info
}
mcHandler.getMeThumb().then((thumb) => {
res.display('index', {
module: 'me',
page: 'setting',
isMe: true,
content: {
nav: mcHandler.getMeCrumb('个人设置'),
navigation: mcHandler.getSideMenu('个人设置'),
banner: thumb,
validateStep: true,
title: _getTitle(type).typeName,
proTitle: _getTitle(type).proName,
captchaUrl: captchaUrl,
isShowEmail: true,
data: info
}
});
});
}
next();
... ... @@ -217,21 +222,23 @@ const modifyPassword = (req, res) => {
let type = req.params.type;
let checkCode = settingModel.cipheriv(req.user.uid + '.completeverify');
res.display('index', {
module: 'me',
page: 'setting',
isMe: true,
content: {
nav: mcHandler.getMeCrumb('个人设置'),
navigation: mcHandler.getSideMenu('个人设置'),
banner: 'http://placehold.it/150x120',
validateStep: true,
title: _getTitle(type).typeName,
proTitle: _getTitle(type).proName,
captchaUrl: captchaUrl,
isShowPassword: true,
checkCode: checkCode
}
mcHandler.getMeThumb().then((thumb) => {
res.display('index', {
module: 'me',
page: 'setting',
isMe: true,
content: {
nav: mcHandler.getMeCrumb('个人设置'),
navigation: mcHandler.getSideMenu('个人设置'),
banner: thumb,
validateStep: true,
title: _getTitle(type).typeName,
proTitle: _getTitle(type).proName,
captchaUrl: captchaUrl,
isShowPassword: true,
checkCode: checkCode
}
});
});
};
... ... @@ -253,25 +260,26 @@ const edit = (req, res)=> {
};
let checkCode = settingModel.cipheriv(req.user.uid + '.completeoperate');
res.display('index', {
module: 'me',
page: 'setting',
isMe: true,
content: Object.assign({
region: passportHelper.getCountry(),
location: '+86',
nav: mcHandler.getMeCrumb('个人设置'),
navigation: mcHandler.getSideMenu('个人设置'),
banner: 'http://placehold.it/150x120',
operateStep: true,
stepUrl: '/me/setting/step3/' + type,
captchaUrl: captchaUrl,
checkCode: checkCode
}, result)
mcHandler.getMeThumb().then((thumb) => {
res.display('index', {
module: 'me',
page: 'setting',
isMe: true,
content: Object.assign({
region: passportHelper.getCountry(),
location: '+86',
nav: mcHandler.getMeCrumb('个人设置'),
navigation: mcHandler.getSideMenu('个人设置'),
banner: thumb,
operateStep: true,
stepUrl: '/me/setting/step3/' + type,
captchaUrl: captchaUrl,
checkCode: checkCode
}, result)
});
});
}
}
};
/*
... ... @@ -293,19 +301,21 @@ const success = (req, res)=> {
isShowPassword: _getTitle(type).isShowPassword
};
res.display('index', {
module: 'me',
page: 'setting',
isMe: true,
content: Object.assign({
region: passportHelper.getCountry(),
location: '+86',
nav: mcHandler.getMeCrumb('个人设置'),
navigation: mcHandler.getSideMenu('个人设置'),
banner: 'http://placehold.it/150x120',
successStep: true,
captchaUrl: captchaUrl
}, result)
mcHandler.getMeThumb().then((thumb) => {
res.display('index', {
module: 'me',
page: 'setting',
isMe: true,
content: Object.assign({
region: passportHelper.getCountry(),
location: '+86',
nav: mcHandler.getMeCrumb('个人设置'),
navigation: mcHandler.getSideMenu('个人设置'),
banner: thumb,
successStep: true,
captchaUrl: captchaUrl
}, result)
});
});
}
... ...
... ... @@ -421,6 +421,10 @@ const getOrderData = (uid, type, page) => {
typeStr: 'paying'
},
{
text: '待发货',
typeStr: 'willdeliver'
},
{
text: '待收货',
typeStr: 'delivering'
}
... ... @@ -441,6 +445,12 @@ const getOrderData = (uid, type, page) => {
url: '/me/'
},
3: {
emptyMsg: '没有待发货的订单哦~',
btnText: '查看全部订单',
showEmptyEn: true,
url: '/me/'
},
4: {
emptyMsg: '没有待收货的订单哦~',
btnText: '查看全部订单',
showEmptyEn: true,
... ... @@ -541,6 +551,8 @@ const getOrderDetail = (uid, code) => {
(statusMap[st].valueStr === '备货中' ||
detail.statusStr === '备货中')) {
detail.btns = btnMap.special;
} else {
detail.statusStr = statusMap[st].valueStr;
}
}
... ...
... ... @@ -602,6 +602,8 @@ const _setExchangeDetailData = (data) => {
sendBack: true,
cancel: true,
location: true
// takeGoods: true
});
} else {
Object.assign(list, {
... ...
... ... @@ -69,7 +69,7 @@
<div class="show-content" data-id="{{id}}">
<h4 class="third-title">寄回物流信息 <label class="reset-express btn white">修改</label></h4>
<p>请您耐心等待,我们会在收到货物后快速为您处理</p>
<p>物流公司:{{ expressCompany}}</p>
<p>物流公司:{{expressCompany}}</p>
<p>快递单号:{{expressNumber}}</p>
</div>
{{/if}}
... ...
... ... @@ -45,10 +45,10 @@
<label class="label-name">邮箱:</label>
{{#if info.verify_email}}
<input class="input no-edit" value="{{info.mobile}}">
<!--<a class="blue operation" href="{{stepUrl}}/modifyEmail">修改</a>-->
{{!-- <a class="blue operation" href="{{stepUrl}}/modifyEmail">修改</a> --}}
{{else}}
<input class="input" type="text" placeholder="请绑定邮箱" disabled>
<!--<a class="blue operation" href="{{stepUrl}}/bindEmail">绑定</a>-->
{{!-- <a class="blue operation" href="{{stepUrl}}/bindEmail">立即绑定</a> --}}
{{/if}}
</div>
<div class="form-group">
... ...
... ... @@ -34,6 +34,15 @@ function eventBind() {
}
});
$('.goods-img', $root).click(function() {
if ($(this).parent('.goods-info', $root).hasClass('choose')) {
$(this).parent('.goods-info', $root).removeClass('choose');
} else {
$(this).parent('.goods-info', $root).addClass('choose');
}
});
$('.btn.cancel', $root).click(function() {
var id = $(this).parents('.goods-info').data('id');
... ...
... ... @@ -37,7 +37,8 @@ var tableOperation = {
var typeMap = {
all: 1,
paying: 2,
delivering: 3
willdeliver: 3,
delivering: 4
};
require('../common/foreach-polyfill');
... ...
... ... @@ -112,6 +112,7 @@ window.receive_image_bytes = function(obj) {
if (result.code === 200) {
tip.close();
$('.show-ico img').attr('src', result.data.image_url.split('?')[0]);
location.reload();
} else {
tip.close();
new _alert('头像修改失败!').show();
... ...
... ... @@ -15,6 +15,7 @@
box-sizing: border-box;
.box {
height: calc($smallImgHeight*2+$space+10px);
display: inline-block;
position: relative;
... ... @@ -46,6 +47,7 @@
&.left {
width: $bigImgWidth;
float: left;
height: calc($smallImgHeight*2+$space+10px);
img {
width: $bigImgWidth;
... ...