Authored by hf

do modify cuxiao coupon huodong js add checkout is logged

... ... @@ -18,9 +18,12 @@ $('#get-all-coupon').click(function() {
});
/* 检查是否有在领取中的券,有则直接领取 */
var cookieCouponId = cookie('_Coupon' + activityId);
if (cookieCouponId && !isNaN(cookieCouponId)) {
getNamedCoupon(activityId, cookieCouponId, isApp);
var userIsLogged = $('#coupon-container').attr('isLogged');
if (userIsLogged === 'Y') {
var cookieCouponId = cookie('_Coupon' + activityId);
if (cookieCouponId && !isNaN(cookieCouponId)) {
getNamedCoupon(activityId, cookieCouponId, isApp);
}
}
/**
... ...
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
... ... @@ -25,7 +25,7 @@
</script>
</head>
<body>
<div class="coupon-container" id="coupon-container" param="{{activityId}}">
<div class="coupon-container" id="coupon-container" param="{{activityId}}" isLogged="{{isLogged}}">
<div class="coupon-hd"></div>
<div class="coupon-bd">
<div class="bd-top"></div>
... ...
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
... ... @@ -25,7 +25,7 @@
</script>
</head>
<body>
<div class="coupon-container" id="coupon-container" param="{{activityId}}">
<div class="coupon-container" id="coupon-container" param="{{activityId}}" isLogged="{{isLogged}}">
<div class="coupon-hd"></div>
<div class="coupon-bd">
<div class="bd-top"></div>
... ...
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
... ... @@ -25,7 +25,7 @@
</script>
</head>
<body>
<div class="coupon-container" id="coupon-container" param="{{activityId}}">
<div class="coupon-container" id="coupon-container" param="{{activityId}}" isLogged="{{isLogged}}">
<div class="coupon-hd hd2"></div>
<div class="coupon-bd">
<div class="bd-top"></div>
... ...
<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
... ... @@ -25,7 +25,7 @@
</script>
</head>
<body>
<div class="coupon-container" id="coupon-container" param="{{activityId}}">
<div class="coupon-container" id="coupon-container" param="{{activityId}}" isLogged="{{isLogged}}">
<div class="coupon-hd hd2"></div>
<div class="coupon-bd">
<div class="bd-top"></div>
... ...
... ... @@ -43,7 +43,10 @@ class CouponController extends HuodongAction
$isApp = null !== $this->get('app_version');
$isAppLogged = true;
if ($isApp) {
$isLogged = $this->get('uid') !== null;
$isAppLogged = $this->checkIsLogin();
} else {
$isLogged = $this->getUid();
}
$urlBoys = Helpers::url('/cuxiao/coupon/boysbrand');
... ... @@ -57,6 +60,7 @@ class CouponController extends HuodongAction
'activityId' => 75, // 活动ID
'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题
'isLogged' => $isLogged ? 'Y' : 'N', // 标识是否登录
'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlBoys . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{"from":"app"}},"requesturl":{},"priority":"N"}}',
'weixinShare' => $isApp ? false : true, // 是否需要微信分享
'shareLink' => $urlBoys,
... ... @@ -131,8 +135,12 @@ class CouponController extends HuodongAction
$isApp = null !== $this->get('app_version');
$isAppLogged = true;
if ($isApp) {
$isLogged = $this->get('uid') !== null;
$isAppLogged = $this->checkIsLogin();
} else {
$isLogged = $this->getUid();
}
$urlBoys = Helpers::url('/cuxiao/coupon/boysbrand');
$urlGirls = Helpers::url('/cuxiao/coupon/girlsbrand');
$urlKids = Helpers::url('/cuxiao/coupon/kidsbrand');
... ... @@ -144,6 +152,7 @@ class CouponController extends HuodongAction
'activityId' => 76, // 活动ID
'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题
'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlGirls . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{"from":"app"}},"requesturl":{},"priority":"N"}}',
'isLogged' => $isLogged ? 'Y' : 'N', // 标识是否登录
'weixinShare' => $isApp ? false : true, // 是否需要微信分享
'shareLink' => $urlGirls,
... ... @@ -222,7 +231,10 @@ class CouponController extends HuodongAction
$isApp = null !== $this->get('app_version');
$isAppLogged = true;
if ($isApp) {
$isLogged = $this->get('uid') !== null;
$isAppLogged = $this->checkIsLogin();
} else {
$isLogged = $this->getUid();
}
$urlBoys = Helpers::url('/cuxiao/coupon/boysbrand');
$urlGirls = Helpers::url('/cuxiao/coupon/girlsbrand');
... ... @@ -236,6 +248,7 @@ class CouponController extends HuodongAction
'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题
'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlKids . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{"from":"app"}},"requesturl":{},"priority":"N"}}',
'isLogged' => $isLogged ? 'Y' : 'N', // 标识是否登录
'weixinShare' => $isApp ? false : true, // 是否需要微信分享
'shareLink' => $urlKids,
... ... @@ -269,7 +282,10 @@ class CouponController extends HuodongAction
$isApp = null !== $this->get('app_version');
$isAppLogged = true;
if ($isApp) {
$isLogged = $this->get('uid') !== null;
$isAppLogged = $this->checkIsLogin();
} else {
$isLogged = $this->getUid();
}
$urlBoys = Helpers::url('/cuxiao/coupon/boysbrand');
... ... @@ -284,6 +300,7 @@ class CouponController extends HuodongAction
'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题
'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlLifestyle . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{"from":"app"}},"requesturl":{},"priority":"N"}}',
'isLogged' => $isLogged ? 'Y' : 'N', // 标识是否登录
'weixinShare' => $isApp ? false : true, // 是否需要微信分享
'shareLink' => $urlLifestyle,
... ...