Authored by hf

code review by fei.hong: do cuxiao newuser huodong

Showing 33 changed files with 280 additions and 4 deletions
  1 +<!DOCTYPE html>
  2 +<html>
  3 +<head>
  4 + <meta charset="UTF-8">
  5 + <title>{{staticTitle}}</title>
  6 + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
  7 + <style>
  8 + *{margin: 0;padding: 0;}
  9 + #coupon-container {width: 100%;}
  10 + #coupon-container img {width: 100%; height: auto; display: block;overflow: hidden;}
  11 + .img-box {width: 100%;position: relative;}
  12 + .img-box .href {width: 50%; height: 100%;position: absolute;top: 0;}
  13 + .img-box .href-left {left: 0}
  14 + .img-box .href-right {right: 0}
  15 + .img-box .href-center {width: 90%;height: 100%;position: absolute;top: 0;left: 5%;}
  16 + .show-more {height: 100%;width: 25%;position: absolute;top: 0;right: 10%;}
  17 + .yoho-tip {position: fixed;display: none;text-align: center;width: 70%;padding: 34px 0;top: 50%;left: 50%;margin-left: -35%;margin-top: -45px;background-color: #000;opacity: 0.9;color: #fff;font-size: 18px;border: none;border-radius: 10px;}
  18 + </style>
  19 + <link rel="dns-prefetch" href="//cdn.yoho.cn">
  20 + <link rel="dns-prefetch" href="//static.yohobuy.com">
  21 +</head>
  22 +<body>
  23 + <div id="coupon-container" param="{{activityId}}" isLogged="{{isLogged}}">
  24 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/01.jpg">
  25 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/02.jpg">
  26 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/03.jpg">
  27 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  28 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/04.jpg">
  29 + <div class="img-box">
  30 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/05.jpg">
  31 + <a class="href href-right" href="{{url_yohope}}"></a>
  32 + </div>
  33 + <div class="img-box">
  34 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/06.jpg">
  35 + <a class="href href-center" href="{{url_mycoupon}}"></a>
  36 + </div>
  37 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-2.jpg">
  38 +
  39 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/07.jpg">
  40 + <div class="img-box">
  41 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/08.jpg">
  42 + <a class="href href-left" href="{{url_more}}"></a>
  43 + <a class="href href-right" href="{{url_more}}"></a>
  44 + </div>
  45 + <div class="img-box">
  46 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/09.jpg">
  47 + <span class="href href-left get-coupon" href="{{jumpUrl}}" param="12345"></span>
  48 + <span class="href href-right get-coupon" href="{{jumpUrl}}" param="12346"></span>
  49 + </div>
  50 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  51 + <div class="img-box">
  52 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/10.jpg">
  53 + <a class="href href-left" href="{{url_more}}"></a>
  54 + <a class="href href-right" href="{{url_1}}"></a>
  55 + </div>
  56 + <div class="img-box">
  57 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/11.jpg">
  58 + <span class="href href-left get-coupon" href="{{jumpUrl}}" param="12347"></span>
  59 + <span class="href href-right get-coupon" href="{{jumpUrl}}" param="12348"></span>
  60 + </div>
  61 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  62 + <div class="img-box">
  63 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/12.jpg">
  64 + <a class="href href-left" href="{{url_2}}"></a>
  65 + <a class="href href-right" href="{{url_3}}"></a>
  66 + </div>
  67 + <div class="img-box">
  68 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/13.jpg">
  69 + <span class="href href-left get-coupon" href="{{jumpUrl}}" param="12349"></span>
  70 + <span class="href href-right get-coupon" href="{{jumpUrl}}" param="12350"></span>
  71 + </div>
  72 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  73 + <div class="img-box">
  74 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/14.jpg">
  75 + <a class="href href-left" href="{{url_4}}"></a>
  76 + <a class="href href-right" href="{{url_5}}"></a>
  77 + </div>
  78 + <div class="img-box">
  79 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/15.jpg">
  80 + <span class="href href-left get-coupon" href="{{jumpUrl}}" param="12351"></span>
  81 + <span class="href href-right get-coupon" href="{{jumpUrl}}" param="12352"></span>
  82 + </div>
  83 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  84 + <div class="img-box">
  85 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/16.jpg">
  86 + <a class="href href-left" href="{{url_6}}"></a>
  87 + <a class="href href-right" href="{{url_7}}"></a>
  88 + </div>
  89 + <div class="img-box">
  90 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/17.jpg">
  91 + <span class="href href-left get-coupon" href="{{jumpUrl}}" param="12353"></span>
  92 + <span class="href href-right get-coupon" href="{{jumpUrl}}" param="12354"></span>
  93 + </div>
  94 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  95 +
  96 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/24-1.jpg">
  97 + <div class="img-box">
  98 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/24-2.jpg">
  99 + <a class="show-more" href="{{url_help}}"></a>
  100 + </div>
  101 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/24-3.jpg">
  102 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-2.jpg">
  103 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/25-1.jpg">
  104 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/25-2.jpg">
  105 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/25-3.jpg">
  106 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/26.jpg">
  107 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/27.jpg">
  108 + </div>
  109 + <script type="text/javascript" src="{{jsUrl}}/cuxiao/js/jquery.min.js"></script>
  110 + <script type="text/javascript" src="{{jsUrl}}/cuxiao/js/newuser/coupon2.js"></script>
  111 +</body>
  112 +</html>
  1 +<!DOCTYPE html>
  2 +<html>
  3 +<head>
  4 + <meta charset="UTF-8">
  5 + <title>{{staticTitle}}</title>
  6 + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
  7 + <style>
  8 + *{margin: 0;padding: 0;}
  9 + #coupon-container {width: 100%;}
  10 + #coupon-container img {width: 100%; height: auto; display: block;overflow: hidden;}
  11 + .img-box {width: 100%;position: relative;}
  12 + .img-box .href {width: 50%; height: 100%;position: absolute;top: 0;}
  13 + .img-box .href-left {left: 0}
  14 + .img-box .href-right {right: 0}
  15 + .img-box .href-center {width: 90%;height: 100%;position: absolute;top: 0;left: 5%;}
  16 + .show-more {height: 100%;width: 25%;position: absolute;top: 0;right: 10%;}
  17 + .yoho-tip {position: fixed;display: none;text-align: center;width: 70%;padding: 34px 0;top: 50%;left: 50%;margin-left: -35%;margin-top: -45px;background-color: #000;opacity: 0.9;color: #fff;font-size: 18px;border: none;border-radius: 10px;}
  18 + </style>
  19 + <link rel="dns-prefetch" href="//cdn.yoho.cn">
  20 + <link rel="dns-prefetch" href="//static.yohobuy.com">
  21 +</head>
  22 +<body>
  23 + <div id="coupon-container" param="{{activityId}}" isLogged="{{isLogged}}">
  24 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/01.jpg">
  25 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/02.jpg">
  26 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/03.jpg">
  27 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  28 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/04.jpg">
  29 + <div class="img-box">
  30 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/05.jpg">
  31 + <a class="href href-right" href="{{url_yohope}}"></a>
  32 + </div>
  33 + <div class="img-box">
  34 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/06.jpg">
  35 + <a class="href href-center" href="{{url_mycoupon}}"></a>
  36 + </div>
  37 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-2.jpg">
  38 +
  39 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/07.jpg">
  40 + <div class="img-box">
  41 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/08.jpg">
  42 + <a class="href href-left" href="{{url_more}}"></a>
  43 + <a class="href href-right" href="{{url_more}}"></a>
  44 + </div>
  45 + <div class="img-box">
  46 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/09.jpg">
  47 + <span class="href href-left get-coupon" href="{{jumpUrl}}" param="19239"></span>
  48 + <span class="href href-right get-coupon" href="{{jumpUrl}}" param="19241"></span>
  49 + </div>
  50 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  51 + <div class="img-box">
  52 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/10.jpg">
  53 + <a class="href href-left" href="{{url_more}}"></a>
  54 + <a class="href href-right" href="{{url_1}}"></a>
  55 + </div>
  56 + <div class="img-box">
  57 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/11.jpg">
  58 + <span class="href href-left get-coupon" href="{{jumpUrl}}" param="19243"></span>
  59 + <span class="href href-right get-coupon" href="{{jumpUrl}}" param="19245"></span>
  60 + </div>
  61 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  62 + <div class="img-box">
  63 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/12.jpg">
  64 + <a class="href href-left" href="{{url_2}}"></a>
  65 + <a class="href href-right" href="{{url_3}}"></a>
  66 + </div>
  67 + <div class="img-box">
  68 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/13.jpg">
  69 + <span class="href href-left get-coupon" href="{{jumpUrl}}" param="19253"></span>
  70 + <span class="href href-right get-coupon" href="{{jumpUrl}}" param="19257"></span>
  71 + </div>
  72 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  73 + <div class="img-box">
  74 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/14.jpg">
  75 + <a class="href href-left" href="{{url_4}}"></a>
  76 + <a class="href href-right" href="{{url_5}}"></a>
  77 + </div>
  78 + <div class="img-box">
  79 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/15.jpg">
  80 + <span class="href href-left get-coupon" href="{{jumpUrl}}" param="19247"></span>
  81 + <span class="href href-right get-coupon" href="{{jumpUrl}}" param="19249"></span>
  82 + </div>
  83 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  84 + <div class="img-box">
  85 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/16.jpg">
  86 + <a class="href href-left" href="{{url_6}}"></a>
  87 + <a class="href href-right" href="{{url_7}}"></a>
  88 + </div>
  89 + <div class="img-box">
  90 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/17.jpg">
  91 + <span class="href href-left get-coupon" href="{{jumpUrl}}" param="19251"></span>
  92 + <span class="href href-right get-coupon" href="{{jumpUrl}}" param="19259"></span>
  93 + </div>
  94 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-1.jpg">
  95 +
  96 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/24-1.jpg">
  97 + <div class="img-box">
  98 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/24-2.jpg">
  99 + <a class="show-more" href="{{url_help}}"></a>
  100 + </div>
  101 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/24-3.jpg">
  102 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/line-2.jpg">
  103 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/25-1.jpg">
  104 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/25-2.jpg">
  105 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/25-3.jpg">
  106 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/26.jpg">
  107 + <img src="{{jsUrl}}/cuxiao/img/newuser/160310/27.jpg">
  108 + </div>
  109 + <script type="text/javascript" src="{{jsUrl}}/cuxiao/js/jquery.min.js"></script>
  110 + <script type="text/javascript" src="{{jsUrl}}/cuxiao/js/newuser/coupon2.js"></script>
  111 +</body>
  112 +</html>
@@ -520,7 +520,7 @@ class CouponController extends HuodongAction @@ -520,7 +520,7 @@ class CouponController extends HuodongAction
520 )); 520 ));
521 } 521 }
522 522
523 - /** 523 + /**
524 * 新客领券(第三波)2016年1月7号上线 524 * 新客领券(第三波)2016年1月7号上线
525 */ 525 */
526 public function newuser3Action() 526 public function newuser3Action()
@@ -577,6 +577,58 @@ class CouponController extends HuodongAction @@ -577,6 +577,58 @@ class CouponController extends HuodongAction
577 '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":"夏装"}}', 577 '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":"夏装"}}',
578 )); 578 ));
579 } 579 }
  580 +
  581 + /**
  582 + * 新客领券(第4波)2016年3月14号上线
  583 + */
  584 + public function newuser4Action()
  585 + {
  586 + // 判断是否是应用访问, 拼接APP需要的URL参数
  587 + $isApp = null !== $this->get('app_version');
  588 + $isAppLogged = true;
  589 + if ($isApp) {
  590 + $isLogged = $this->get('uid') !== null;
  591 + $isAppLogged = $this->checkIsLogin();
  592 + } else {
  593 + $isLogged = $this->getUid();
  594 + }
  595 + $urlNewuser = Helpers::url('/cuxiao/coupon/newuser4');
  596 + $urlYohope = Helpers::url('/cuxiao/coupon/yohope');
  597 + $urlHelp = Helpers::url('/cuxiao/coupon/help');
  598 + $urlMycoupon = Helpers::url('/home/coupons', null, 'default');
  599 + $urlEncode = strtr($urlNewuser, array('/' => '\\/'));
  600 + $channel = $this->get('yh_channel', '1');
  601 + switch (strval($channel)) {
  602 + case '1':
  603 + $gender = '1,3';
  604 + break;
  605 + case '2':
  606 + $gender = '2,3';
  607 + break;
  608 + default:
  609 + $gender = '1,2,3';
  610 + }
  611 + $url = Helpers::url('/boys', array(), 'default') . '?openby:yohobuy={"action":"go.home","params":{"gender":"' . $gender . '","channel":"' . $channel . '"}}';
  612 +
  613 + $this->_view->display('newuser4', array(
  614 + 'activityId' => 536, //495, // 536活动ID
  615 + 'staticTitle' => '新人潮这看,超值惊喜等你领', // 标题
  616 + 'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlNewuser . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{"from":"app"}},"requesturl":{"url":"","param":{}},"priority":"N"}}',
  617 + 'isLogged' => $isLogged ? 'Y' : 'N', // 标识是否登录
  618 + 'url_mycoupon' => $urlMycoupon . '?openby:yohobuy={"action":"go.coupon"}',
  619 + 'url_yohope' => $urlYohope . '?yohobuy={"action":"go.h5","params":{"islogin":"Y","type":0,"url":"' . $urlYohope . '","param":{}}}',
  620 + 'url_help' => $urlHelp . '?yohobuy={"action":"go.h5","params":{"islogin":"Y","type":0,"url":"' . $urlHelp . '","param":{}}}',
  621 + 'url_more' => $url,
  622 +
  623 + '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":"冬装"}}',
  624 + '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":"春装外套"}}',
  625 + '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":"春装"}}',
  626 + 'url_4' => 'http://list.m.yohobuy.com/?msort=6&misort=48&title=时装鞋&openby:yohobuy={"action":"go.list","params":{"msort":"6","misort":"48","title":"时装鞋"}}',
  627 + 'url_5' => 'http://list.m.yohobuy.com/?msort=7,8&title=包配&openby:yohobuy={"action":"go.list","params":{"msort":"7,8","title":"包配"}}',
  628 + 'url_6' => 'http://list.m.yohobuy.com/?msort=3,4&title=下装&openby:yohobuy={"action":"go.list","params":{"msort":"3,4","title":"下装"}}',
  629 + '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":"夏装"}}',
  630 + ));
  631 + }
