Authored by htoooth

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

@@ -39,22 +39,28 @@ const index = (req, res, next) => { @@ -39,22 +39,28 @@ const index = (req, res, next) => {
39 // 个人信息调用失败返回 39 // 个人信息调用失败返回
40 if (profile) { 40 if (profile) {
41 41
42 - userInfo.result = 1; 42 + // userInfo.result = 1;
  43 + console.log(profile);
  44 +
  45 + let curYearCost = parseInt(_.get(profile, 'vip_info.curYearCost', 0)); //eslint-disable-line
  46 + let nextVipNeedCost = parseInt(_.get(profile, 'vip_info.nextVipNeedCost', 0)); //eslint-disable-line
43 47
44 Object.assign(userInfo, { 48 Object.assign(userInfo, {
45 49
46 // 个人资料 50 // 个人资料
47 profileName: _.get(profile, 'profile_name', ''), 51 profileName: _.get(profile, 'profile_name', ''),
48 headIco: !_.get(profile, 'head_ico') ? helpers.image(_.get(profile, 'head_ico'), 63, 63) : '', 52 headIco: !_.get(profile, 'head_ico') ? helpers.image(_.get(profile, 'head_ico'), 63, 63) : '',
  53 + curTitle: _.get(profile, 'vip_info.title', 0),
49 54
50 // VIP信息 55 // VIP信息
51 - curYearCost: _.get(profile, 'vip_info.curYearCost', 0), 56 + curYearCost: curYearCost,
52 nextLevel: _.get(profile, 'vip_info.next_level', 0), 57 nextLevel: _.get(profile, 'vip_info.next_level', 0),
53 nextVipTitle: _.get(profile, 'vip_info.nextVipTitle', 0), 58 nextVipTitle: _.get(profile, 'vip_info.nextVipTitle', 0),
54 - nextVipNeedCost: _.get(profile, 'vip_info.nextVipNeedCost', 0), 59 + nextVipNeedCost: nextVipNeedCost,
55 60
56 // 升级百分比 61 // 升级百分比
57 - curYearCostPer: userInfo.nextVipNeedCost ? Math.round(profile.curYearCost / profile.nextVipNeedCost * 100) : 0, 62 + curYearCostPer: nextVipNeedCost ?
  63 + Math.round(curYearCost / (nextVipNeedCost + curYearCost) * 100) : 0,
58 64
59 // 待处理订单 65 // 待处理订单
60 order: _.get(userNum, 'wait_pay_num + wait_cargo_num + send_cargo_num', 0), 66 order: _.get(userNum, 'wait_pay_num + wait_cargo_num + send_cargo_num', 0),
@@ -84,7 +90,7 @@ const index = (req, res, next) => { @@ -84,7 +90,7 @@ const index = (req, res, next) => {
84 data: '', 90 data: '',
85 message: '加载失败' 91 message: '加载失败'
86 }); 92 });
87 - }).catch(next); 93 + })().catch(next);
88 }; 94 };
89 95
90 module.exports = { 96 module.exports = {
@@ -13,6 +13,8 @@ var labelMap = { @@ -13,6 +13,8 @@ var labelMap = {
13 wechat: '微信' 13 wechat: '微信'
14 }; 14 };
15 15
  16 +document.domain = 'yohobuy.com';
  17 +
16 // MDialog 18 // MDialog
17 function MDialog(opts) { 19 function MDialog(opts) {
18 var that = this; 20 var that = this;
@@ -4,11 +4,13 @@ @@ -4,11 +4,13 @@
4 4
5 var $ = require('yoho-jquery'); 5 var $ = require('yoho-jquery');
6 6
  7 +document.domain = 'yohobuy.com';
  8 +
7 $(function() { 9 $(function() {
8 var type = $('#type').val(); 10 var type = $('#type').val();
9 var result = $('#bindResult').val(); 11 var result = $('#bindResult').val();
10 var message = $('#bindResultMessage').val(); 12 var message = $('#bindResultMessage').val();
11 13
12 - window.opener.bindTip(result, type, message); 14 + window.opener && window.opener.bindTip && window.opener.bindTip(result, type, message);
13 window.close(); 15 window.close();
14 }); 16 });
@@ -301,7 +301,6 @@ function actionConfirm() { @@ -301,7 +301,6 @@ function actionConfirm() {
301 301
302 302
303 function init() { 303 function init() {
304 - circleTime(); // 倒计时  
305 $pwd = $('#pwd'); 304 $pwd = $('#pwd');
306 $pwdParent = $('.safelevel'); 305 $pwdParent = $('.safelevel');
307 $pwdIntensity = $('.pwd-intensity'); 306 $pwdIntensity = $('.pwd-intensity');
@@ -310,6 +309,9 @@ function init() { @@ -310,6 +309,9 @@ function init() {
310 codeValidate(); 309 codeValidate();
311 validatePwd(); 310 validatePwd();
312 actionConfirm(); 311 actionConfirm();
  312 +
  313 + $('#sendmessage').click();
  314 + circleTime(); // 倒计时
313 } 315 }
314 316
315 init(); 317 init();
@@ -15,5 +15,5 @@ @@ -15,5 +15,5 @@
15 @import 'home/index'; 15 @import 'home/index';
16 @import 'guang/index'; 16 @import 'guang/index';
17 @import 'cart/index'; 17 @import 'cart/index';
18 -@import 'help/index' 18 +@import 'help/index';
19 @import 'service/index'; 19 @import 'service/index';
@@ -1131,6 +1131,8 @@ @@ -1131,6 +1131,8 @@
1131 color: #999; 1131 color: #999;
1132 line-height: 16px; 1132 line-height: 16px;
1133 margin-left: -10px; 1133 margin-left: -10px;
  1134 + overflow: hidden;
  1135 + text-overflow: ellipsis;
1134 1136
1135 > * { 1137 > * {
1136 float:none; 1138 float:none;