Authored by 周少峰

Merge branch 'hotfix/12817'

@@ -52,12 +52,6 @@ passport.use('local', new LocalStrategy({ @@ -52,12 +52,6 @@ passport.use('local', new LocalStrategy({
52 return done({message: '登录账号格式错误'}, null); 52 return done({message: '登录账号格式错误'}, null);
53 } 53 }
54 54
55 - let expire = req.cookies['LE' + md5('_LOGIN_EXPIRE')];  
56 -  
57 - if (_.isEmpty(expire) || expire < (new Date()).getTime() / 1000) {  
58 - return done({message: '页面停留时间过长,请刷新页面'}, null);  
59 - }  
60 -  
61 let verifyCode = req.body.captcha; 55 let verifyCode = req.body.captcha;
62 56
63 if (verifyCode && verifyCode !== req.session.captcha) { 57 if (verifyCode && verifyCode !== req.session.captcha) {
@@ -102,14 +102,6 @@ const common = { @@ -102,14 +102,6 @@ const common = {
102 102
103 const local = { 103 const local = {
104 loginPage: (req, res) => { 104 loginPage: (req, res) => {
105 - // 先清除cookie  
106 - res.clearCookie('LE' + md5('_LOGIN_EXPIRE'), {  
107 - domain: 'yohobuy.com'  
108 - });  
109 -  
110 - // 设置登录有效时间30分钟, 防机器刷,cache不稳定,改为cookie  
111 - res.cookie('LE' + md5('_LOGIN_EXPIRE'), (new Date()).getTime() / 1000 + 1800);  
112 -  
113 // 清除cookie 105 // 清除cookie
114 res.clearCookie('_UID', { 106 res.clearCookie('_UID', {
115 domain: 'yohobuy.com' 107 domain: 'yohobuy.com'
@@ -330,9 +330,9 @@ @@ -330,9 +330,9 @@
330 <div class="footer-link"> 330 <div class="footer-link">
331 <div class="center-content clearfix"> 331 <div class="center-content clearfix">
332 <div class="left right-flag"> 332 <div class="left right-flag">
333 - <div class="govicon">  
334 - <script id="jsgovicon" src="http://odr.jsdsgsxt.gov.cn:8081/mbm/app/main/electronic/js/govicon.js?siteId=f2b6e3b8d18241afb8dd6cadf7f15406&width=26&height=34&type=1" type="text/javascript" charset="utf-8"></script>  
335 - </div> 333 + <a class='govicon' href="http://odr.jsdsgsxt.gov.cn:8081/mbm/entweb/elec/certView?siteId=f2b6e3b8d18241afb8dd6cadf7f15406" target="_blank" rel="nofollow">
  334 + <div class="govimg"></div>
  335 + </a>
336 <a href="https://ss.knet.cn/verifyseal.dll?sn=e14021832010046477dka7000000&amp;ct=df&amp;a=1&amp;pa=0.5902942178957805" target="_blank" rel="nofollow"> 336 <a href="https://ss.knet.cn/verifyseal.dll?sn=e14021832010046477dka7000000&amp;ct=df&amp;a=1&amp;pa=0.5902942178957805" target="_blank" rel="nofollow">
337 <img src="//static.yohobuy.com/images/v3/icon/credit-flag3.png"> 337 <img src="//static.yohobuy.com/images/v3/icon/credit-flag3.png">
338 </a> 338 </a>
@@ -253,7 +253,7 @@ @@ -253,7 +253,7 @@
253 </div> 253 </div>
254 <div class="go-full-cart"> 254 <div class="go-full-cart">
255 <div> 255 <div>
256 - <a href="/shopping/cart">去购物车结算</a> 256 + <a href="//www.yohobuy.com/shopping/cart">去购物车结算</a>
257 </div> 257 </div>
258 </div> 258 </div>
259 </div> 259 </div>
@@ -7,6 +7,8 @@ var len = $item.length, slide; @@ -7,6 +7,8 @@ var len = $item.length, slide;
7 var src = /url\("([^'"]*)"\)/g.exec($('.print_qrcode').css('background'))[1]; 7 var src = /url\("([^'"]*)"\)/g.exec($('.print_qrcode').css('background'))[1];
8 $('.print_qrcode').find('img').attr('src', src); 8 $('.print_qrcode').find('img').attr('src', src);
9 9
  10 +require('../common');
  11 +
10 function slideDo(to) { 12 function slideDo(to) {
11 $item.each(function(index) { 13 $item.each(function(index) {
12 index === to ? $(this).stop().animate({ 14 index === to ? $(this).stop().animate({
@@ -3,3 +3,4 @@ @@ -3,3 +3,4 @@
3 */ 3 */
4 4
5 require('./back/back'); 5 require('./back/back');
  6 +require('../common');
@@ -3,3 +3,4 @@ @@ -3,3 +3,4 @@
3 */ 3 */
4 4
5 require('./back/reset'); 5 require('./back/reset');
  6 +require('../common');
1 /** 1 /**
2 * Created by TaoHuang on 2016/6/21. 2 * Created by TaoHuang on 2016/6/21.
3 */ 3 */
  4 +require('../common');
1 /** 1 /**
2 * Created by TaoHuang on 2016/6/21. 2 * Created by TaoHuang on 2016/6/21.
3 */ 3 */
  4 +require('../common');
@@ -3,3 +3,4 @@ @@ -3,3 +3,4 @@
3 */ 3 */
4 4
5 require('./back/verification'); 5 require('./back/verification');
  6 +require('../common');
@@ -2,3 +2,4 @@ @@ -2,3 +2,4 @@
2 * 绑定成功页面 2 * 绑定成功页面
3 **/ 3 **/
4 require('../simple-header'); 4 require('../simple-header');
  5 +require('../common');
1 require('./bind/thirdlogin'); 1 require('./bind/thirdlogin');
  2 +require('../common');
1 require('./login/index'); 1 require('./login/index');
  2 +require('../common');
1 require('./bind/bind-info'); 1 require('./bind/bind-info');
  2 +require('../common');
1 var reg = require('./reg/reg'); 1 var reg = require('./reg/reg');
2 2
3 reg.init('reg'); 3 reg.init('reg');
  4 +require('../common');
1 require('./bind/relate'); 1 require('./bind/relate');
  2 +require('../common');
@@ -324,20 +324,12 @@ $addToCart.click(function() { @@ -324,20 +324,12 @@ $addToCart.click(function() {
324 } 324 }
325 }).then(function(data) { 325 }).then(function(data) {
326 var code = data.code; 326 var code = data.code;
327 - var strK;  
328 327
329 if (code === 200) { 328 if (code === 200) {
330 $('#type-chose').slideUp(SLIDETIME); 329 $('#type-chose').slideUp(SLIDETIME);
331 $('#balance').slideDown(SLIDETIME); 330 $('#balance').slideDown(SLIDETIME);
332 331
333 $('#cart-num').text(data.data.goods_count); // 更新数目 332 $('#cart-num').text(data.data.goods_count); // 更新数目
334 -  
335 - strK = '{"_k":"' + data.data._k + '","_nac":0' + ',"_ac":0,"_r":0}'; //eslint-disable-line  
336 -  
337 - window.setCookie('_g', strK, {  
338 - path: '/',  
339 - domain: '.yohobuy.com'  
340 - });  
341 } 333 }
342 }); 334 });
343 }); 335 });
@@ -299,6 +299,7 @@ @@ -299,6 +299,7 @@
299 margin-right: 5px; 299 margin-right: 5px;
300 } 300 }
301 .govicon { 301 .govicon {
  302 + display: inline-block;
302 float: left; 303 float: left;
303 border-radius: 2px; 304 border-radius: 2px;
304 margin-right: 8px; 305 margin-right: 8px;
@@ -306,6 +307,12 @@ @@ -306,6 +307,12 @@
306 width: 26px; 307 width: 26px;
307 height: 34px; 308 height: 34px;
308 } 309 }
  310 +
  311 + .govimg {
  312 + width: 100%;
  313 + height: 100%;
  314 + background: url(/layout/ebsIcon.png) no-repeat;
  315 + }
309 } 316 }
310 317
311 .about-us { 318 .about-us {