Authored by liangxs

app跳h5登录页面bug修改

... ... @@ -29,10 +29,17 @@ function getUrlParam(name) {
}
$receive.on('click', function() {
var $curDom = $(this);
var $curDom = $(this),
req;
if (getUrlParam('app_version')) {
req = '?app_version=' + getUrlParam('app_version');
} else {
req = '';
}
$.ajax({
url: '/coupon/receiveCoupon',
url: '/coupon/receiveCoupon' + req,
data: {
couponID: $curDom.parents('.coupon-floor').attr('coupon-id')
},
... ... @@ -40,13 +47,7 @@ $receive.on('click', function() {
success: function(data) {
var msg = data.msg,
status = data.status,
newUrl;
if (getUrlParam('app_version')) {
newUrl = data.url + '?code=' + getUrlParam('code') + '&app_version=' + getUrlParam('app_version');
} else {
newUrl = data.url + '?code=' + getUrlParam('code');
}
if (data.noLogin === true) {
if ($('#intimacy-link').length <= 0) {
... ... @@ -101,14 +102,12 @@ $('.coupon-message-op-rel').on('click', function() {
});
if ($('#noData').length > 0) {
if (location.href.indexOf('?openby:yohobuy=') <= 0){
if (location.href.indexOf('?openby:yohobuy=') <= 0) {
tip.show('网络异常!');
}else{
console.log(location.href.indexOf('?openby:yohobuy='))
}
}
$mask.on('click',function () {
$mask.on('click', function() {
$mask.hide();
$message.hide();
});
... ...