Showing
12 changed files
with
178 additions
and
0 deletions
static/huodong/cuxiao/img/newyear/14.png
0 → 100644
7.04 KB
13.8 KB
13.5 KB
13.8 KB
13.9 KB
31.7 KB
static/huodong/cuxiao/img/newyear/fail.png
0 → 100644
8.6 KB
static/huodong/cuxiao/img/newyear/geted.png
0 → 100644
8.36 KB
static/huodong/cuxiao/img/newyear/share.png
0 → 100644
24.4 KB
static/huodong/cuxiao/img/newyear/top-bg.png
0 → 100644
87.9 KB
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
5 | + <meta charset="utf-8"> | ||
6 | + <title>{{staticTitle}}</title> | ||
7 | + <meta name="apple-mobile-web-app-title" content="SUMMER SALE"> | ||
8 | + <meta name="format-detection" content="telephone=no"> | ||
9 | + <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui" | ||
10 | + media="(device-height: 568px)"> | ||
11 | + <meta name="apple-mobile-web-app-capable" content="yes"> | ||
12 | + <meta name="apple-mobile-web-app-status-bar-style" content="grey"> | ||
13 | + <link rel="stylesheet" href="{{imgUrl}}/cuxiao/css/newyear/index3.css"> | ||
14 | + <script> | ||
15 | + (function(doc, win) { | ||
16 | + var docEl = doc.documentElement; | ||
17 | + (function() { | ||
18 | + var clientWidth = docEl.clientWidth; | ||
19 | + if (!clientWidth) { | ||
20 | + return; | ||
21 | + } | ||
22 | + docEl.style.fontSize = 20 * (clientWidth / 320) + 'px'; | ||
23 | + }()); | ||
24 | + })(document, window); | ||
25 | + </script> | ||
26 | +</head> | ||
27 | +<body class="keBody"> | ||
28 | +<div class="coupon-christmas" show="{{showPopupFlag}}"> | ||
29 | + <div class="coupon-top"> | ||
30 | + <img src="{{imgUrl}}/cuxiao/img/newyear/top-bg.png" alt=""> | ||
31 | + <a class="go-check" href="{{myCouponUrl}}"></a> | ||
32 | + <a class="share-btn" href="javascript:;"></a> | ||
33 | + </div> | ||
34 | + <div class="coupon-bottom"> | ||
35 | + <div class="coupon-banner"> | ||
36 | + <a href="{{bannerUrl_1}}"> | ||
37 | + <img src="{{imgUrl}}/cuxiao/img/newyear/banner01.png" alt=""> | ||
38 | + </a> | ||
39 | + <a href="{{bannerUrl_2}}"> | ||
40 | + <img src="{{imgUrl}}/cuxiao/img/newyear/banner02.png" alt=""> | ||
41 | + </a> | ||
42 | + <a href="{{bannerUrl_3}}"> | ||
43 | + <img src="{{imgUrl}}/cuxiao/img/newyear/banner03.png" alt=""> | ||
44 | + </a> | ||
45 | + <a href="{{bannerUrl_4}}"> | ||
46 | + <img src="{{imgUrl}}/cuxiao/img/newyear/banner04.png" alt=""> | ||
47 | + </a> | ||
48 | + </div> | ||
49 | + <div class="bottom-btn"> | ||
50 | + <a class="follow-yoho" href="http://mp.weixin.qq.com/s?__biz=MjM5ODI5MDA4MA==&mid=201849402&idx=1&sn=c0089812f9769d82e0075f69d771f6e1#rd"></a> | ||
51 | + <a class="download-yoho" href="http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445"></a> | ||
52 | + </div> | ||
53 | + | ||
54 | + </div> | ||
55 | + <div class="coupon-ft"> | ||
56 | + <img src="{{imgUrl}}/cuxiao/img/newyear/14.png"> | ||
57 | + </div> | ||
58 | +</div> | ||
59 | +<div class="modal"></div> | ||
60 | +<div class="dialog-box geted"> | ||
61 | + <div class="dialog-inner"> | ||
62 | + <img src="{{imgUrl}}/cuxiao/img/newyear/geted.png" alt=""/> | ||
63 | + <span class="dialog-close"></span> | ||
64 | + </div> | ||
65 | +</div> | ||
66 | + | ||
67 | +<div class="dialog-box fail"> | ||
68 | + <div class="dialog-inner"> | ||
69 | + <img src="{{imgUrl}}/cuxiao/img/newyear/fail.png" alt=""/> | ||
70 | + <span class="refresh-btn"></span> | ||
71 | + </div> | ||
72 | +</div> | ||
73 | +<input id="shareLink" type="hidden" value="{{shareLink}}"> | ||
74 | +<input id="shareImg" type="hidden" value="{{shareImg}}"> | ||
75 | +<input id="shareTitle" type="hidden" value="{{shareTitle}}"> | ||
76 | +<input id="shareDesc" type="hidden" value="{{shareDesc}}"> | ||
77 | +<script type="text/javascript" src="{{imgUrl}}/cuxiao/js/jquery.min.js"></script> | ||
78 | +<script> | ||
79 | + | ||
80 | + //提示分享 | ||
81 | + $('.share-btn').click(function () { | ||
82 | + $('.modal').fadeIn(); | ||
83 | + }); | ||
84 | + //关闭提示分享 | ||
85 | + $('.modal').click(function () { | ||
86 | + $(this).fadeOut(); | ||
87 | + }); | ||
88 | + | ||
89 | + //提示已领过券 | ||
90 | + if ($('.coupon-christmas').attr('show') === '1') { | ||
91 | + $('.dialog-box.geted').show(); | ||
92 | + } | ||
93 | + //提示领券失败 | ||
94 | + else if ($('.coupon-christmas').attr('show') === '2') { | ||
95 | + $('.dialog-box.fail').show(); | ||
96 | + } | ||
97 | + | ||
98 | + //关闭提示 | ||
99 | + $('.dialog-close').click(function(){ | ||
100 | + $(this).parents('.dialog-box').fadeOut(); | ||
101 | + }); | ||
102 | + //刷新页面 | ||
103 | + $('.refresh-btn').click(function() { | ||
104 | + location.reload(); | ||
105 | + }) | ||
106 | +</script> | ||
107 | +</body> | ||
108 | +</html> |
@@ -110,7 +110,59 @@ class ChristmasController extends HuodongAction | @@ -110,7 +110,59 @@ class ChristmasController extends HuodongAction | ||
110 | 'bannerUrl_4' => 'http://feature.yoho.cn/1221/1221APPHOMEKIDS/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"潮集圣诞","url":"http://feature.yoho.cn/1221/1221APPHOMEKIDS/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"534"},"param":{"share_id":"534"}}}', | 110 | 'bannerUrl_4' => 'http://feature.yoho.cn/1221/1221APPHOMEKIDS/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"潮集圣诞","url":"http://feature.yoho.cn/1221/1221APPHOMEKIDS/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"534"},"param":{"share_id":"534"}}}', |
111 | )); | 111 | )); |
112 | } | 112 | } |
113 | + | ||
114 | + /** | ||
115 | + * 元旦领券(圣诞领券第三波) | ||
116 | + * 备注:2015年12月25号测试 | ||
117 | + */ | ||
118 | + public function newyear3Action() | ||
119 | + { | ||
120 | + //获取登录者ID,未登录返回false | ||
121 | + $uid = $this->getLoggedUid(); | ||
122 | + if (!$uid || !is_numeric($uid)) { | ||
123 | + //未登录的用户访问,跳转到登录页面。并且在登陆后跳转回本页面 | ||
124 | + $this->go(Helpers::url('/signin.html', array('refer' => Helpers::url('/cuxiao/christmas/christmas2')), 'default')); | ||
125 | + } | ||
126 | + | ||
127 | + // 该变量用来控制和显示页面的弹出提示 | ||
128 | + $showPopupFlag = '0'; | ||
129 | + | ||
130 | + //获取跳转到个人中心-我的优惠券链接,并调用接口,完成领券操作 | ||
131 | + $myCouponUrl = Helpers::url('/home/coupons', null, 'default') . '?openby:yohobuy={"action":"go.coupon"}'; | ||
132 | + $activityId = $this->getActivityId3(); | ||
133 | + $result = ActivityData::getCouponAll($uid, $activityId); | ||
134 | + if (isset($result['code'])) { | ||
135 | + switch (intval($result['code'])) { | ||
136 | + case 200: // 领取成功, 发送站内信消息 | ||
137 | + $showPopupFlag = '0'; | ||
138 | + $this->sendMessage($uid, '【优惠券】您获得500元元旦优惠券', '尊敬的客户:恭喜您成功获得500元套券 !您可以在个人中心的交易管理中查看‘我的优惠券’。'); | ||
139 | + break; | ||
140 | + case 201: // 已领取过, 提示重复领券 | ||
141 | + $showPopupFlag = '1'; | ||
142 | + break; | ||
143 | + default: // 领取失败, 提示领券失败 | ||
144 | + $showPopupFlag = '2'; | ||
145 | + break; | ||
146 | + } | ||
147 | + } | ||
113 | 148 | ||
149 | + $this->_view->display('index-3', array( | ||
150 | + 'staticTitle' => '年终热促', | ||
151 | + 'weixinShare' => $this->_isApp ? false : true, // 是否需要微信分享 | ||
152 | + 'shareLink' => 'http://feature.yohobuy.com/0/0/724/index.html', | ||
153 | + 'shareTitle' => 'YOHO!BUY有货【Final Sale】年终热促开启,限时4.8折封顶!', | ||
154 | + 'shareDesc' => '500元优惠券限时派送,更有800+潮牌跨年礼物赠不停!', | ||
155 | + 'shareImg' => 'http://img11.static.yhbimg.com/couponImg/2015/12/25/07/010657d070da271499ad9367c5806486b2.png', | ||
156 | + 'showPopupFlag' => $showPopupFlag, | ||
157 | + 'myCouponUrl' => $myCouponUrl, | ||
158 | + 'bannerUrl_1' => 'http://feature.yoho.cn/1228/1228APPHOMEBOY/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"Final sale","url":"http://feature.yoho.cn/1228/1228APPHOMEBOY/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"360"},param":{"share_id":"360"}}}', | ||
159 | + 'bannerUrl_2' => 'http://feature.yoho.cn/1228/1228APPHOMEGIRL/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"Final sale","url":"http://feature.yoho.cn/1228/1228APPHOMEGIRL/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"358"},param":{"share_id":"358"}}}', | ||
160 | + 'bannerUrl_3' => 'http://feature.yoho.cn/1228/1228APPHOMEKIDS/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"Final sale","url":"http://feature.yoho.cn/1228/1228APPHOMEKIDS/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"356"},param":{"share_id":"356"}}}', | ||
161 | + 'bannerUrl_4' => 'http://feature.yoho.cn/1228/1228APPHOMELIFE/index.html?openby:yohobuy={"action":"go.h5","params":{"title":"Final sale","url":"http://feature.yoho.cn/1228/1228APPHOMELIFE/index.html?","share":"\/operations\/api\/v5\/webshare\/getShare","shareparam":{"share_id":"354"},param":{"share_id":"354"}}} | ||
162 | +', | ||
163 | + )); | ||
164 | + } | ||
165 | + | ||
114 | /** | 166 | /** |
115 | * 检测登录状态 | 167 | * 检测登录状态 |
116 | * | 168 | * |
@@ -182,4 +234,22 @@ class ChristmasController extends HuodongAction | @@ -182,4 +234,22 @@ class ChristmasController extends HuodongAction | ||
182 | } | 234 | } |
183 | } | 235 | } |
184 | 236 | ||
237 | + /** | ||
238 | + * 根据环境来获取活动ID | ||
239 | + * | ||
240 | + * @return int | ||
241 | + */ | ||
242 | + private function getActivityId3() | ||
243 | + { | ||
244 | + // 设置环境变量 | ||
245 | + switch (APPLICATION_ENV) { | ||
246 | + case 'production': // 生产 | ||
247 | + return 390; | ||
248 | + case 'preview': // 预览 | ||
249 | + case 'testing': // 测试 | ||
250 | + case 'develop': // 开发 | ||
251 | + default: | ||
252 | + return 85; | ||
253 | + } | ||
254 | + } | ||
185 | } | 255 | } |
-
Please register or login to post a comment