Authored by htoooth

头部请求显示

@@ -1528,7 +1528,6 @@ function actionVipInfo(_data) { @@ -1528,7 +1528,6 @@ function actionVipInfo(_data) {
1528 function actionLoginInfo() { 1528 function actionLoginInfo() {
1529 $.getData('//www.yohobuy.com/common/passport', '', function(_data) { 1529 $.getData('//www.yohobuy.com/common/passport', '', function(_data) {
1530 if (_data && _data.result !== -1) { 1530 if (_data && _data.result !== -1) {
1531 - actionLoginState(_data); // 更改登录状态  
1532 actionVipInfo(_data); //获得vip; 1531 actionVipInfo(_data); //获得vip;
1533 } else { 1532 } else {
1534 window.setCookie('_UID', '', { 1533 window.setCookie('_UID', '', {
@@ -1548,11 +1547,16 @@ function actionProfileName(){ @@ -1548,11 +1547,16 @@ function actionProfileName(){
1548 var profileName = getProfileName(); 1547 var profileName = getProfileName();
1549 var uid = getUid(); 1548 var uid = getUid();
1550 1549
  1550 + var info = {
  1551 + profileName:profileName,
  1552 + result: 1
  1553 + };
  1554 +
1551 if(!uid || !profileName){ 1555 if(!uid || !profileName){
1552 - return; 1556 + info.result = -1;
1553 } 1557 }
1554 1558
1555 - actionLoginState({profileName:profileName, result:'1'}) 1559 + actionLoginState(info);
1556 } 1560 }
1557 1561
1558 /** 1562 /**
@@ -103,11 +103,18 @@ function actionLoginInfo() { @@ -103,11 +103,18 @@ function actionLoginInfo() {
103 var uid = getUid(), //eslint-disable-line 103 var uid = getUid(), //eslint-disable-line
104 profileName = getProfileName(); // eslint-disable-line 104 profileName = getProfileName(); // eslint-disable-line
105 105
106 - if (uid === 0) {  
107 - return; 106 + var info = {
  107 + random: $.now(),
  108 + profileName: profileName
  109 + };
  110 +
  111 + if (uid !== 0) {
  112 + info.result = 1;
  113 + } else {
  114 + info.result = -1;
108 } 115 }
109 116
110 - setLoginStatus({random: $.now(), profileName: profileName}); 117 + setLoginStatus(info);
111 118
112 }()); 119 }());
113 120