Authored by 毕凯

Merge branch 'feature/promotion' into 'release/5.4'

编码跳登录页面的refer



See merge request !109
@@ -248,7 +248,8 @@ function schoolNum(schoolName) { @@ -248,7 +248,8 @@ function schoolNum(schoolName) {
248 // 立即邀请按钮 248 // 立即邀请按钮
249 $(document).on('click', '.invite-now', function() { 249 $(document).on('click', '.invite-now', function() {
250 if (!window.getUid()) { 250 if (!window.getUid()) {
251 - location.href = '//m.yohobuy.com/signin.html?refer=' + location.href; 251 + var newHref = encodeURIComponent(location.href);
  252 + location.href = '//m.yohobuy.com/signin.html?refer=' + newHref;
252 } else { 253 } else {
253 if ($('#s-school-tb').val()) { 254 if ($('#s-school-tb').val()) {
254 $('.share-bg').show(); 255 $('.share-bg').show();
@@ -271,11 +272,18 @@ $(document).on('click', '.invite-now', function() { @@ -271,11 +272,18 @@ $(document).on('click', '.invite-now', function() {
271 272
272 $( 273 $(
273 function() { 274 function() {
  275 + var newHref = encodeURIComponent(location.href);
274 $('.reg-now').on('click', function() { 276 $('.reg-now').on('click', function() {
275 checkStudent(); 277 checkStudent();
276 }); 278 });
  279 + $(".op-row a:first").on("click", function () {
  280 + if (!$(this).hasClass("user-name")) {
  281 + location.href = '//m.yohobuy.com/signin.html?refer=' + newHref;
  282 + return false;
  283 + }
  284 + });
277 $('.login-btn').on('click', function() { 285 $('.login-btn').on('click', function() {
278 - location.href = '//m.yohobuy.com/signin.html?refer=' + location.href; 286 + location.href = '//m.yohobuy.com/signin.html?refer=' + newHref;
279 }); 287 });
280 288
281 var promotion = window.cookie('promotion'); 289 var promotion = window.cookie('promotion');