580 632
581 /** 633 /**
582 * 新客领券YOHOPE 634 * 新客领券YOHOPE
@@ -760,8 +812,8 @@ class CouponController extends HuodongAction @@ -760,8 +812,8 @@ class CouponController extends HuodongAction
760 } 812 }
761 813
762 /* 判断用户是否登录 */ 814 /* 判断用户是否登录 */
763 - $uid = $this->getSession(self::SESSION_UID);  
764 - if (!$uid) { 815 +// $uid = $this->getSession(self::SESSION_UID);
  816 +// if (!$uid) {
765 $uid = $this->getUid(); 817 $uid = $this->getUid();
766 if (!$uid) { 818 if (!$uid) {
767 $result['code'] = 400; 819 $result['code'] = 400;
@@ -769,7 +821,7 @@ class CouponController extends HuodongAction @@ -769,7 +821,7 @@ class CouponController extends HuodongAction
769 $result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')), 'default'); 821 $result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')), 'default');
770 break; 822 break;
771 } 823 }
772 - } 824 +// }
773 825
774 /* 领取指定的优惠券操作 */ 826 /* 领取指定的优惠券操作 */
775 $result = ActivityData::getCouponNamed($uid, $activityId, $couponId); 827 $result = ActivityData::getCouponNamed($uid, $activityId, $couponId);