Authored by 毕凯

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

裸链接没有userUid

1.微信端打开活动链接,分享没有userUid:如果用户已认证,且活动链接上,没有userUid,将用户uid添加到userUid

See merge request !141
... ... @@ -271,21 +271,27 @@ $(document).on('click', '.invite-now', function() {
$(
function() {
if ($(".change-userUid").length > 0) {
if (window.queryString.userUid) {
var this_uid = $("#userUid").val();
var url_uid = window.queryString.userUid;
if ((this_uid !== url_uid) && (url_uid !== "undefined")) {
location.href = location.href.replace("userUid=" + url_uid, "userUid=" + this_uid);
if ($('.change-userUid').length > 0) {
var this_uid = $('#userUid').val();
var url_uid = window.queryString.userUid;
if (window.queryString.userUid && window.queryString.userUid !== '') {
if ((this_uid !== url_uid) && (url_uid !== 'undefined')) {
location.href = location.href.replace('userUid=' + url_uid, 'userUid=' + this_uid);
}
} else {
if (location.href.split('?')[1]) {
location.href = location.href + '&userUid=' + this_uid;
} else {
location.href = location.href + '?userUid=' + this_uid;
}
}
}
$('.reg-now').on('click', function() {
checkStudent();
});
$(".op-row a:first").on("click", function () {
if (!$(this).hasClass("user-name")) {
$('.op-row a:first').on('click', function () {
if (!$(this).hasClass('user-name')) {
goAppLogin();
return false;
}
... ... @@ -341,7 +347,7 @@ function checkStudent() {
$.ajax({
url: '/activity/promotion/checkStudent',
data: {
uid: $("#userUid").val()
uid: $('#userUid').val()
},
success: function(data) {
if (data === 0) {
... ... @@ -359,10 +365,10 @@ function checkStudent() {
function goAppLogin() {
var url = '//m.yohobuy.com/signin.html?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"http://m.yohobuy.com/activity/promotion","param":{"userUid":"' + window.queryString.userUid + '"}},"requesturl":{"url":"","param":{}},"priority":"N"}}';
if ($("#app-login").length <= 0) {
$("body").append('<a href=\'' + url + '\' style="display:none;" id="app-login">' +
if ($('#app-login').length <= 0) {
$('body').append('<a href=\'' + url + '\' style="display:none;" id="app-login">' +
'<span class="app-login"></span>' +
'</a>');
}
$(".app-login").click();
$('.app-login').click();
}
\ No newline at end of file
... ...