...
|
...
|
@@ -520,7 +520,7 @@ class CouponController extends HuodongAction |
|
|
));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
/**
|
|
|
* 新客领券(第三波)2016年1月7号上线
|
|
|
*/
|
|
|
public function newuser3Action()
|
...
|
...
|
@@ -577,6 +577,58 @@ class CouponController extends HuodongAction |
|
|
'url_7' => 'http://list.m.yohobuy.com/?msort=1,3,6&misort=11,28,12,46&title=夏装&openby:yohobuy={"action":"go.list","params":{"msort":"1,3,6","misort":"11,28,12,46","title":"夏装"}}',
|
|
|
));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 新客领券(第4波)2016年3月14号上线
|
|
|
*/
|
|
|
public function newuser4Action()
|
|
|
{
|
|
|
// 判断是否是应用访问, 拼接APP需要的URL参数
|
|
|
$isApp = null !== $this->get('app_version');
|
|
|
$isAppLogged = true;
|
|
|
if ($isApp) {
|
|
|
$isLogged = $this->get('uid') !== null;
|
|
|
$isAppLogged = $this->checkIsLogin();
|
|
|
} else {
|
|
|
$isLogged = $this->getUid();
|
|
|
}
|
|
|
$urlNewuser = Helpers::url('/cuxiao/coupon/newuser4');
|
|
|
$urlYohope = Helpers::url('/cuxiao/coupon/yohope');
|
|
|
$urlHelp = Helpers::url('/cuxiao/coupon/help');
|
|
|
$urlMycoupon = Helpers::url('/home/coupons', null, 'default');
|
|
|
$urlEncode = strtr($urlNewuser, array('/' => '\\/'));
|
|
|
$channel = $this->get('yh_channel', '1');
|
|
|
switch (strval($channel)) {
|
|
|
case '1':
|
|
|
$gender = '1,3';
|
|
|
break;
|
|
|
case '2':
|
|
|
$gender = '2,3';
|
|
|
break;
|
|
|
default:
|
|
|
$gender = '1,2,3';
|
|
|
}
|
|
|
$url = Helpers::url('/boys', array(), 'default') . '?openby:yohobuy={"action":"go.home","params":{"gender":"' . $gender . '","channel":"' . $channel . '"}}';
|
|
|
|
|
|
$this->_view->display('newuser4', array(
|
|
|
'activityId' => 536, //495, // 536活动ID
|
|
|
'staticTitle' => '新人潮这看,超值惊喜等你领', // 标题
|
|
|
'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlNewuser . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}',
|
|
|
'isLogged' => $isLogged ? 'Y' : 'N', // 标识是否登录
|
|
|
'url_mycoupon' => $urlMycoupon . '?openby:yohobuy={"action":"go.coupon"}',
|
|
|
'url_yohope' => $urlYohope . '?yohobuy={"action":"go.h5","params":{"islogin":"Y","type":0,"url":"' . $urlYohope . '","param":{}}}',
|
|
|
'url_help' => $urlHelp . '?yohobuy={"action":"go.h5","params":{"islogin":"Y","type":0,"url":"' . $urlHelp . '","param":{}}}',
|
|
|
'url_more' => $url,
|
|
|
|
|
|
'url_1' => 'http://list.m.yohobuy.com/?msort=1&misort=18,20,21,22&title=冬装&openby:yohobuy={"action":"go.list","params":{"msort":"1","misort":"18,20,21,22","title":"冬装"}}',
|
|
|
'url_2' => 'http://list.m.yohobuy.com/?msort=1&misort=21,22,226&title=春装外套&openby:yohobuy={"action":"go.list","params":{"msort":"1","misort":"18,20,21,22","title":"春装外套"}}',
|
|
|
'url_3' => 'http://list.m.yohobuy.com/?msort=1&misort=16,257&title=春装&openby:yohobuy={"action":"go.list","params":{"msort":"1","misort":"16,257","title":"春装"}}',
|
|
|
'url_4' => 'http://list.m.yohobuy.com/?msort=6&misort=48&title=时装鞋&openby:yohobuy={"action":"go.list","params":{"msort":"6","misort":"48","title":"时装鞋"}}',
|
|
|
'url_5' => 'http://list.m.yohobuy.com/?msort=7,8&title=包配&openby:yohobuy={"action":"go.list","params":{"msort":"7,8","title":"包配"}}',
|
|
|
'url_6' => 'http://list.m.yohobuy.com/?msort=3,4&title=下装&openby:yohobuy={"action":"go.list","params":{"msort":"3,4","title":"下装"}}',
|
|
|
'url_7' => 'http://list.m.yohobuy.com/?msort=1,3,6&misort=11,28,12,46&title=夏装&openby:yohobuy={"action":"go.list","params":{"msort":"1,3,6","misort":"11,28,12,46","title":"夏装"}}',
|
|
|
));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 新客领券YOHOPE
|
...
|
...
|
@@ -760,8 +812,8 @@ class CouponController extends HuodongAction |
|
|
}
|
|
|
|
|
|
/* 判断用户是否登录 */
|
|
|
$uid = $this->getSession(self::SESSION_UID);
|
|
|
if (!$uid) {
|
|
|
// $uid = $this->getSession(self::SESSION_UID);
|
|
|
// if (!$uid) {
|
|
|
$uid = $this->getUid();
|
|
|
if (!$uid) {
|
|
|
$result['code'] = 400;
|
...
|
...
|
@@ -769,7 +821,7 @@ class CouponController extends HuodongAction |
|
|
$result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')), 'default');
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
// }
|
|
|
|
|
|
/* 领取指定的优惠券操作 */
|
|
|
$result = ActivityData::getCouponNamed($uid, $activityId, $couponId);
|
...
|
...
|
|