Authored by htoooth

Merge remote-tracking branch 'origin/release/5.3' into release/5.3

... ... @@ -39,22 +39,28 @@ const index = (req, res, next) => {
// 个人信息调用失败返回
if (profile) {
userInfo.result = 1;
// userInfo.result = 1;
console.log(profile);
let curYearCost = parseInt(_.get(profile, 'vip_info.curYearCost', 0)); //eslint-disable-line
let nextVipNeedCost = parseInt(_.get(profile, 'vip_info.nextVipNeedCost', 0)); //eslint-disable-line
Object.assign(userInfo, {
// 个人资料
profileName: _.get(profile, 'profile_name', ''),
headIco: !_.get(profile, 'head_ico') ? helpers.image(_.get(profile, 'head_ico'), 63, 63) : '',
curTitle: _.get(profile, 'vip_info.title', 0),
// VIP信息
curYearCost: _.get(profile, 'vip_info.curYearCost', 0),
curYearCost: curYearCost,
nextLevel: _.get(profile, 'vip_info.next_level', 0),
nextVipTitle: _.get(profile, 'vip_info.nextVipTitle', 0),
nextVipNeedCost: _.get(profile, 'vip_info.nextVipNeedCost', 0),
nextVipNeedCost: nextVipNeedCost,
// 升级百分比
curYearCostPer: userInfo.nextVipNeedCost ? Math.round(profile.curYearCost / profile.nextVipNeedCost * 100) : 0,
curYearCostPer: nextVipNeedCost ?
Math.round(curYearCost / (nextVipNeedCost + curYearCost) * 100) : 0,
// 待处理订单
order: _.get(userNum, 'wait_pay_num + wait_cargo_num + send_cargo_num', 0),
... ... @@ -84,7 +90,7 @@ const index = (req, res, next) => {
data: '',
message: '加载失败'
});
}).catch(next);
})().catch(next);
};
module.exports = {
... ...
... ... @@ -13,6 +13,8 @@ var labelMap = {
wechat: '微信'
};
document.domain = 'yohobuy.com';
// MDialog
function MDialog(opts) {
var that = this;
... ...
... ... @@ -4,11 +4,13 @@
var $ = require('yoho-jquery');
document.domain = 'yohobuy.com';
$(function() {
var type = $('#type').val();
var result = $('#bindResult').val();
var message = $('#bindResultMessage').val();
window.opener.bindTip(result, type, message);
window.opener && window.opener.bindTip && window.opener.bindTip(result, type, message);
window.close();
});
... ...
... ... @@ -301,7 +301,6 @@ function actionConfirm() {
function init() {
circleTime(); // 倒计时
$pwd = $('#pwd');
$pwdParent = $('.safelevel');
$pwdIntensity = $('.pwd-intensity');
... ... @@ -310,6 +309,9 @@ function init() {
codeValidate();
validatePwd();
actionConfirm();
$('#sendmessage').click();
circleTime(); // 倒计时
}
init();
... ...
... ... @@ -15,5 +15,5 @@
@import 'home/index';
@import 'guang/index';
@import 'cart/index';
@import 'help/index'
@import 'help/index';
@import 'service/index';
... ...
... ... @@ -1131,6 +1131,8 @@
color: #999;
line-height: 16px;
margin-left: -10px;
overflow: hidden;
text-overflow: ellipsis;
> * {
float:none;
... ...