do cuxiao new user coupon feature
Showing
59 changed files
with
1036 additions
and
182 deletions
@@ -73,8 +73,11 @@ class AbstractAction extends Controller_Abstract | @@ -73,8 +73,11 @@ class AbstractAction extends Controller_Abstract | ||
73 | * @param mixed $default | 73 | * @param mixed $default |
74 | * @return mixed | 74 | * @return mixed |
75 | */ | 75 | */ |
76 | - protected function get($key, $default = null) | 76 | + protected function get($key = null, $default = null) |
77 | { | 77 | { |
78 | + if (null === $key) { | ||
79 | + return $_GET; | ||
80 | + } | ||
78 | return $this->_request->getQuery($key, $default); | 81 | return $this->_request->getQuery($key, $default); |
79 | } | 82 | } |
80 | 83 | ||
@@ -85,8 +88,11 @@ class AbstractAction extends Controller_Abstract | @@ -85,8 +88,11 @@ class AbstractAction extends Controller_Abstract | ||
85 | * @param mixed $default | 88 | * @param mixed $default |
86 | * @return mixed | 89 | * @return mixed |
87 | */ | 90 | */ |
88 | - protected function post($key, $default = null) | 91 | + protected function post($key = null, $default = null) |
89 | { | 92 | { |
93 | + if (null === $key) { | ||
94 | + return $_POST; | ||
95 | + } | ||
90 | return $this->_request->getPost($key, $default); | 96 | return $this->_request->getPost($key, $default); |
91 | } | 97 | } |
92 | 98 |
static/img/cuxiao/newuser/00.jpg
0 → 100644

1.35 KB
static/img/cuxiao/newuser/01.jpg
0 → 100644

50.9 KB
static/img/cuxiao/newuser/02.jpg
0 → 100644

45.4 KB
static/img/cuxiao/newuser/03.jpg
0 → 100644

33.4 KB
static/img/cuxiao/newuser/04.jpg
0 → 100644

7.12 KB
static/img/cuxiao/newuser/05.jpg
0 → 100644

3.78 KB
static/img/cuxiao/newuser/06.jpg
0 → 100644

2.35 KB
static/img/cuxiao/newuser/07.jpg
0 → 100644

7.47 KB
static/img/cuxiao/newuser/08.jpg
0 → 100644

95.3 KB
static/img/cuxiao/newuser/09.jpg
0 → 100644

94.3 KB
static/img/cuxiao/newuser/10.jpg
0 → 100644

84.8 KB
static/img/cuxiao/newuser/11.jpg
0 → 100644

78.4 KB
static/img/cuxiao/newuser/12.jpg
0 → 100644

102 KB
static/img/cuxiao/newuser/13.jpg
0 → 100644

51.6 KB
static/img/cuxiao/newuser/14.jpg
0 → 100644

1.62 KB
static/img/cuxiao/newuser/15.jpg
0 → 100644

5 KB
static/img/cuxiao/newuser/16.jpg
0 → 100644

5.52 KB
static/img/cuxiao/newuser/17.jpg
0 → 100644

16.4 KB
static/img/cuxiao/newuser/18.jpg
0 → 100644

15.6 KB
static/img/cuxiao/newuser/19.jpg
0 → 100644

8.13 KB
static/img/cuxiao/newuser/banner.jpg
0 → 100644

43.2 KB
static/img/cuxiao/newuser/brand-01.jpg
0 → 100644

3.72 KB
static/img/cuxiao/newuser/brand-02.jpg
0 → 100644

3.59 KB
static/img/cuxiao/newuser/brand-03.jpg
0 → 100644

5.08 KB
static/img/cuxiao/newuser/brand-04.jpg
0 → 100644

6.42 KB
static/img/cuxiao/newuser/brand-05.jpg
0 → 100644

4.97 KB
static/img/cuxiao/newuser/brand-06.jpg
0 → 100644

5.11 KB
static/img/cuxiao/newuser/brand-07.jpg
0 → 100644

6.31 KB
static/img/cuxiao/newuser/brand-08.jpg
0 → 100644

3.96 KB
static/img/cuxiao/newuser/brand-09.jpg
0 → 100644

4.99 KB
static/img/cuxiao/newuser/brand-10.jpg
0 → 100644

4.65 KB
static/img/cuxiao/newuser/brand-11.jpg
0 → 100644

4.82 KB
static/img/cuxiao/newuser/brand-12.jpg
0 → 100644

4.43 KB
static/img/cuxiao/newuser/brand-13.jpg
0 → 100644

6.06 KB
static/img/cuxiao/newuser/brand-14.jpg
0 → 100644

7.69 KB
static/img/cuxiao/newuser/brand-15.jpg
0 → 100644

4.04 KB
static/img/cuxiao/newuser/brand-16.jpg
0 → 100644

4.78 KB
static/img/cuxiao/newuser/brand-17.jpg
0 → 100644

4.57 KB
static/img/cuxiao/newuser/brand-18.jpg
0 → 100644

5.28 KB
static/img/cuxiao/newuser/brand-19.jpg
0 → 100644

4.2 KB
static/img/cuxiao/newuser/brand-20.jpg
0 → 100644

4.14 KB
static/img/cuxiao/newuser/brand-21.jpg
0 → 100644

3.24 KB
static/img/cuxiao/newuser/brand-22.jpg
0 → 100644

8.69 KB
static/img/cuxiao/newuser/brand-23.jpg
0 → 100644

4.67 KB
static/img/cuxiao/newuser/brand-24.jpg
0 → 100644

3.8 KB
static/img/cuxiao/newuser/brand-25.jpg
0 → 100644

6.22 KB
static/img/cuxiao/newuser/brand-26.jpg
0 → 100644

5.76 KB
static/img/cuxiao/newuser/two.jpg
0 → 100644

5.16 KB
@@ -5,20 +5,22 @@ var activityId = $('#coupon-container').attr('param'); | @@ -5,20 +5,22 @@ var activityId = $('#coupon-container').attr('param'); | ||
5 | 5 | ||
6 | $('.get-coupon').click(function() { | 6 | $('.get-coupon').click(function() { |
7 | var couponId = $(this).attr('param'); | 7 | var couponId = $(this).attr('param'); |
8 | + var isApp = $(this).attr('href') !== 'javascript:;'; | ||
8 | if (!isNaN(activityId) && !isNaN(couponId)) { | 9 | if (!isNaN(activityId) && !isNaN(couponId)) { |
9 | - getNamedCoupon(activityId, couponId); | 10 | + getNamedCoupon(activityId, couponId, isApp); |
10 | } | 11 | } |
11 | }); | 12 | }); |
12 | /* 领所有券 */ | 13 | /* 领所有券 */ |
13 | $('#get-all-coupon').click(function() { | 14 | $('#get-all-coupon').click(function() { |
14 | - getAllCoupon(activityId); | 15 | + var isApp = $(this).attr('href') !== 'javascript:;'; |
16 | + getAllCoupon(activityId, isApp); | ||
15 | }); | 17 | }); |
16 | 18 | ||
17 | /** | 19 | /** |
18 | * 微信分享 | 20 | * 微信分享 |
19 | */ | 21 | */ |
20 | (function($) { | 22 | (function($) { |
21 | - if (!wx) { | 23 | + if (typeof(wx) == "undefined") { |
22 | return; | 24 | return; |
23 | } | 25 | } |
24 | var _weChatInterface = 'http://www.yohoshow.com/api/wechat/getSignPackage'; | 26 | var _weChatInterface = 'http://www.yohoshow.com/api/wechat/getSignPackage'; |
@@ -125,7 +127,7 @@ function showTip(con, dur) { | @@ -125,7 +127,7 @@ function showTip(con, dur) { | ||
125 | content = con.toString(); | 127 | content = con.toString(); |
126 | duration = (dur && dur > 0) ? dur : 2000; | 128 | duration = (dur && dur > 0) ? dur : 2000; |
127 | 129 | ||
128 | - $tip.text(content).show(); | 130 | + $tip.html(content).show(); |
129 | 131 | ||
130 | tipItime = setTimeout(function() { | 132 | tipItime = setTimeout(function() { |
131 | if ($tip.css('display') === 'block') { | 133 | if ($tip.css('display') === 'block') { |
@@ -137,7 +139,7 @@ function showTip(con, dur) { | @@ -137,7 +139,7 @@ function showTip(con, dur) { | ||
137 | /** | 139 | /** |
138 | * 获取活动的指定优惠券 | 140 | * 获取活动的指定优惠券 |
139 | */ | 141 | */ |
140 | -function getNamedCoupon(activityId, couponId) | 142 | +function getNamedCoupon(activityId, couponId, isApp) |
141 | { | 143 | { |
142 | $.ajax({ | 144 | $.ajax({ |
143 | type: 'POST', | 145 | type: 'POST', |
@@ -145,13 +147,21 @@ function getNamedCoupon(activityId, couponId) | @@ -145,13 +147,21 @@ function getNamedCoupon(activityId, couponId) | ||
145 | data: 'activityId=' + activityId + '&couponId=' + couponId, | 147 | data: 'activityId=' + activityId + '&couponId=' + couponId, |
146 | success: function(data) { | 148 | success: function(data) { |
147 | if (data.code == 200) { | 149 | if (data.code == 200) { |
148 | - showTip('领取成功'); | 150 | + showTip('恭喜你成功领取品牌优惠券<br><br>快去分享给你的小伙伴吧!'); |
151 | + } | ||
152 | + else if (data.code == 201) { | ||
153 | + showTip('你已领取过品牌优惠券<br><br>快去选购心仪的商品吧!'); | ||
149 | } | 154 | } |
150 | else if (data.code == 400) { | 155 | else if (data.code == 400) { |
151 | - location.href = data.data; | 156 | + if (isApp) { |
157 | + showTip('请先登录!'); | ||
158 | + } else { | ||
159 | + location.href = data.data; | ||
160 | + } | ||
152 | } | 161 | } |
153 | else if (data.message) { | 162 | else if (data.message) { |
154 | - showTip('领取失败'); | 163 | + //showTip(data.message); |
164 | + showTip('系统繁忙,请稍候再试!'); | ||
155 | } | 165 | } |
156 | }, | 166 | }, |
157 | error: function() { | 167 | error: function() { |
@@ -163,7 +173,7 @@ function getNamedCoupon(activityId, couponId) | @@ -163,7 +173,7 @@ function getNamedCoupon(activityId, couponId) | ||
163 | /** | 173 | /** |
164 | * 获取活动所有的优惠券 | 174 | * 获取活动所有的优惠券 |
165 | */ | 175 | */ |
166 | -function getAllCoupon(activityId) | 176 | +function getAllCoupon(activityId, isApp) |
167 | { | 177 | { |
168 | $.ajax({ | 178 | $.ajax({ |
169 | type: 'POST', | 179 | type: 'POST', |
@@ -172,13 +182,21 @@ function getAllCoupon(activityId) | @@ -172,13 +182,21 @@ function getAllCoupon(activityId) | ||
172 | dataType: 'json', | 182 | dataType: 'json', |
173 | success: function(data) { | 183 | success: function(data) { |
174 | if (data.code == 200) { | 184 | if (data.code == 200) { |
175 | - showTip('领取成功'); | 185 | + showTip('恭喜您,成功领取'); |
186 | + } | ||
187 | + else if (data.code == 201) { | ||
188 | + showTip('对不起,您已经领取过'); | ||
176 | } | 189 | } |
177 | else if (data.code == 400) { | 190 | else if (data.code == 400) { |
178 | - location.href = data.data; | 191 | + if (isApp) { |
192 | + showTip('请先登录!'); | ||
193 | + } else { | ||
194 | + location.href = data.data; | ||
195 | + } | ||
179 | } | 196 | } |
180 | else if (data.message) { | 197 | else if (data.message) { |
181 | - showTip('领取失败'); | 198 | + //showTip(data.message); |
199 | + showTip('系统繁忙,请稍候再试!'); | ||
182 | } | 200 | } |
183 | }, | 201 | }, |
184 | error: function() { | 202 | error: function() { |
static/js/cuxiao/jquery.lazyload.js
0 → 100644
1 | +(function($, window, document, undefined) { | ||
2 | + var $window = $(window); | ||
3 | + | ||
4 | + $.fn.lazyload = function(options) { | ||
5 | + var elements = this; | ||
6 | + var $container; | ||
7 | + var settings = { | ||
8 | + threshold : 0, | ||
9 | + failure_limit : 0, | ||
10 | + event : "scroll", | ||
11 | + effect : "show", | ||
12 | + container : window, | ||
13 | + data_attribute : "original", | ||
14 | + skip_invisible : true, | ||
15 | + appear : null, | ||
16 | + load : null, | ||
17 | + yasPath: '/web/', | ||
18 | + yasImgDomain: 'http://analytics.yhurl.com/yas.gif', | ||
19 | + placeholder : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC", | ||
20 | + try_again_css: null | ||
21 | + | ||
22 | + }; | ||
23 | + | ||
24 | + function update() { | ||
25 | + var counter = 0; | ||
26 | + | ||
27 | + elements.each(function() { | ||
28 | + var $this = $(this); | ||
29 | + if (settings.skip_invisible && !$this.is(":visible")) { | ||
30 | + return; | ||
31 | + } | ||
32 | + if ($.abovethetop(this, settings) || | ||
33 | + $.leftofbegin(this, settings)) { | ||
34 | + /* Nothing. */ | ||
35 | + } else if (!$.belowthefold(this, settings) && | ||
36 | + !$.rightoffold(this, settings)) { | ||
37 | + $this.trigger("appear"); | ||
38 | + /* if we found an image we'll load, reset the counter */ | ||
39 | + counter = 0; | ||
40 | + } else { | ||
41 | + if (++counter > settings.failure_limit) { | ||
42 | + return false; | ||
43 | + } | ||
44 | + } | ||
45 | + }); | ||
46 | + | ||
47 | + }; | ||
48 | + | ||
49 | + //add by jp, 发送图片方式跨域发送消息 | ||
50 | + function crossSend(param, callback) { | ||
51 | + var image = new Image(1, 1); | ||
52 | + image.src = settings.yasImgDomain + settings.yasPath + '?' + param; | ||
53 | + image.onload = function() { | ||
54 | + image.onload = null; | ||
55 | + if (callback) { | ||
56 | + callback(); | ||
57 | + } | ||
58 | + }; | ||
59 | + }; | ||
60 | + | ||
61 | + if(options) { | ||
62 | + /* Maintain BC for a couple of versions. */ | ||
63 | + if (undefined !== options.failurelimit) { | ||
64 | + options.failure_limit = options.failurelimit; | ||
65 | + delete options.failurelimit; | ||
66 | + } | ||
67 | + if (undefined !== options.effectspeed) { | ||
68 | + options.effect_speed = options.effectspeed; | ||
69 | + delete options.effectspeed; | ||
70 | + } | ||
71 | + | ||
72 | + $.extend(settings, options); | ||
73 | + } | ||
74 | + | ||
75 | + /* Cache container as jQuery as object. */ | ||
76 | + $container = (settings.container === undefined || | ||
77 | + settings.container === window) ? $window : $(settings.container); | ||
78 | + | ||
79 | + /* Fire one scroll event per scroll. Not one scroll event per image. */ | ||
80 | + if (0 === settings.event.indexOf("scroll")) { | ||
81 | + $container.bind(settings.event, function() { | ||
82 | + return update(); | ||
83 | + }); | ||
84 | + } | ||
85 | + | ||
86 | + this.each(function() { | ||
87 | + var self = this; | ||
88 | + var $self = $(self); | ||
89 | + | ||
90 | + self.loaded = false; | ||
91 | + | ||
92 | + /* If no src attribute given use data:uri. */ | ||
93 | + if ($self.attr("src") === undefined || $self.attr("src") === false || $self.attr("src") === '') { | ||
94 | + if ($self.is("img")) { | ||
95 | + $self.attr("src", settings.placeholder); | ||
96 | + } | ||
97 | + } | ||
98 | + | ||
99 | + /* When appear is triggered load original image. */ | ||
100 | + $self.one("appear", function() { | ||
101 | + | ||
102 | + //add by jp | ||
103 | + if($self.timerid) clearTimeout($self.timerid); | ||
104 | + //console.log("img appear, this.loaded:" + this.loaded + ", id:" + $self.attr("id")); | ||
105 | + | ||
106 | + if (!this.loaded) { | ||
107 | + if (settings.appear) { | ||
108 | + var elements_left = elements.length; | ||
109 | + settings.appear.call(self, elements_left, settings); | ||
110 | + } | ||
111 | + $("<img />") | ||
112 | + //add by jp | ||
113 | + .bind("error abort", function(){ | ||
114 | + $self.attr("src",settings.placeholder); | ||
115 | + loadfail({info:'error'}); | ||
116 | + }) | ||
117 | + .bind("load", function() { | ||
118 | + | ||
119 | + //add by jp, 加载超时后,不再进行加载,通过传统方式设置src,边下载边渲染 | ||
120 | + if($self.loadtimeout){ | ||
121 | + return; | ||
122 | + } | ||
123 | + | ||
124 | + //add by jp, 清理检测图片下载超时定时器 | ||
125 | + clearTimeout($self.timerid); | ||
126 | + | ||
127 | + //add by jp, 上报图片加载成功事件 | ||
128 | + if( $self.attr("pfmrpt") ){ | ||
129 | + //crossImgSend('success'); | ||
130 | + } | ||
131 | + | ||
132 | + var original = $self.attr("data-" + settings.data_attribute); | ||
133 | + $self.hide(); | ||
134 | + if ($self.is("img")) { | ||
135 | + $self.attr("src", original); | ||
136 | + } else { | ||
137 | + $self.css("background-image", "url('" + original + "')"); | ||
138 | + } | ||
139 | + $self[settings.effect](settings.effect_speed); | ||
140 | + | ||
141 | + self.loaded = true; | ||
142 | + | ||
143 | + /* Remove image from array so it is not looped next time. */ | ||
144 | + var temp = $.grep(elements, function(element) { | ||
145 | + return !element.loaded; | ||
146 | + }); | ||
147 | + elements = $(temp); | ||
148 | + | ||
149 | + if (settings.load) { | ||
150 | + var elements_left = elements.length; | ||
151 | + settings.load.call(self, elements_left, settings); | ||
152 | + } | ||
153 | + }) | ||
154 | + .attr("src", $self.attr("data-" + settings.data_attribute)); | ||
155 | + | ||
156 | + //add by jp , 临时保存图片url | ||
157 | + $self.src = $self.attr("data-" + settings.data_attribute); | ||
158 | + | ||
159 | + //add by jp , 上报图片开始加载事件 | ||
160 | + if( $self.attr("pfmrpt") && _yas && _yas.add){ | ||
161 | + //crossImgSend(,'start'); | ||
162 | + } | ||
163 | + | ||
164 | + //add by jp, 图片加载失败或超时的处理 | ||
165 | + var loadtimeout = function(options){ | ||
166 | + | ||
167 | + //记录标识图片加载超时 | ||
168 | + $self.loadtimeout = true; | ||
169 | + | ||
170 | + //上报图片加载超时事件 | ||
171 | + if( $self.attr("pfmrpt") && _yas && _yas.add){ | ||
172 | + options.info ; //error or timeout | ||
173 | + //crossImgSend(settings.yasImgDomain,settings.yasPath,'fail'); | ||
174 | + } | ||
175 | + | ||
176 | + //清除图片src取值,便于图片边下载边渲染 | ||
177 | + $self.attr("src",""); | ||
178 | + | ||
179 | + setTimeout(function(){ | ||
180 | + $self.attr("src",$self.src); | ||
181 | + },50); | ||
182 | + | ||
183 | + }; | ||
184 | + | ||
185 | + //add by jp, 图片加载失败或超时的处理 | ||
186 | + var loadfail = function(options){ | ||
187 | + | ||
188 | + //记录标识图片加载超时 | ||
189 | + $self.loadtimeout = true; | ||
190 | + | ||
191 | + //上报图片加载失败事件 | ||
192 | + if( $self.attr("pfmrpt") && _yas && _yas.add){ | ||
193 | + options.info ; //error or timeout | ||
194 | + //crossImgSend(settings.yasImgDomain,settings.yasPath,'fail'); | ||
195 | + } | ||
196 | + | ||
197 | + var width = $self.width(); | ||
198 | + var height = $self.height(); | ||
199 | + | ||
200 | + var $tryagain = $("<div class="+settings.try_again_css+" style='background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB/AAffA0nNPuCLAAAAAElFTkSuQmCC) ;text-align: center;position:relative;width:"+width+"px;height:"+height+"px; line-height:"+height+"px'>图片打开失败,点击重新加载</div>"); | ||
201 | + // $tryagain.css("background-image",settings.placeholder); | ||
202 | + $self.replaceWith($tryagain); | ||
203 | + $tryagain.bind("click", function(e){ | ||
204 | + e.preventDefault(); | ||
205 | + $tryagain.replaceWith($self); | ||
206 | + //清除图片src取值,便于图片边下载边渲染 | ||
207 | + $self.attr("src",""); | ||
208 | + setTimeout(function(){ | ||
209 | + $self.attr("src",$self.src); | ||
210 | + },50); | ||
211 | + }); | ||
212 | + }; | ||
213 | + | ||
214 | + | ||
215 | + //图片下载超时检测 | ||
216 | + $self.timerid = setTimeout(loadtimeout,5000); | ||
217 | + | ||
218 | + | ||
219 | + } | ||
220 | + }); | ||
221 | + | ||
222 | + /* When wanted event is triggered load original image */ | ||
223 | + /* by triggering appear. */ | ||
224 | + if (0 !== settings.event.indexOf("scroll")) { | ||
225 | + $self.bind(settings.event, function() { | ||
226 | + if (!self.loaded) { | ||
227 | + $self.trigger("appear"); | ||
228 | + } | ||
229 | + }); | ||
230 | + } | ||
231 | + }); | ||
232 | + | ||
233 | + /* Check if something appears when window is resized. */ | ||
234 | + $window.bind("resize", function() { | ||
235 | + update(); | ||
236 | + }); | ||
237 | + | ||
238 | + /* With IOS5 force loading images when navigating with back button. */ | ||
239 | + /* Non optimal workaround. */ | ||
240 | + if ((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)) { | ||
241 | + $window.bind("pageshow", function(event) { | ||
242 | + if (event.originalEvent && event.originalEvent.persisted) { | ||
243 | + elements.each(function() { | ||
244 | + $(this).trigger("appear"); | ||
245 | + }); | ||
246 | + } | ||
247 | + }); | ||
248 | + } | ||
249 | + | ||
250 | + /* Force initial check if images should appear. */ | ||
251 | + $(document).ready(function() { | ||
252 | + update(); | ||
253 | + }); | ||
254 | + | ||
255 | + return this; | ||
256 | + }; | ||
257 | + | ||
258 | + | ||
259 | + | ||
260 | + /* Convenience methods in jQuery namespace. */ | ||
261 | + /* Use as $.belowthefold(element, {threshold : 100, container : window}) */ | ||
262 | + | ||
263 | + $.belowthefold = function(element, settings) { | ||
264 | + var fold; | ||
265 | + | ||
266 | + if (settings.container === undefined || settings.container === window) { | ||
267 | + fold = (window.innerHeight ? window.innerHeight : $window.height()) + $window.scrollTop(); | ||
268 | + } else { | ||
269 | + fold = $(settings.container).offset().top + $(settings.container).height(); | ||
270 | + } | ||
271 | + | ||
272 | + return fold <= $(element).offset().top - settings.threshold; | ||
273 | + }; | ||
274 | + | ||
275 | + $.rightoffold = function(element, settings) { | ||
276 | + var fold; | ||
277 | + | ||
278 | + if (settings.container === undefined || settings.container === window) { | ||
279 | + fold = $window.width() + $window.scrollLeft(); | ||
280 | + } else { | ||
281 | + fold = $(settings.container).offset().left + $(settings.container).width(); | ||
282 | + } | ||
283 | + | ||
284 | + return fold <= $(element).offset().left - settings.threshold; | ||
285 | + }; | ||
286 | + | ||
287 | + $.abovethetop = function(element, settings) { | ||
288 | + var fold; | ||
289 | + | ||
290 | + if (settings.container === undefined || settings.container === window) { | ||
291 | + fold = $window.scrollTop(); | ||
292 | + } else { | ||
293 | + fold = $(settings.container).offset().top; | ||
294 | + } | ||
295 | + | ||
296 | + return fold >= $(element).offset().top + settings.threshold + $(element).height(); | ||
297 | + }; | ||
298 | + | ||
299 | + $.leftofbegin = function(element, settings) { | ||
300 | + var fold; | ||
301 | + | ||
302 | + if (settings.container === undefined || settings.container === window) { | ||
303 | + fold = $window.scrollLeft(); | ||
304 | + } else { | ||
305 | + fold = $(settings.container).offset().left; | ||
306 | + } | ||
307 | + | ||
308 | + return fold >= $(element).offset().left + settings.threshold + $(element).width(); | ||
309 | + }; | ||
310 | + | ||
311 | + $.inviewport = function(element, settings) { | ||
312 | + return !$.rightoffold(element, settings) && !$.leftofbegin(element, settings) && | ||
313 | + !$.belowthefold(element, settings) && !$.abovethetop(element, settings); | ||
314 | + }; | ||
315 | + | ||
316 | +})($, window, document); |
@@ -4,12 +4,11 @@ | @@ -4,12 +4,11 @@ | ||
4 | <meta charset="UTF-8"> | 4 | <meta charset="UTF-8"> |
5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no"> | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no"> |
6 | <meta content="yes" name="apple-mobile-web-app-capable"> | 6 | <meta content="yes" name="apple-mobile-web-app-capable"> |
7 | -<meta content="yes" name="apple-mobile-web-app-capable"> | ||
8 | <meta content="telephone=no" name="format-detection"> | 7 | <meta content="telephone=no" name="format-detection"> |
9 | <meta content="yes" name="apple-touch-fullscreen"> | 8 | <meta content="yes" name="apple-touch-fullscreen"> |
10 | <meta content="black" name="apple-mobile-web-app-status-bar-style"> | 9 | <meta content="black" name="apple-mobile-web-app-status-bar-style"> |
11 | <title>{{staticTitle}}</title> | 10 | <title>{{staticTitle}}</title> |
12 | -<link rel="stylesheet" href="{{staticCss}}"> | 11 | +<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/cuxiao/coupon.mobile.css"> |
13 | <link rel="dns-prefetch" href="//cdn.yoho.cn"> | 12 | <link rel="dns-prefetch" href="//cdn.yoho.cn"> |
14 | <link rel="dns-prefetch" href="//static.yohobuy.com"> | 13 | <link rel="dns-prefetch" href="//static.yohobuy.com"> |
15 | <script type="text/javascript"> | 14 | <script type="text/javascript"> |
@@ -53,41 +52,41 @@ | @@ -53,41 +52,41 @@ | ||
53 | <ul class="img-coupon01"> | 52 | <ul class="img-coupon01"> |
54 | <li> | 53 | <li> |
55 | <a class="enter-store" href="{{url_350}}"></a> | 54 | <a class="enter-store" href="{{url_350}}"></a> |
56 | - <a class="get-coupon" href="javascript:;" param="15659"></a> | 55 | + <a class="get-coupon" href="{{jumpUrl}}" param="15659"></a> |
57 | </li> | 56 | </li> |
58 | <li> | 57 | <li> |
59 | <a class="enter-store" href="{{url_160}}"></a> | 58 | <a class="enter-store" href="{{url_160}}"></a> |
60 | - <a class="get-coupon" href="javascript:;" param="15663"></a> | 59 | + <a class="get-coupon" href="{{jumpUrl}}" param="15663"></a> |
61 | </li> | 60 | </li> |
62 | </ul> | 61 | </ul> |
63 | <ul class="img-coupon02"> | 62 | <ul class="img-coupon02"> |
64 | <li> | 63 | <li> |
65 | <a class="enter-store" href="{{url_341}}"></a> | 64 | <a class="enter-store" href="{{url_341}}"></a> |
66 | - <a class="get-coupon" href="javascript:;" param="15667"></a> | 65 | + <a class="get-coupon" href="{{jumpUrl}}" param="15667"></a> |
67 | </li> | 66 | </li> |
68 | <li> | 67 | <li> |
69 | <a class="enter-store" href="{{url_710}}"></a> | 68 | <a class="enter-store" href="{{url_710}}"></a> |
70 | - <a class="get-coupon" href="javascript:;" param="15669"></a> | 69 | + <a class="get-coupon" href="{{jumpUrl}}" param="15669"></a> |
71 | </li> | 70 | </li> |
72 | </ul> | 71 | </ul> |
73 | <ul class="img-coupon03"> | 72 | <ul class="img-coupon03"> |
74 | <li> | 73 | <li> |
75 | <a class="enter-store" href="{{url_471}}"></a> | 74 | <a class="enter-store" href="{{url_471}}"></a> |
76 | - <a class="get-coupon" href="javascript:;" param="15671"></a> | 75 | + <a class="get-coupon" href="{{jumpUrl}}" param="15671"></a> |
77 | </li> | 76 | </li> |
78 | <li> | 77 | <li> |
79 | <a class="enter-store" href="{{url_495}}"></a> | 78 | <a class="enter-store" href="{{url_495}}"></a> |
80 | - <a class="get-coupon" href="javascript:;" param="15675"></a> | 79 | + <a class="get-coupon" href="{{jumpUrl}}" param="15675"></a> |
81 | </li> | 80 | </li> |
82 | </ul> | 81 | </ul> |
83 | <ul class="img-coupon04"> | 82 | <ul class="img-coupon04"> |
84 | <li> | 83 | <li> |
85 | <a class="enter-store" href="{{url_235}}"></a> | 84 | <a class="enter-store" href="{{url_235}}"></a> |
86 | - <a class="get-coupon" href="javascript:;" param="15681"></a> | 85 | + <a class="get-coupon" href="{{jumpUrl}}" param="15681"></a> |
87 | </li> | 86 | </li> |
88 | <li> | 87 | <li> |
89 | <a class="enter-store" href="{{url_583}}"></a> | 88 | <a class="enter-store" href="{{url_583}}"></a> |
90 | - <a class="get-coupon" href="javascript:;" param="15683"></a> | 89 | + <a class="get-coupon" href="{{jumpUrl}}" param="15683"></a> |
91 | </li> | 90 | </li> |
92 | </ul> | 91 | </ul> |
93 | </div> | 92 | </div> |
@@ -95,27 +94,27 @@ | @@ -95,27 +94,27 @@ | ||
95 | <ul> | 94 | <ul> |
96 | <li class="logo-coupon01"> | 95 | <li class="logo-coupon01"> |
97 | <a class="enter-store" href="{{url_417}}"></a> | 96 | <a class="enter-store" href="{{url_417}}"></a> |
98 | - <a class="get-coupon" href="javascript:;" param="15665"></a> | 97 | + <a class="get-coupon" href="{{jumpUrl}}" param="15665"></a> |
99 | </li> | 98 | </li> |
100 | <li class="logo-coupon02"> | 99 | <li class="logo-coupon02"> |
101 | <a class="enter-store" href="{{url_672}}"></a> | 100 | <a class="enter-store" href="{{url_672}}"></a> |
102 | - <a class="get-coupon" href="javascript:;" param="15673"></a> | 101 | + <a class="get-coupon" href="{{jumpUrl}}" param="15673"></a> |
103 | </li> | 102 | </li> |
104 | <li class="logo-coupon03"> | 103 | <li class="logo-coupon03"> |
105 | <a class="enter-store" href="{{url_589}}"></a> | 104 | <a class="enter-store" href="{{url_589}}"></a> |
106 | - <a class="get-coupon" href="javascript:;" param="15679"></a> | 105 | + <a class="get-coupon" href="{{jumpUrl}}" param="15679"></a> |
107 | </li> | 106 | </li> |
108 | <li class="logo-coupon04"> | 107 | <li class="logo-coupon04"> |
109 | <a class="enter-store" href="{{url_707}}"></a> | 108 | <a class="enter-store" href="{{url_707}}"></a> |
110 | - <a class="get-coupon" href="javascript:;" param="15699"></a> | 109 | + <a class="get-coupon" href="{{jumpUrl}}" param="15699"></a> |
111 | </li> | 110 | </li> |
112 | <li class="logo-coupon05"> | 111 | <li class="logo-coupon05"> |
113 | <a class="enter-store" href="{{url_550}}"></a> | 112 | <a class="enter-store" href="{{url_550}}"></a> |
114 | - <a class="get-coupon" href="javascript:;" param="15687"></a> | 113 | + <a class="get-coupon" href="{{jumpUrl}}" param="15687"></a> |
115 | </li> | 114 | </li> |
116 | <li class="logo-coupon06"> | 115 | <li class="logo-coupon06"> |
117 | <a class="enter-store" href="{{url_600}}"></a> | 116 | <a class="enter-store" href="{{url_600}}"></a> |
118 | - <a class="get-coupon" href="javascript:;" param="15693"></a> | 117 | + <a class="get-coupon" href="{{jumpUrl}}" param="15693"></a> |
119 | </li> | 118 | </li> |
120 | </ul> | 119 | </ul> |
121 | </div> | 120 | </div> |
@@ -124,41 +123,41 @@ | @@ -124,41 +123,41 @@ | ||
124 | <ul class="img-coupon05"> | 123 | <ul class="img-coupon05"> |
125 | <li> | 124 | <li> |
126 | <a class="enter-store" href="{{url_402}}"></a> | 125 | <a class="enter-store" href="{{url_402}}"></a> |
127 | - <a class="get-coupon" href="javascript:;" param="15685"></a> | 126 | + <a class="get-coupon" href="{{jumpUrl}}" param="15685"></a> |
128 | </li> | 127 | </li> |
129 | <li> | 128 | <li> |
130 | <a class="enter-store" href="{{url_720}}"></a> | 129 | <a class="enter-store" href="{{url_720}}"></a> |
131 | - <a class="get-coupon" href="javascript:;" param="15689"></a> | 130 | + <a class="get-coupon" href="{{jumpUrl}}" param="15689"></a> |
132 | </li> | 131 | </li> |
133 | </ul> | 132 | </ul> |
134 | <ul class="img-coupon06"> | 133 | <ul class="img-coupon06"> |
135 | <li> | 134 | <li> |
136 | <a class="enter-store" href="{{url_138}}"></a> | 135 | <a class="enter-store" href="{{url_138}}"></a> |
137 | - <a class="get-coupon" href="javascript:;" param="15691"></a> | 136 | + <a class="get-coupon" href="{{jumpUrl}}" param="15691"></a> |
138 | </li> | 137 | </li> |
139 | <li> | 138 | <li> |
140 | <a class="enter-store" href="{{url_506}}"></a> | 139 | <a class="enter-store" href="{{url_506}}"></a> |
141 | - <a class="get-coupon" href="javascript:;" param="15695"></a> | 140 | + <a class="get-coupon" href="{{jumpUrl}}" param="15695"></a> |
142 | </li> | 141 | </li> |
143 | </ul> | 142 | </ul> |
144 | <ul class="img-coupon07"> | 143 | <ul class="img-coupon07"> |
145 | <li> | 144 | <li> |
146 | <a class="enter-store" href="{{url_419}}"></a> | 145 | <a class="enter-store" href="{{url_419}}"></a> |
147 | - <a class="get-coupon" href="javascript:;" param="15697"></a> | 146 | + <a class="get-coupon" href="{{jumpUrl}}" param="15697"></a> |
148 | </li> | 147 | </li> |
149 | <li> | 148 | <li> |
150 | <a class="enter-store" href="{{url_581}}"></a> | 149 | <a class="enter-store" href="{{url_581}}"></a> |
151 | - <a class="get-coupon" href="javascript:;" param="15705"></a> | 150 | + <a class="get-coupon" href="{{jumpUrl}}" param="15705"></a> |
152 | </li> | 151 | </li> |
153 | </ul> | 152 | </ul> |
154 | <ul class="img-coupon08"> | 153 | <ul class="img-coupon08"> |
155 | <li> | 154 | <li> |
156 | <a class="enter-store" href="{{url_722}}"></a> | 155 | <a class="enter-store" href="{{url_722}}"></a> |
157 | - <a class="get-coupon" href="javascript:;" param="15707"></a> | 156 | + <a class="get-coupon" href="{{jumpUrl}}" param="15707"></a> |
158 | </li> | 157 | </li> |
159 | <li> | 158 | <li> |
160 | <a class="enter-store" href="{{url_191}}"></a> | 159 | <a class="enter-store" href="{{url_191}}"></a> |
161 | - <a class="get-coupon" href="javascript:;" param="15751"></a> | 160 | + <a class="get-coupon" href="{{jumpUrl}}" param="15751"></a> |
162 | </li> | 161 | </li> |
163 | </ul> | 162 | </ul> |
164 | </div> | 163 | </div> |
@@ -166,50 +165,48 @@ | @@ -166,50 +165,48 @@ | ||
166 | <ul> | 165 | <ul> |
167 | <li class="logo-coupon07"> | 166 | <li class="logo-coupon07"> |
168 | <a class="enter-store" href="{{url_152}}"></a> | 167 | <a class="enter-store" href="{{url_152}}"></a> |
169 | - <a class="get-coupon" href="javascript:;" param="15701"></a> | 168 | + <a class="get-coupon" href="{{jumpUrl}}" param="15701"></a> |
170 | </li> | 169 | </li> |
171 | <li class="logo-coupon08"> | 170 | <li class="logo-coupon08"> |
172 | <a class="enter-store" href="{{url_464}}"></a> | 171 | <a class="enter-store" href="{{url_464}}"></a> |
173 | - <a class="get-coupon" href="javascript:;" param="15703"></a> | 172 | + <a class="get-coupon" href="{{jumpUrl}}" param="15703"></a> |
174 | </li> | 173 | </li> |
175 | <li class="logo-coupon09"> | 174 | <li class="logo-coupon09"> |
176 | <a class="enter-store" href="{{url_102}}"></a> | 175 | <a class="enter-store" href="{{url_102}}"></a> |
177 | - <a class="get-coupon" href="javascript:;" param="15709"></a> | 176 | + <a class="get-coupon" href="{{jumpUrl}}" param="15709"></a> |
178 | </li> | 177 | </li> |
179 | <li class="logo-coupon10"> | 178 | <li class="logo-coupon10"> |
180 | <a class="enter-store" href="{{url_851}}"></a> | 179 | <a class="enter-store" href="{{url_851}}"></a> |
181 | - <a class="get-coupon" href="javascript:;" param="15711"></a> | 180 | + <a class="get-coupon" href="{{jumpUrl}}" param="15711"></a> |
182 | </li> | 181 | </li> |
183 | <li class="logo-coupon11"> | 182 | <li class="logo-coupon11"> |
184 | <a class="enter-store" href="{{url_699}}"></a> | 183 | <a class="enter-store" href="{{url_699}}"></a> |
185 | - <a class="get-coupon" href="javascript:;" param="15713"></a> | 184 | + <a class="get-coupon" href="{{jumpUrl}}" param="15713"></a> |
186 | </li> | 185 | </li> |
187 | <li class="logo-coupon12"> | 186 | <li class="logo-coupon12"> |
188 | <a class="enter-store" href="{{url_103}}"></a> | 187 | <a class="enter-store" href="{{url_103}}"></a> |
189 | - <a class="get-coupon" href="javascript:;" param="15733"></a> | 188 | + <a class="get-coupon" href="{{jumpUrl}}" param="15733"></a> |
190 | </li> | 189 | </li> |
191 | </ul> | 190 | </ul> |
192 | </div> | 191 | </div> |
193 | </div> | 192 | </div> |
194 | <div class="coupon-ft"> | 193 | <div class="coupon-ft"> |
195 | <div class="other-coupon"> | 194 | <div class="other-coupon"> |
196 | - <a href="">女生</a> | ||
197 | - <a href="">童装</a> | ||
198 | - <a href="">创意生活</a> | 195 | + <a href="{{url_girls}}">女生</a> |
196 | + <a href="{{url_kids}}">童装</a> | ||
197 | + <a href="{{url_lifestyle}}">创意生活</a> | ||
199 | </div> | 198 | </div> |
200 | </div> | 199 | </div> |
201 | </div> | 200 | </div> |
202 | - <div class="get-dialog-shade"></div> | ||
203 | - <div class="get-dialog"> | ||
204 | - <p>你已领取过品牌优惠券</p> | ||
205 | - <p>快去选购心仪的商品吧!</p> | ||
206 | - <a href="javascript:history.go(-1);">返回</a> | ||
207 | - </div> | 201 | +<input id="shareLink" type="hidden" value="{{shareLink}}"> |
202 | +<input id="shareImg" type="hidden" value="{{shareImg}}"> | ||
203 | +<input id="shareTitle" type="hidden" value="{{shareTitle}}"> | ||
204 | +<input id="shareDesc" type="hidden" value="{{shareDesc}}"> | ||
208 | {{#if weixinShare}} | 205 | {{#if weixinShare}} |
209 | <script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> | 206 | <script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> |
210 | {{/if}} | 207 | {{/if}} |
211 | -<script type="text/javascript" src="{{jqueryJs}}"></script> | ||
212 | -<script type="text/javascript" src="{{staticJs}}"></script> | 208 | +<script type="text/javascript" src="http://static.dev.yohobuy.com/js/cuxiao/jquery.min.js"></script> |
209 | +<script type="text/javascript" src="http://static.dev.yohobuy.com/js/cuxiao/151201/coupon.mobile.js"></script> | ||
213 | <script type="text/javascript"> | 210 | <script type="text/javascript"> |
214 | var _hmt = _hmt || []; | 211 | var _hmt = _hmt || []; |
215 | (function() { | 212 | (function() { |
@@ -4,12 +4,11 @@ | @@ -4,12 +4,11 @@ | ||
4 | <meta charset="UTF-8"> | 4 | <meta charset="UTF-8"> |
5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no"> | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no"> |
6 | <meta content="yes" name="apple-mobile-web-app-capable"> | 6 | <meta content="yes" name="apple-mobile-web-app-capable"> |
7 | -<meta content="yes" name="apple-mobile-web-app-capable"> | ||
8 | <meta content="telephone=no" name="format-detection"> | 7 | <meta content="telephone=no" name="format-detection"> |
9 | <meta content="yes" name="apple-touch-fullscreen"> | 8 | <meta content="yes" name="apple-touch-fullscreen"> |
10 | <meta content="black" name="apple-mobile-web-app-status-bar-style"> | 9 | <meta content="black" name="apple-mobile-web-app-status-bar-style"> |
11 | <title>{{title}}</title> | 10 | <title>{{title}}</title> |
12 | -<link rel="stylesheet" href="{{staticCss}}"> | 11 | +<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/cuxiao/coupon.mobile.css"> |
13 | <link rel="dns-prefetch" href="//cdn.yoho.cn"> | 12 | <link rel="dns-prefetch" href="//cdn.yoho.cn"> |
14 | <link rel="dns-prefetch" href="//static.yohobuy.com"> | 13 | <link rel="dns-prefetch" href="//static.yohobuy.com"> |
15 | <script type="text/javascript"> | 14 | <script type="text/javascript"> |
@@ -53,41 +52,41 @@ | @@ -53,41 +52,41 @@ | ||
53 | <ul class="img-coupon01 girl"> | 52 | <ul class="img-coupon01 girl"> |
54 | <li> | 53 | <li> |
55 | <a class="get-coupon" href="{{url_570}}"></a> | 54 | <a class="get-coupon" href="{{url_570}}"></a> |
56 | - <a class="get-coupon" href="javascript:;" param="15755"></a> | 55 | + <a class="get-coupon" href="{{jumpUrl}}" param="15755"></a> |
57 | </li> | 56 | </li> |
58 | <li> | 57 | <li> |
59 | <a class="get-coupon" href="{{url_864}}"></a> | 58 | <a class="get-coupon" href="{{url_864}}"></a> |
60 | - <a class="get-coupon" href="javascript:;" param="15761"></a> | 59 | + <a class="get-coupon" href="{{jumpUrl}}" param="15761"></a> |
61 | </li> | 60 | </li> |
62 | </ul> | 61 | </ul> |
63 | <ul class="img-coupon02 girl"> | 62 | <ul class="img-coupon02 girl"> |
64 | <li> | 63 | <li> |
65 | <a class="get-coupon" href="{{url_824}}"></a> | 64 | <a class="get-coupon" href="{{url_824}}"></a> |
66 | - <a class="get-coupon" href="javascript:;" param="15765"></a> | 65 | + <a class="get-coupon" href="{{jumpUrl}}" param="15765"></a> |
67 | </li> | 66 | </li> |
68 | <li> | 67 | <li> |
69 | <a class="get-coupon" href="{{url_536}}"></a> | 68 | <a class="get-coupon" href="{{url_536}}"></a> |
70 | - <a class="get-coupon" href="javascript:;" param="15767"></a> | 69 | + <a class="get-coupon" href="{{jumpUrl}}" param="15767"></a> |
71 | </li> | 70 | </li> |
72 | </ul> | 71 | </ul> |
73 | <ul class="img-coupon03 girl"> | 72 | <ul class="img-coupon03 girl"> |
74 | <li> | 73 | <li> |
75 | <a class="get-coupon" href="{{url_257}}"></a> | 74 | <a class="get-coupon" href="{{url_257}}"></a> |
76 | - <a class="get-coupon" href="javascript:;" param="15773"></a> | 75 | + <a class="get-coupon" href="{{jumpUrl}}" param="15773"></a> |
77 | </li> | 76 | </li> |
78 | <li> | 77 | <li> |
79 | <a class="get-coupon" href="{{url_342}}"></a> | 78 | <a class="get-coupon" href="{{url_342}}"></a> |
80 | - <a class="get-coupon" href="javascript:;" param="15775"></a> | 79 | + <a class="get-coupon" href="{{jumpUrl}}" param="15775"></a> |
81 | </li> | 80 | </li> |
82 | </ul> | 81 | </ul> |
83 | <ul class="img-coupon04 girl"> | 82 | <ul class="img-coupon04 girl"> |
84 | <li> | 83 | <li> |
85 | <a class="get-coupon" href="{{url_354}}"></a> | 84 | <a class="get-coupon" href="{{url_354}}"></a> |
86 | - <a class="get-coupon" href="javascript:;" param="15777"></a> | 85 | + <a class="get-coupon" href="{{jumpUrl}}" param="15777"></a> |
87 | </li> | 86 | </li> |
88 | <li> | 87 | <li> |
89 | <a class="get-coupon" href="{{url_60}}"></a> | 88 | <a class="get-coupon" href="{{url_60}}"></a> |
90 | - <a class="get-coupon" href="javascript:;" param="15663"></a> | 89 | + <a class="get-coupon" href="{{jumpUrl}}" param="15663"></a> |
91 | </li> | 90 | </li> |
92 | </ul> | 91 | </ul> |
93 | </div> | 92 | </div> |
@@ -96,27 +95,27 @@ | @@ -96,27 +95,27 @@ | ||
96 | <ul> | 95 | <ul> |
97 | <li class="logo-coupon01 girl"> | 96 | <li class="logo-coupon01 girl"> |
98 | <a class="get-coupon" href="{{url_481}}"></a> | 97 | <a class="get-coupon" href="{{url_481}}"></a> |
99 | - <a class="get-coupon" href="javascript:;" param="15757"></a> | 98 | + <a class="get-coupon" href="{{jumpUrl}}" param="15757"></a> |
100 | </li> | 99 | </li> |
101 | <li class="logo-coupon02 girl"> | 100 | <li class="logo-coupon02 girl"> |
102 | <a class="get-coupon" href="{{url_450}}"></a> | 101 | <a class="get-coupon" href="{{url_450}}"></a> |
103 | - <a class="get-coupon" href="javascript:;" param="15759"></a> | 102 | + <a class="get-coupon" href="{{jumpUrl}}" param="15759"></a> |
104 | </li> | 103 | </li> |
105 | <li class="logo-coupon03 girl"> | 104 | <li class="logo-coupon03 girl"> |
106 | <a class="get-coupon" href="{{url_256}}"></a> | 105 | <a class="get-coupon" href="{{url_256}}"></a> |
107 | - <a class="get-coupon" href="javascript:;" param="15763"></a> | 106 | + <a class="get-coupon" href="{{jumpUrl}}" param="15763"></a> |
108 | </li> | 107 | </li> |
109 | <li class="logo-coupon04 girl"> | 108 | <li class="logo-coupon04 girl"> |
110 | <a class="get-coupon" href="{{url_701}}"></a> | 109 | <a class="get-coupon" href="{{url_701}}"></a> |
111 | - <a class="get-coupon" href="javascript:;" param="15769"></a> | 110 | + <a class="get-coupon" href="{{jumpUrl}}" param="15769"></a> |
112 | </li> | 111 | </li> |
113 | <li class="logo-coupon05 girl"> | 112 | <li class="logo-coupon05 girl"> |
114 | <a class="get-coupon" href="{{url_506}}"></a> | 113 | <a class="get-coupon" href="{{url_506}}"></a> |
115 | - <a class="get-coupon" href="javascript:;" param="15695"></a> | 114 | + <a class="get-coupon" href="{{jumpUrl}}" param="15695"></a> |
116 | </li> | 115 | </li> |
117 | <li class="logo-coupon06 girl"> | 116 | <li class="logo-coupon06 girl"> |
118 | <a class="get-coupon" href="{{url_569}}"></a> | 117 | <a class="get-coupon" href="{{url_569}}"></a> |
119 | - <a class="get-coupon" href="javascript:;" param="15779"></a> | 118 | + <a class="get-coupon" href="{{jumpUrl}}" param="15779"></a> |
120 | </li> | 119 | </li> |
121 | </ul> | 120 | </ul> |
122 | </div> | 121 | </div> |
@@ -126,41 +125,41 @@ | @@ -126,41 +125,41 @@ | ||
126 | <ul class="img-coupon05 girl"> | 125 | <ul class="img-coupon05 girl"> |
127 | <li> | 126 | <li> |
128 | <a class="get-coupon" href="{{url_324}}"></a> | 127 | <a class="get-coupon" href="{{url_324}}"></a> |
129 | - <a class="get-coupon" href="javascript:;" param="15783"></a> | 128 | + <a class="get-coupon" href="{{jumpUrl}}" param="15783"></a> |
130 | </li> | 129 | </li> |
131 | <li> | 130 | <li> |
132 | <a class="get-coupon" href="{{url_589}}"></a> | 131 | <a class="get-coupon" href="{{url_589}}"></a> |
133 | - <a class="get-coupon" href="javascript:;" param="15679"></a> | 132 | + <a class="get-coupon" href="{{jumpUrl}}" param="15679"></a> |
134 | </li> | 133 | </li> |
135 | </ul> | 134 | </ul> |
136 | <ul class="img-coupon06 girl"> | 135 | <ul class="img-coupon06 girl"> |
137 | <li> | 136 | <li> |
138 | <a class="get-coupon" href="{{url_191}}"></a> | 137 | <a class="get-coupon" href="{{url_191}}"></a> |
139 | - <a class="get-coupon" href="javascript:;" param="15751"></a> | 138 | + <a class="get-coupon" href="{{jumpUrl}}" param="15751"></a> |
140 | </li> | 139 | </li> |
141 | <li> | 140 | <li> |
142 | <a class="get-coupon" href="{{url_4}}"></a> | 141 | <a class="get-coupon" href="{{url_4}}"></a> |
143 | - <a class="get-coupon" href="javascript:;" param="15715"></a> | 142 | + <a class="get-coupon" href="{{jumpUrl}}" param="15715"></a> |
144 | </li> | 143 | </li> |
145 | </ul> | 144 | </ul> |
146 | <ul class="img-coupon07 girl"> | 145 | <ul class="img-coupon07 girl"> |
147 | <li> | 146 | <li> |
148 | <a class="get-coupon" href="{{url_768}}"></a> | 147 | <a class="get-coupon" href="{{url_768}}"></a> |
149 | - <a class="get-coupon" href="javascript:;" param="15795"></a> | 148 | + <a class="get-coupon" href="{{jumpUrl}}" param="15795"></a> |
150 | </li> | 149 | </li> |
151 | <li> | 150 | <li> |
152 | <a class="get-coupon" href="{{url_649}}"></a> | 151 | <a class="get-coupon" href="{{url_649}}"></a> |
153 | - <a class="get-coupon" href="javascript:;" param="15799"></a> | 152 | + <a class="get-coupon" href="{{jumpUrl}}" param="15799"></a> |
154 | </li> | 153 | </li> |
155 | </ul> | 154 | </ul> |
156 | <ul class="img-coupon08 girl"> | 155 | <ul class="img-coupon08 girl"> |
157 | <li> | 156 | <li> |
158 | <a class="get-coupon" href="{{url_1026}}"></a> | 157 | <a class="get-coupon" href="{{url_1026}}"></a> |
159 | - <a class="get-coupon" href="javascript:;" param="15811"></a> | 158 | + <a class="get-coupon" href="{{jumpUrl}}" param="15811"></a> |
160 | </li> | 159 | </li> |
161 | <li> | 160 | <li> |
162 | <a class="get-coupon" href="{{url_1027}}"></a> | 161 | <a class="get-coupon" href="{{url_1027}}"></a> |
163 | - <a class="get-coupon" href="javascript:;" param="15813"></a> | 162 | + <a class="get-coupon" href="{{jumpUrl}}" param="15813"></a> |
164 | </li> | 163 | </li> |
165 | </ul> | 164 | </ul> |
166 | </div> | 165 | </div> |
@@ -169,35 +168,35 @@ | @@ -169,35 +168,35 @@ | ||
169 | <ul> | 168 | <ul> |
170 | <li class="logo-coupon07 girl"> | 169 | <li class="logo-coupon07 girl"> |
171 | <a class="get-coupon" href="{{url_981}}"></a> | 170 | <a class="get-coupon" href="{{url_981}}"></a> |
172 | - <a class="get-coupon" href="javascript:;" param="15787"></a> | 171 | + <a class="get-coupon" href="{{jumpUrl}}" param="15787"></a> |
173 | </li> | 172 | </li> |
174 | <li class="logo-coupon08 girl"> | 173 | <li class="logo-coupon08 girl"> |
175 | <a class="get-coupon" href="{{url_402}}"></a> | 174 | <a class="get-coupon" href="{{url_402}}"></a> |
176 | - <a class="get-coupon" href="javascript:;" param="15793"></a> | 175 | + <a class="get-coupon" href="{{jumpUrl}}" param="15793"></a> |
177 | </li> | 176 | </li> |
178 | <li class="logo-coupon09 girl"> | 177 | <li class="logo-coupon09 girl"> |
179 | <a class="get-coupon" href="{{url_1021}}"></a> | 178 | <a class="get-coupon" href="{{url_1021}}"></a> |
180 | - <a class="get-coupon" href="javascript:;" param="15709"></a> | 179 | + <a class="get-coupon" href="{{jumpUrl}}" param="15709"></a> |
181 | </li> | 180 | </li> |
182 | <li class="logo-coupon10 girl"> | 181 | <li class="logo-coupon10 girl"> |
183 | <a class="get-coupon" href="{{url_860}}"></a> | 182 | <a class="get-coupon" href="{{url_860}}"></a> |
184 | - <a class="get-coupon" href="javascript:;" param="15801"></a> | 183 | + <a class="get-coupon" href="{{jumpUrl}}" param="15801"></a> |
185 | </li> | 184 | </li> |
186 | <li class="logo-coupon11 girl"> | 185 | <li class="logo-coupon11 girl"> |
187 | <a class="get-coupon" href="{{url_435}}"></a> | 186 | <a class="get-coupon" href="{{url_435}}"></a> |
188 | - <a class="get-coupon" href="javascript:;" param="15803"></a> | 187 | + <a class="get-coupon" href="{{jumpUrl}}" param="15803"></a> |
189 | </li> | 188 | </li> |
190 | <li class="logo-coupon12 girl"> | 189 | <li class="logo-coupon12 girl"> |
191 | <a class="get-coupon" href="{{url_327}}"></a> | 190 | <a class="get-coupon" href="{{url_327}}"></a> |
192 | - <a class="get-coupon" href="javascript:;" param="15805"></a> | 191 | + <a class="get-coupon" href="{{jumpUrl}}" param="15805"></a> |
193 | </li> | 192 | </li> |
194 | <li class="logo-coupon13 girl"> | 193 | <li class="logo-coupon13 girl"> |
195 | <a class="get-coupon" href="{{url_505}}"></a> | 194 | <a class="get-coupon" href="{{url_505}}"></a> |
196 | - <a class="get-coupon" href="javascript:;" param="15807"></a> | 195 | + <a class="get-coupon" href="{{jumpUrl}}" param="15807"></a> |
197 | </li> | 196 | </li> |
198 | <li class="logo-coupon14 girl"> | 197 | <li class="logo-coupon14 girl"> |
199 | <a class="get-coupon" href="{{url_987}}"></a> | 198 | <a class="get-coupon" href="{{url_987}}"></a> |
200 | - <a class="get-coupon" href="javascript:;" param="15809"></a> | 199 | + <a class="get-coupon" href="{{jumpUrl}}" param="15809"></a> |
201 | </li> | 200 | </li> |
202 | </ul> | 201 | </ul> |
203 | </div> | 202 | </div> |
@@ -205,15 +204,19 @@ | @@ -205,15 +204,19 @@ | ||
205 | 204 | ||
206 | <div class="coupon-ft"> | 205 | <div class="coupon-ft"> |
207 | <div class="other-coupon"> | 206 | <div class="other-coupon"> |
208 | - <a href="javascript:;">男生</a> | ||
209 | - <a href="javascript:;">童装</a> | ||
210 | - <a href="javascript:;">创意生活</a> | 207 | + <a href="{{url_boys}}">男生</a> |
208 | + <a href="{{url_kids}}">童装</a> | ||
209 | + <a href="{{url_lifestyle}}">创意生活</a> | ||
211 | </div> | 210 | </div> |
212 | </div> | 211 | </div> |
213 | </div> | 212 | </div> |
213 | +<input id="shareLink" type="hidden" value="{{shareLink}}"> | ||
214 | +<input id="shareImg" type="hidden" value="{{shareImg}}"> | ||
215 | +<input id="shareTitle" type="hidden" value="{{shareTitle}}"> | ||
216 | +<input id="shareDesc" type="hidden" value="{{shareDesc}}"> | ||
214 | <script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> | 217 | <script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> |
215 | -<script type="text/javascript" src="{{jqueryJs}}"></script> | ||
216 | -<script type="text/javascript" src="{{staticJs}}"></script> | 218 | +<script type="text/javascript" src="http://static.dev.yohobuy.com/js/cuxiao/jquery.min.js"></script> |
219 | +<script type="text/javascript" src="http://static.dev.yohobuy.com/js/cuxiao/151201/coupon.mobile.js"></script> | ||
217 | <script type="text/javascript"> | 220 | <script type="text/javascript"> |
218 | var _hmt = _hmt || []; | 221 | var _hmt = _hmt || []; |
219 | (function() { | 222 | (function() { |
@@ -4,7 +4,6 @@ | @@ -4,7 +4,6 @@ | ||
4 | <meta charset="UTF-8"> | 4 | <meta charset="UTF-8"> |
5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no"> | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no"> |
6 | <meta content="yes" name="apple-mobile-web-app-capable"> | 6 | <meta content="yes" name="apple-mobile-web-app-capable"> |
7 | -<meta content="yes" name="apple-mobile-web-app-capable"> | ||
8 | <meta content="telephone=no" name="format-detection"> | 7 | <meta content="telephone=no" name="format-detection"> |
9 | <meta content="yes" name="apple-touch-fullscreen"> | 8 | <meta content="yes" name="apple-touch-fullscreen"> |
10 | <meta content="black" name="apple-mobile-web-app-status-bar-style"> | 9 | <meta content="black" name="apple-mobile-web-app-status-bar-style"> |
@@ -52,50 +51,54 @@ | @@ -52,50 +51,54 @@ | ||
52 | <ul> | 51 | <ul> |
53 | <li class="logo-coupon01 kid"> | 52 | <li class="logo-coupon01 kid"> |
54 | <a class="get-coupon" href="{{url_907}}"></a> | 53 | <a class="get-coupon" href="{{url_907}}"></a> |
55 | - <a class="get-coupon" href="javascript:;" param="15859"></a> | 54 | + <a class="get-coupon" href="{{jumpUrl}}" param="15859"></a> |
56 | </li> | 55 | </li> |
57 | <li class="logo-coupon02 kid"> | 56 | <li class="logo-coupon02 kid"> |
58 | <a class="get-coupon" href="{{url_600}}"></a> | 57 | <a class="get-coupon" href="{{url_600}}"></a> |
59 | - <a class="get-coupon" href="javascript:;" param="15693"></a> | 58 | + <a class="get-coupon" href="{{jumpUrl}}" param="15693"></a> |
60 | </li> | 59 | </li> |
61 | <li class="logo-coupon03 kid"> | 60 | <li class="logo-coupon03 kid"> |
62 | <a class="get-coupon" href="{{url_888}}"></a> | 61 | <a class="get-coupon" href="{{url_888}}"></a> |
63 | - <a class="get-coupon" href="javascript:;" param="15863"></a> | 62 | + <a class="get-coupon" href="{{jumpUrl}}" param="15863"></a> |
64 | </li> | 63 | </li> |
65 | <li class="logo-coupon04 kid"> | 64 | <li class="logo-coupon04 kid"> |
66 | <a class="get-coupon" href="{{url_855}}"></a> | 65 | <a class="get-coupon" href="{{url_855}}"></a> |
67 | - <a class="get-coupon" href="javascript:;" param="15865"></a> | 66 | + <a class="get-coupon" href="{{jumpUrl}}" param="15865"></a> |
68 | </li> | 67 | </li> |
69 | <li class="logo-coupon05 kid"> | 68 | <li class="logo-coupon05 kid"> |
70 | <a class="get-coupon" href="{{url_203}}"></a> | 69 | <a class="get-coupon" href="{{url_203}}"></a> |
71 | - <a class="get-coupon" href="javascript:;" param="15867"></a> | 70 | + <a class="get-coupon" href="{{jumpUrl}}" param="15867"></a> |
72 | </li> | 71 | </li> |
73 | <li class="logo-coupon06 kid"> | 72 | <li class="logo-coupon06 kid"> |
74 | <a class="get-coupon" href="{{url_800}}"></a> | 73 | <a class="get-coupon" href="{{url_800}}"></a> |
75 | - <a class="get-coupon" href="javascript:;" param="15869"></a> | 74 | + <a class="get-coupon" href="{{jumpUrl}}" param="15869"></a> |
76 | </li> | 75 | </li> |
77 | <li class="logo-coupon07 kid"> | 76 | <li class="logo-coupon07 kid"> |
78 | <a class="get-coupon" href="{{url_784}}"></a> | 77 | <a class="get-coupon" href="{{url_784}}"></a> |
79 | - <a class="get-coupon" href="javascript:;" param="15871"></a> | 78 | + <a class="get-coupon" href="{{jumpUrl}}" param="15871"></a> |
80 | </li> | 79 | </li> |
81 | <li class="logo-coupon08 kid"> | 80 | <li class="logo-coupon08 kid"> |
82 | <a class="get-coupon" href="{{url_876}}"></a> | 81 | <a class="get-coupon" href="{{url_876}}"></a> |
83 | - <a class="get-coupon" href="javascript:;" param="15873"></a> | 82 | + <a class="get-coupon" href="{{jumpUrl}}" param="15873"></a> |
84 | </li> | 83 | </li> |
85 | </ul> | 84 | </ul> |
86 | </div> | 85 | </div> |
87 | </div> | 86 | </div> |
88 | <div class="coupon-ft"> | 87 | <div class="coupon-ft"> |
89 | <div class="other-coupon"> | 88 | <div class="other-coupon"> |
90 | - <a href="javascript:;">男生</a> | ||
91 | - <a href="javascript:;">女生</a> | ||
92 | - <a href="javascript:;">创意生活</a> | 89 | + <a href="{{url_boys}}">男生</a> |
90 | + <a href="{{url_girls}}">女生</a> | ||
91 | + <a href="{{url_lifestyle}}">创意生活</a> | ||
93 | </div> | 92 | </div> |
94 | </div> | 93 | </div> |
95 | </div> | 94 | </div> |
95 | +<input id="shareLink" type="hidden" value="{{shareLink}}"> | ||
96 | +<input id="shareImg" type="hidden" value="{{shareImg}}"> | ||
97 | +<input id="shareTitle" type="hidden" value="{{shareTitle}}"> | ||
98 | +<input id="shareDesc" type="hidden" value="{{shareDesc}}"> | ||
96 | <script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> | 99 | <script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> |
97 | -<script type="text/javascript" src="{{jqueryJs}}"></script> | ||
98 | -<script type="text/javascript" src="{{staticJs}}"></script> | 100 | +<script type="text/javascript" src="http://static.dev.yohobuy.com/js/cuxiao/jquery.min.js"></script> |
101 | +<script type="text/javascript" src="http://static.dev.yohobuy.com/js/cuxiao/151201/coupon.mobile.js"></script> | ||
99 | <script type="text/javascript"> | 102 | <script type="text/javascript"> |
100 | var _hmt = _hmt || []; | 103 | var _hmt = _hmt || []; |
101 | (function() { | 104 | (function() { |
@@ -4,12 +4,11 @@ | @@ -4,12 +4,11 @@ | ||
4 | <meta charset="UTF-8"> | 4 | <meta charset="UTF-8"> |
5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no"> | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no"> |
6 | <meta content="yes" name="apple-mobile-web-app-capable"> | 6 | <meta content="yes" name="apple-mobile-web-app-capable"> |
7 | -<meta content="yes" name="apple-mobile-web-app-capable"> | ||
8 | <meta content="telephone=no" name="format-detection"> | 7 | <meta content="telephone=no" name="format-detection"> |
9 | <meta content="yes" name="apple-touch-fullscreen"> | 8 | <meta content="yes" name="apple-touch-fullscreen"> |
10 | <meta content="black" name="apple-mobile-web-app-status-bar-style"> | 9 | <meta content="black" name="apple-mobile-web-app-status-bar-style"> |
11 | <title>{{title}}</title> | 10 | <title>{{title}}</title> |
12 | -<link rel="stylesheet" href="{{staticCss}}"> | 11 | +<link rel="stylesheet" href="http://static.dev.yohobuy.com/css/cuxiao/coupon.mobile.css"> |
13 | <link rel="dns-prefetch" href="//cdn.yoho.cn"> | 12 | <link rel="dns-prefetch" href="//cdn.yoho.cn"> |
14 | <link rel="dns-prefetch" href="//static.yohobuy.com"> | 13 | <link rel="dns-prefetch" href="//static.yohobuy.com"> |
15 | <script type="text/javascript"> | 14 | <script type="text/javascript"> |
@@ -52,70 +51,74 @@ | @@ -52,70 +51,74 @@ | ||
52 | <ul> | 51 | <ul> |
53 | <li class="logo-coupon01 life"> | 52 | <li class="logo-coupon01 life"> |
54 | <a class="enter-store" href="{{url_166}}"></a> | 53 | <a class="enter-store" href="{{url_166}}"></a> |
55 | - <a class="get-coupon" href="javascript:;" param="15875"></a> | 54 | + <a class="get-coupon" href="{{jumpUrl}}" param="15875"></a> |
56 | </li> | 55 | </li> |
57 | <li class="logo-coupon02 life"> | 56 | <li class="logo-coupon02 life"> |
58 | <a class="get-coupon" href="{{url_201}}"></a> | 57 | <a class="get-coupon" href="{{url_201}}"></a> |
59 | - <a class="get-coupon" href="javascript:;" param="15877"></a> | 58 | + <a class="get-coupon" href="{{jumpUrl}}" param="15877"></a> |
60 | </li> | 59 | </li> |
61 | <li class="logo-coupon03 life"> | 60 | <li class="logo-coupon03 life"> |
62 | <a class="get-coupon" href="{{url_626}}"></a> | 61 | <a class="get-coupon" href="{{url_626}}"></a> |
63 | - <a class="get-coupon" href="javascript:;" param="15879"></a> | 62 | + <a class="get-coupon" href="{{jumpUrl}}" param="15879"></a> |
64 | </li> | 63 | </li> |
65 | <li class="logo-coupon04 life"> | 64 | <li class="logo-coupon04 life"> |
66 | <a class="get-coupon" href="{{url_1024}}"></a> | 65 | <a class="get-coupon" href="{{url_1024}}"></a> |
67 | - <a class="get-coupon" href="javascript:;" param="15881"></a> | 66 | + <a class="get-coupon" href="{{jumpUrl}}" param="15881"></a> |
68 | </li> | 67 | </li> |
69 | <li class="logo-coupon05 life"> | 68 | <li class="logo-coupon05 life"> |
70 | <a class="get-coupon" href="{{url_675}}"></a> | 69 | <a class="get-coupon" href="{{url_675}}"></a> |
71 | - <a class="get-coupon" href="javascript:;" param="15717"></a> | 70 | + <a class="get-coupon" href="{{jumpUrl}}" param="15717"></a> |
72 | </li> | 71 | </li> |
73 | <li class="logo-coupon06 life"> | 72 | <li class="logo-coupon06 life"> |
74 | <a class="get-coupon" href="{{url_801}}"></a> | 73 | <a class="get-coupon" href="{{url_801}}"></a> |
75 | - <a class="get-coupon" href="javascript:;" param="15885"></a> | 74 | + <a class="get-coupon" href="{{jumpUrl}}" param="15885"></a> |
76 | </li> | 75 | </li> |
77 | <li class="logo-coupon07 life"> | 76 | <li class="logo-coupon07 life"> |
78 | <a class="get-coupon" href="{{url_686}}"></a> | 77 | <a class="get-coupon" href="{{url_686}}"></a> |
79 | - <a class="get-coupon" href="javascript:;" param="15887"></a> | 78 | + <a class="get-coupon" href="{{jumpUrl}}" param="15887"></a> |
80 | </li> | 79 | </li> |
81 | <li class="logo-coupon08 life"> | 80 | <li class="logo-coupon08 life"> |
82 | <a class="get-coupon" href="{{url_501}}"></a> | 81 | <a class="get-coupon" href="{{url_501}}"></a> |
83 | - <a class="get-coupon" href="javascript:;" param="15889"></a> | 82 | + <a class="get-coupon" href="{{jumpUrl}}" param="15889"></a> |
84 | </li> | 83 | </li> |
85 | <li class="logo-coupon09 life"> | 84 | <li class="logo-coupon09 life"> |
86 | <a class="get-coupon" href="{{url_925}}"></a> | 85 | <a class="get-coupon" href="{{url_925}}"></a> |
87 | - <a class="get-coupon" href="javascript:;" param="15891"></a> | 86 | + <a class="get-coupon" href="{{jumpUrl}}" param="15891"></a> |
88 | </li> | 87 | </li> |
89 | <li class="logo-coupon10 life"> | 88 | <li class="logo-coupon10 life"> |
90 | <a class="get-coupon" href="{{url_932}}"></a> | 89 | <a class="get-coupon" href="{{url_932}}"></a> |
91 | - <a class="get-coupon" href="javascript:;" param="15893"></a> | 90 | + <a class="get-coupon" href="{{jumpUrl}}" param="15893"></a> |
92 | </li> | 91 | </li> |
93 | <li class="logo-coupon11 life"> | 92 | <li class="logo-coupon11 life"> |
94 | <a class="get-coupon" href="{{url_892}}"></a> | 93 | <a class="get-coupon" href="{{url_892}}"></a> |
95 | - <a class="get-coupon" href="javascript:;" param="15895"></a> | 94 | + <a class="get-coupon" href="{{jumpUrl}}" param="15895"></a> |
96 | </li> | 95 | </li> |
97 | <li class="logo-coupon12 life"> | 96 | <li class="logo-coupon12 life"> |
98 | <a class="get-coupon" href="{{url_849}}"></a> | 97 | <a class="get-coupon" href="{{url_849}}"></a> |
99 | - <a class="get-coupon" href="javascript:;" param="15899"></a> | 98 | + <a class="get-coupon" href="{{jumpUrl}}" param="15899"></a> |
100 | </li> | 99 | </li> |
101 | <li class="logo-coupon13 life"> | 100 | <li class="logo-coupon13 life"> |
102 | <a class="get-coupon" href="{{url_615}}"></a> | 101 | <a class="get-coupon" href="{{url_615}}"></a> |
103 | - <a class="get-coupon" href="javascript:;" param="15901"></a> | 102 | + <a class="get-coupon" href="{{jumpUrl}}" param="15901"></a> |
104 | </li> | 103 | </li> |
105 | </ul> | 104 | </ul> |
106 | </div> | 105 | </div> |
107 | </div> | 106 | </div> |
108 | <div class="coupon-ft"> | 107 | <div class="coupon-ft"> |
109 | <div class="other-coupon"> | 108 | <div class="other-coupon"> |
110 | - <a href="javascript:;">男生</a> | ||
111 | - <a href="javascript:;">女生</a> | ||
112 | - <a href="javascript:;">童装</a> | 109 | + <a href="{{url_boys}}">男生</a> |
110 | + <a href="{{url_girls}}">女生</a> | ||
111 | + <a href="{{url_kids}}">童装</a> | ||
113 | </div> | 112 | </div> |
114 | </div> | 113 | </div> |
115 | </div> | 114 | </div> |
115 | +<input id="shareLink" type="hidden" value="{{shareLink}}"> | ||
116 | +<input id="shareImg" type="hidden" value="{{shareImg}}"> | ||
117 | +<input id="shareTitle" type="hidden" value="{{shareTitle}}"> | ||
118 | +<input id="shareDesc" type="hidden" value="{{shareDesc}}"> | ||
116 | <script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> | 119 | <script type="text/javascript" charset="utf-8" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> |
117 | -<script type="text/javascript" src="{{jqueryJs}}"></script> | ||
118 | -<script type="text/javascript" src="{{staticJs}}"></script> | 120 | +<script type="text/javascript" src="http://static.dev.yohobuy.com/js/cuxiao/jquery.min.js"></script> |
121 | +<script type="text/javascript" src="http://static.dev.yohobuy.com/js/cuxiao/151201/coupon.mobile.js"></script> | ||
119 | <script type="text/javascript"> | 122 | <script type="text/javascript"> |
120 | var _hmt = _hmt || []; | 123 | var _hmt = _hmt || []; |
121 | (function() { | 124 | (function() { |
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | + <head> | ||
4 | + <meta charset="UTF-8"> | ||
5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no"> | ||
6 | + <meta content="yes" name="apple-mobile-web-app-capable"> | ||
7 | + <meta content="telephone=no" name="format-detection"> | ||
8 | + <meta content="yes" name="apple-touch-fullscreen"> | ||
9 | + <meta content="black" name="apple-mobile-web-app-status-bar-style"> | ||
10 | + <title>{{staticTitle}}</title> | ||
11 | + <link rel="dns-prefetch" href="//cdn.yoho.cn"> | ||
12 | + <link rel="dns-prefetch" href="//static.yohobuy.com"> | ||
13 | + <script type="text/javascript"> | ||
14 | + (function(doc, win) { | ||
15 | + var docEl = doc.documentElement; | ||
16 | + (function() { | ||
17 | + var clientWidth = docEl.clientWidth; | ||
18 | + if (!clientWidth) { | ||
19 | + return; | ||
20 | + } | ||
21 | + docEl.style.fontSize = 20 * (clientWidth / 320) + 'px'; | ||
22 | + }()); | ||
23 | + })(document, window); | ||
24 | + </script> | ||
25 | + <style> | ||
26 | + *{margin: 0; padding: 0;} | ||
27 | + #wrapper {width: 100%;} | ||
28 | + #wrapper img {width: 100%; height: auto; display: block;overflow: hidden;} | ||
29 | + .introduce {font-size: 0.5rem; line-height: 1rem;color: #444;padding: 0 0.75rem;margin-top: 1rem;text-indent: 1.125rem;font-family: "SimHei", "Helvetica", "Arial";} | ||
30 | + .brand-item {height: auto;overflow: hidden;background: #f4f4f4;margin-bottom: 1rem;} | ||
31 | + .brand-item li {display: block;width: 4rem;height: 4rem;float: left;-webkit-box-sizing: border-box;-moz-box-sizing: border-box;-o-box-sizing: border-box;box-sizing: border-box;border-right: 1px solid #e0e0e0;border-bottom: 1px solid #e0e0e0;border: 1px solid #e0e0e0;} | ||
32 | + /* .brand-item li:nth-child(4n+4) {border-right: none;} */ | ||
33 | + .brand-item li a,.brand-item li img {width: 100%;height: 100%;display: block;overflow: hidden;} | ||
34 | + </style> | ||
35 | + </head> | ||
36 | + <body> | ||
37 | + <div id="wrapper"> | ||
38 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/banner.jpg"> | ||
39 | + | ||
40 | + <div class="introduce"> | ||
41 | + YOHOPE计划是中国潮流产业的领导者YOHO!集团联合潮流教父Nigo、五月天主唱阿信等全球潮流ICON共同推出的新锐设计师孵化平台,主意是“Help Dream”。该计划为具有设计天赋和潮流设计梦想的国内外原创设计师提供全方位的支持,共同打造更加多元化、更具代表性的设计师品牌和潮流文化,推动中国潮流生态圈的发展。 | ||
42 | + </div> | ||
43 | + | ||
44 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/two.jpg"> | ||
45 | + | ||
46 | + <ul class="brand-item"> | ||
47 | + <li> | ||
48 | + <a href="{{url_208}}"> | ||
49 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-01.jpg"> | ||
50 | + </a> | ||
51 | + </li> | ||
52 | + <li> | ||
53 | + <a href="{{url_256}}"> | ||
54 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-02.jpg"> | ||
55 | + </a> | ||
56 | + </li> | ||
57 | + <li> | ||
58 | + <a href="{{url_257}}"> | ||
59 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-03.jpg"> | ||
60 | + </a> | ||
61 | + </li> | ||
62 | + <li> | ||
63 | + <a href="{{url_450}}"> | ||
64 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-04.jpg"> | ||
65 | + </a> | ||
66 | + </li> | ||
67 | + <li> | ||
68 | + <a href="{{url_444}}"> | ||
69 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-05.jpg"> | ||
70 | + </a> | ||
71 | + </li> | ||
72 | + <li> | ||
73 | + <a href="{{url_443}}"> | ||
74 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-06.jpg"> | ||
75 | + </a> | ||
76 | + </li> | ||
77 | + <li> | ||
78 | + <a href="{{url_261}}"> | ||
79 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-07.jpg"> | ||
80 | + </a> | ||
81 | + </li> | ||
82 | + <li> | ||
83 | + <a href="{{url_350}}"> | ||
84 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-08.jpg"> | ||
85 | + </a> | ||
86 | + </li> | ||
87 | + <li> | ||
88 | + <a href="{{url_302}}"> | ||
89 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-09.jpg"> | ||
90 | + </a> | ||
91 | + </li> | ||
92 | + <li> | ||
93 | + <a href="{{url_852}}"> | ||
94 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-10.jpg"> | ||
95 | + </a> | ||
96 | + </li> | ||
97 | + <li> | ||
98 | + <a href="{{url_570}}"> | ||
99 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-11.jpg"> | ||
100 | + </a> | ||
101 | + </li> | ||
102 | + <li><a href="{{url_560}}"> | ||
103 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-12.jpg"> | ||
104 | + </a> | ||
105 | + </li> | ||
106 | + <li> | ||
107 | + <a href="{{url_520}}"> | ||
108 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-13.jpg"> | ||
109 | + </a> | ||
110 | + </li> | ||
111 | + <li> | ||
112 | + <a href="{{url_562}}"> | ||
113 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-14.jpg"> | ||
114 | + </a> | ||
115 | + </li> | ||
116 | + <li> | ||
117 | + <a href="{{url_672}}"> | ||
118 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-15.jpg"> | ||
119 | + </a> | ||
120 | + </li> | ||
121 | + <li> | ||
122 | + <a href="{{url_678}}"> | ||
123 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-16.jpg"> | ||
124 | + </a> | ||
125 | + </li> | ||
126 | + <li> | ||
127 | + <a href="{{url_396}}"> | ||
128 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-17.jpg"> | ||
129 | + </a> | ||
130 | + </li> | ||
131 | + <li> | ||
132 | + <a href="{{url_397}}"> | ||
133 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-18.jpg"> | ||
134 | + </a> | ||
135 | + </li> | ||
136 | + <li> | ||
137 | + <a href="{{url_550}}"> | ||
138 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-19.jpg"> | ||
139 | + </a> | ||
140 | + </li> | ||
141 | + <li> | ||
142 | + <a href="{{url_591}}"> | ||
143 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-20.jpg"> | ||
144 | + </a> | ||
145 | + </li> | ||
146 | + <li> | ||
147 | + <a href="{{url_583}}"> | ||
148 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-21.jpg"> | ||
149 | + </a> | ||
150 | + </li> | ||
151 | + <li> | ||
152 | + <a href="{{url_598}}"> | ||
153 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-22.jpg"> | ||
154 | + </a> | ||
155 | + </li> | ||
156 | + <li> | ||
157 | + <a href="{{url_824}}"> | ||
158 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-23.jpg"> | ||
159 | + </a> | ||
160 | + </li> | ||
161 | + <li> | ||
162 | + <a href="{{url_481}}"> | ||
163 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-24.jpg"> | ||
164 | + </a> | ||
165 | + </li> | ||
166 | + <li> | ||
167 | + <a href="{{url_701}}"> | ||
168 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-25.jpg"> | ||
169 | + </a> | ||
170 | + </li> | ||
171 | + <li> | ||
172 | + <a href="{{url_464}}"> | ||
173 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/brand-26.jpg"> | ||
174 | + </a> | ||
175 | + </li> | ||
176 | + </ul> | ||
177 | + </div> | ||
178 | + <script src="http://static.dev.yohobuy.com/js/cuxiao/jquery.min.js"></script> | ||
179 | + <script src="http://static.dev.yohobuy.com/js/cuxiao/jquery.lazyload.js"></script> | ||
180 | + <script> | ||
181 | + $(function() { | ||
182 | + $("img.lazy").lazyload({ | ||
183 | + threshold: 200 | ||
184 | + }); | ||
185 | + }); | ||
186 | + </script> | ||
187 | +</body> | ||
188 | +</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 | + <meta content="yes" name="apple-mobile-web-app-capable"> | ||
8 | + <meta content="telephone=no" name="format-detection"> | ||
9 | + <meta content="yes" name="apple-touch-fullscreen"> | ||
10 | + <meta content="black" name="apple-mobile-web-app-status-bar-style"> | ||
11 | + <style> | ||
12 | + *{margin: 0;padding: 0;} | ||
13 | + #wrapper {width: 100%;} | ||
14 | + #wrapper img {width: 100%; height: auto; display: block;overflow: hidden;} | ||
15 | + .img-box {width: 100%;position: relative;} | ||
16 | + .img-box .href {width: 50%; height: 100%;position: absolute;top: 0;} | ||
17 | + .img-box .href-left {left: 0} | ||
18 | + .img-box .href-right {right: 0} | ||
19 | + .img-box .href-click {width: 90%;height: 100%;position: absolute;top: 0;left: 5%;} | ||
20 | + .show-more {height: 100%;width: 25%;position: absolute;top: 0;right: 10%;} | ||
21 | + .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.7;color: #fff;font-size: 18px;border: none;border-radius: 10px;} | ||
22 | + </style> | ||
23 | +</head> | ||
24 | +<body> | ||
25 | + <div id="wrapper"> | ||
26 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/01.jpg"> | ||
27 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/02.jpg"> | ||
28 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/03.jpg"> | ||
29 | + <div class="img-box"> | ||
30 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/04.jpg"> | ||
31 | + <a class="href href-right" href="{{url_yohope}}"></a> | ||
32 | + </div> | ||
33 | + <a href="{{url_mycoupon}}"><img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/05.jpg"></a> | ||
34 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/06.jpg"> | ||
35 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/07.jpg"> | ||
36 | + <div class="img-box"> | ||
37 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/08.jpg"> | ||
38 | + <a class="href href-left" href="{{url_60}}"></a> | ||
39 | + <a class="href href-right" href="{{url_710}}"></a> | ||
40 | + </div> | ||
41 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/00.jpg"> | ||
42 | + <div class="img-box"> | ||
43 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/09.jpg"> | ||
44 | + <a class="href href-left" href="{{url_138}}"></a> | ||
45 | + <a class="href href-right" href="{{url_495}}"></a> | ||
46 | + </div> | ||
47 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/00.jpg"> | ||
48 | + <div class="img-box"> | ||
49 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/10.jpg"> | ||
50 | + <a class="href href-left" href="{{url_419}}"></a> | ||
51 | + <a class="href href-right" href="{{url_868}}"></a> | ||
52 | + </div> | ||
53 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/00.jpg"> | ||
54 | + <div class="img-box"> | ||
55 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/11.jpg"> | ||
56 | + <a class="href href-left" href="{{url_1026}}"></a> | ||
57 | + <a class="href href-right" href="{{url_1027}}"></a> | ||
58 | + </div> | ||
59 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/00.jpg"> | ||
60 | + <div class="img-box"> | ||
61 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/12.jpg"> | ||
62 | + <a class="href href-left" href="{{url_324}}"></a> | ||
63 | + <a class="href href-right" href="{{url_649}}"></a> | ||
64 | + </div> | ||
65 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/00.jpg"> | ||
66 | + <div class="img-box"> | ||
67 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/13.jpg"> | ||
68 | + <a class="href href-left" href="{{url_more}}"></a> | ||
69 | + </div> | ||
70 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/00.jpg"> | ||
71 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/14.jpg"> | ||
72 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/00.jpg"> | ||
73 | + <div class="img-box"> | ||
74 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/15.jpg"> | ||
75 | + <a class="href-click" id="get-all-coupon" href="{{jumpUrl}}"></a> | ||
76 | + </div> | ||
77 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/00.jpg"> | ||
78 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/16.jpg"> | ||
79 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/17.jpg"> | ||
80 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/18.jpg"> | ||
81 | + <div class="img-box"> | ||
82 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/19.jpg"> | ||
83 | + <a href="{{url_help}}" class="show-more"></a> | ||
84 | + </div> | ||
85 | + <img class="lazy" data-original="http://static.dev.yohobuy.com/img/cuxiao/newuser/00.jpg"> | ||
86 | + </div> | ||
87 | + <div id="coupon-container" param="{{activityId}}"></div> | ||
88 | + <script src="http://static.dev.yohobuy.com/js/cuxiao/jquery.min.js"></script> | ||
89 | + <script src="http://static.dev.yohobuy.com/js/cuxiao/jquery.lazyload.js"></script> | ||
90 | + <script src="http://static.dev.yohobuy.com/js/cuxiao/151201/coupon.mobile.js"></script> | ||
91 | + <script> | ||
92 | + $(function() { | ||
93 | + $("img.lazy").lazyload({ | ||
94 | + threshold: 200 | ||
95 | + }); | ||
96 | + }); | ||
97 | + </script> | ||
98 | +</body> | ||
99 | +</html> |
@@ -3,6 +3,8 @@ | @@ -3,6 +3,8 @@ | ||
3 | use Action\AbstractAction; | 3 | use Action\AbstractAction; |
4 | use Plugin\Helpers; | 4 | use Plugin\Helpers; |
5 | use LibModels\Wap\Cuxiao\ActivityData; | 5 | use LibModels\Wap\Cuxiao\ActivityData; |
6 | +use Api\Sign; | ||
7 | +use Api\Yohobuy; | ||
6 | 8 | ||
7 | /** | 9 | /** |
8 | * 领券活动 | 10 | * 领券活动 |
@@ -15,30 +17,47 @@ use LibModels\Wap\Cuxiao\ActivityData; | @@ -15,30 +17,47 @@ use LibModels\Wap\Cuxiao\ActivityData; | ||
15 | */ | 17 | */ |
16 | class CouponController extends AbstractAction | 18 | class CouponController extends AbstractAction |
17 | { | 19 | { |
20 | + /* 用户会话ID */ | ||
21 | + | ||
18 | const SESSION_UID = 'coupon_uid'; | 22 | const SESSION_UID = 'coupon_uid'; |
19 | - | 23 | + |
20 | /** | 24 | /** |
21 | - * 男生的品牌领券-上线时间 2015/12/1 | 25 | + * 男生的品牌领券 |
26 | + * | ||
27 | + * 上线时间 2015/12/1 | ||
22 | */ | 28 | */ |
23 | public function boysbrandAction() | 29 | public function boysbrandAction() |
24 | { | 30 | { |
25 | - // 判断是否是应用访问 | 31 | + // 判断是否是应用访问, 拼接APP需要的URL参数 |
26 | $isApp = null !== $this->get('app_version'); | 32 | $isApp = null !== $this->get('app_version'); |
33 | + $isAppLogged = true; | ||
27 | if ($isApp) { | 34 | if ($isApp) { |
28 | - $uid = $this->get('uid'); | ||
29 | - if ($uid && is_numeric($uid)) { | ||
30 | - $this->setSession(self::SESSION_UID, $uid); | ||
31 | - } | 35 | + $isAppLogged = $this->checkIsLogin(); |
32 | } | 36 | } |
33 | - | 37 | + |
38 | + $urlBoys = Helpers::url('/cuxiao/coupon/boysbrand'); | ||
39 | + $urlGirls = Helpers::url('/cuxiao/coupon/girlsbrand'); | ||
40 | + $urlKids = Helpers::url('/cuxiao/coupon/kidsbrand'); | ||
41 | + $urlLifestyle = Helpers::url('/cuxiao/coupon/lifestylebrand'); | ||
42 | + $urlShare = Helpers::url('/cuxiao/coupon/getShare'); | ||
43 | + $urlEncode = strtr($urlBoys, array('/' => '\\/')); | ||
44 | + | ||
34 | $this->_view->display('boysbrand', array( | 45 | $this->_view->display('boysbrand', array( |
35 | - 'activityId' => 3, // 活动ID | 46 | + 'activityId' => 75, // 活动ID |
36 | 'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题 | 47 | 'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题 |
37 | - 'staticCss' => 'http://static.dev.yohobuy.com/css/cuxiao/coupon.mobile.css', // CSS | ||
38 | - 'staticJs' => 'http://static.dev.yohobuy.com/js/cuxiao/coupon.mobile.js', // JS | ||
39 | - 'jqueryJs' => 'http://static.dev.yohobuy.com/js/cuxiao/jquery.min.js', // JQUERY | 48 | + |
49 | + 'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlBoys . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{}},"requesturl":{},"priority":"N"}}', | ||
40 | 'weixinShare' => $isApp ? false : true, // 是否需要微信分享 | 50 | 'weixinShare' => $isApp ? false : true, // 是否需要微信分享 |
41 | - | 51 | + 'shareLink' => $urlBoys, |
52 | + 'shareTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', | ||
53 | + 'shareImg' => 'http://img12.static.yhbimg.com/couponImg/2015/11/26/09/0226ad7f8bcf5467a789e17b761c7557e0.jpg', | ||
54 | + 'shareDesc' => '2015感恩季!品牌专属优惠券限时送!先领券,再购物,让你乐享整个冬季!', | ||
55 | + | ||
56 | + 'url_boys' => $urlBoys . '?yohobuy={"action":"go.h5","params":{"id":"75","share":"' . $urlShare . '","shareparam":{"id":"75"},"islogin":"Y","type":0,"url":"' . $urlBoys . '","param":{}}}', | ||
57 | + 'url_girls' => $urlGirls . '?yohobuy={"action":"go.h5","params":{"id":"76","share":"' . $urlShare . '","shareparam":{"id":"76"},"islogin":"Y","type":0,"url":"' . $urlGirls . '","param":{}}}', | ||
58 | + 'url_kids' => $urlKids . '?yohobuy={"action":"go.h5","params":{"id":"77","share":"' . $urlShare . '","shareparam":{"id":"77"},"islogin":"Y","type":0,"url":"' . $urlKids . '","param":{}}}', | ||
59 | + 'url_lifestyle' => $urlLifestyle . '?yohobuy={"action":"go.h5","params":{"id":"78","share":"' . $urlShare . '","shareparam":{"id":"78"},"islogin":"Y","type":0,"url":"' . $urlLifestyle . '","param":{}}}', | ||
60 | + | ||
42 | 'url_350' => 'http://list.m.yohobuy.com/?gender=1,3&brand=350&openby:yohobuy={"action":"go.list","params":{"gender":"1,3","brand":"350","title":"MACROPUS"}}', | 61 | 'url_350' => 'http://list.m.yohobuy.com/?gender=1,3&brand=350&openby:yohobuy={"action":"go.list","params":{"gender":"1,3","brand":"350","title":"MACROPUS"}}', |
43 | 'url_160' => 'http://list.m.yohobuy.com/?gender=1,3&brand=160&openby:yohobuy={"action":"go.list","params":{"gender":"1,3","brand":"160","title":"izzue"}}', | 62 | 'url_160' => 'http://list.m.yohobuy.com/?gender=1,3&brand=160&openby:yohobuy={"action":"go.list","params":{"gender":"1,3","brand":"160","title":"izzue"}}', |
44 | 'url_341' => 'http://list.m.yohobuy.com/?gender=1,3&brand=341&openby:yohobuy={"action":"go.list","params":{"gender":"1,3","brand":"341","title":"鬼洗"}}', | 63 | 'url_341' => 'http://list.m.yohobuy.com/?gender=1,3&brand=341&openby:yohobuy={"action":"go.list","params":{"gender":"1,3","brand":"341","title":"鬼洗"}}', |
@@ -91,28 +110,41 @@ class CouponController extends AbstractAction | @@ -91,28 +110,41 @@ class CouponController extends AbstractAction | ||
91 | } | 110 | } |
92 | 111 | ||
93 | /** | 112 | /** |
94 | - * 女生的品牌领券-上线时间 2015/12/1 | 113 | + * 女生的品牌领券 |
114 | + * | ||
115 | + * 上线时间 2015/12/1 | ||
95 | */ | 116 | */ |
96 | public function girlsbrandAction() | 117 | public function girlsbrandAction() |
97 | { | 118 | { |
98 | - // 判断是否是应用访问 | 119 | + // 判断是否是应用访问, 拼接APP需要的URL参数 |
99 | $isApp = null !== $this->get('app_version'); | 120 | $isApp = null !== $this->get('app_version'); |
121 | + $isAppLogged = true; | ||
100 | if ($isApp) { | 122 | if ($isApp) { |
101 | - $uid = $this->get('uid'); | ||
102 | - if ($uid && is_numeric($uid)) { | ||
103 | - $this->setSession(self::SESSION_UID, $uid); | ||
104 | - } | 123 | + $isAppLogged = $this->checkIsLogin(); |
105 | } | 124 | } |
106 | - | 125 | + $urlBoys = Helpers::url('/cuxiao/coupon/boysbrand'); |
126 | + $urlGirls = Helpers::url('/cuxiao/coupon/girlsbrand'); | ||
127 | + $urlKids = Helpers::url('/cuxiao/coupon/kidsbrand'); | ||
128 | + $urlLifestyle = Helpers::url('/cuxiao/coupon/lifestylebrand'); | ||
129 | + $urlShare = Helpers::url('/cuxiao/coupon/getShare'); | ||
130 | + $urlEncode = strtr($urlGirls, array('/' => '\\/')); | ||
131 | + | ||
107 | $this->_view->display('girlsbrand', array( | 132 | $this->_view->display('girlsbrand', array( |
108 | - 'activityId' => 4, // 活动ID | 133 | + 'activityId' => 76, // 活动ID |
109 | 'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题 | 134 | 'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题 |
110 | - 'staticCss' => 'http://static.dev.yohobuy.com/css/cuxiao/coupon.mobile.css', // CSS | ||
111 | - 'staticJs' => 'http://static.dev.yohobuy.com/js/cuxiao/coupon.mobile.js', // JS | ||
112 | - 'jqueryJs' => 'http://static.dev.yohobuy.com/js/cuxiao/jquery.min.js', // JQUERY | 135 | + 'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlGirls . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{}},"requesturl":{},"priority":"N"}}', |
136 | + | ||
113 | 'weixinShare' => $isApp ? false : true, // 是否需要微信分享 | 137 | 'weixinShare' => $isApp ? false : true, // 是否需要微信分享 |
138 | + 'shareLink' => $urlGirls, | ||
139 | + 'shareTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', | ||
140 | + 'shareImg' => 'http://img12.static.yhbimg.com/couponImg/2015/11/26/09/0226ad7f8bcf5467a789e17b761c7557e0.jpg', | ||
141 | + 'shareDesc' => '2015感恩季!品牌专属优惠券限时送!先领券,再购物,让你乐享整个冬季!', | ||
142 | + | ||
143 | + 'url_boys' => $urlBoys . '?yohobuy={"action":"go.h5","params":{"id":"75","share":"' . $urlShare . '","shareparam":{"id":"75"},"islogin":"Y","type":0,"url":"' . $urlBoys . '","param":{}}}', | ||
144 | + 'url_girls' => $urlGirls . '?yohobuy={"action":"go.h5","params":{"id":"76","share":"' . $urlShare . '","shareparam":{"id":"76"},"islogin":"Y","type":0,"url":"' . $urlGirls . '","param":{}}}', | ||
145 | + 'url_kids' => $urlKids . '?yohobuy={"action":"go.h5","params":{"id":"77","share":"' . $urlShare . '","shareparam":{"id":"77"},"islogin":"Y","type":0,"url":"' . $urlKids . '","param":{}}}', | ||
146 | + 'url_lifestyle' => $urlLifestyle . '?yohobuy={"action":"go.h5","params":{"id":"78","share":"' . $urlShare . '","shareparam":{"id":"78"},"islogin":"Y","type":0,"url":"' . $urlLifestyle . '","param":{}}}', | ||
114 | 147 | ||
115 | - 'title' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', | ||
116 | 'url_570' => 'http://list.m.yohobuy.com/?gender=2,3&brand=570&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"570","title":"iyogurt"}}', | 148 | 'url_570' => 'http://list.m.yohobuy.com/?gender=2,3&brand=570&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"570","title":"iyogurt"}}', |
117 | 'url_864' => 'http://list.m.yohobuy.com/?gender=2,3&brand=868&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"868","title":"Mango"}}', | 149 | 'url_864' => 'http://list.m.yohobuy.com/?gender=2,3&brand=868&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"868","title":"Mango"}}', |
118 | 'url_824' => 'http://list.m.yohobuy.com/?gender=2,3&brand=824&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"824","title":"M.WOWL"}}', | 150 | 'url_824' => 'http://list.m.yohobuy.com/?gender=2,3&brand=824&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"824","title":"M.WOWL"}}', |
@@ -169,28 +201,41 @@ class CouponController extends AbstractAction | @@ -169,28 +201,41 @@ class CouponController extends AbstractAction | ||
169 | } | 201 | } |
170 | 202 | ||
171 | /** | 203 | /** |
172 | - * 潮童的品牌领券-上线时间 2015/12/1 | 204 | + * 潮童的品牌领券 |
205 | + * | ||
206 | + * 上线时间 2015/12/1 | ||
173 | */ | 207 | */ |
174 | public function kidsbrandAction() | 208 | public function kidsbrandAction() |
175 | { | 209 | { |
176 | - // 判断是否是应用访问 | 210 | + // 判断是否是应用访问, 拼接APP需要的URL参数 |
177 | $isApp = null !== $this->get('app_version'); | 211 | $isApp = null !== $this->get('app_version'); |
212 | + $isAppLogged = true; | ||
178 | if ($isApp) { | 213 | if ($isApp) { |
179 | - $uid = $this->get('uid'); | ||
180 | - if ($uid && is_numeric($uid)) { | ||
181 | - $this->setSession(self::SESSION_UID, $uid); | ||
182 | - } | 214 | + $isAppLogged = $this->checkIsLogin(); |
183 | } | 215 | } |
184 | - | 216 | + $urlBoys = Helpers::url('/cuxiao/coupon/boysbrand'); |
217 | + $urlGirls = Helpers::url('/cuxiao/coupon/girlsbrand'); | ||
218 | + $urlKids = Helpers::url('/cuxiao/coupon/kidsbrand'); | ||
219 | + $urlLifestyle = Helpers::url('/cuxiao/coupon/lifestylebrand'); | ||
220 | + $urlShare = Helpers::url('/cuxiao/coupon/getShare'); | ||
221 | + $urlEncode = strtr($urlKids, array('/' => '\\/')); | ||
222 | + | ||
185 | $this->_view->display('kidsbrand', array( | 223 | $this->_view->display('kidsbrand', array( |
186 | - 'activityId' => 5, // 活动ID | 224 | + 'activityId' => 77, // 活动ID |
187 | 'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题 | 225 | 'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题 |
188 | - 'staticCss' => 'http://static.dev.yohobuy.com/css/cuxiao/coupon.mobile.css', // CSS | ||
189 | - 'staticJs' => 'http://static.dev.yohobuy.com/js/cuxiao/coupon.mobile.js', // JS | ||
190 | - 'jqueryJs' => 'http://static.dev.yohobuy.com/js/cuxiao/jquery.min.js', // JQUERY | 226 | + |
227 | + 'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlKids . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{}},"requesturl":{},"priority":"N"}}', | ||
228 | + | ||
191 | 'weixinShare' => $isApp ? false : true, // 是否需要微信分享 | 229 | 'weixinShare' => $isApp ? false : true, // 是否需要微信分享 |
230 | + 'shareLink' => $urlKids, | ||
231 | + 'shareTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', | ||
232 | + 'shareImg' => 'http://img12.static.yhbimg.com/couponImg/2015/11/26/09/0226ad7f8bcf5467a789e17b761c7557e0.jpg', | ||
233 | + 'shareDesc' => '2015感恩季!品牌专属优惠券限时送!先领券,再购物,让你乐享整个冬季!', | ||
192 | 234 | ||
193 | - 'title' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', | 235 | + 'url_boys' => $urlBoys . '?yohobuy={"action":"go.h5","params":{"id":"75","share":"' . $urlShare . '","shareparam":{"id":"75"},"islogin":"Y","type":0,"url":"' . $urlBoys . '","param":{}}}', |
236 | + 'url_girls' => $urlGirls . '?yohobuy={"action":"go.h5","params":{"id":"76","share":"' . $urlShare . '","shareparam":{"id":"76"},"islogin":"Y","type":0,"url":"' . $urlGirls . '","param":{}}}', | ||
237 | + 'url_kids' => $urlKids . '?yohobuy={"action":"go.h5","params":{"id":"77","share":"' . $urlShare . '","shareparam":{"id":"77"},"islogin":"Y","type":0,"url":"' . $urlKids . '","param":{}}}', | ||
238 | + 'url_lifestyle' => $urlLifestyle . '?yohobuy={"action":"go.h5","params":{"id":"78","share":"' . $urlShare . '","shareparam":{"id":"78"},"islogin":"Y","type":0,"url":"' . $urlLifestyle . '","param":{}}}', | ||
194 | 'url_907' => 'http://list.m.yohobuy.com/?msort=365&brand=907&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"907","title":"AMES BROS"}}', | 239 | 'url_907' => 'http://list.m.yohobuy.com/?msort=365&brand=907&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"907","title":"AMES BROS"}}', |
195 | 'url_600' => 'http://list.m.yohobuy.com/?msort=365&brand=600&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"600","title":"HAPPYATOMIC"}}', | 240 | 'url_600' => 'http://list.m.yohobuy.com/?msort=365&brand=600&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"600","title":"HAPPYATOMIC"}}', |
196 | 'url_888' => 'http://list.m.yohobuy.com/?msort=365&brand=888&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"888","title":"Am&ot"}}', | 241 | 'url_888' => 'http://list.m.yohobuy.com/?msort=365&brand=888&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"888","title":"Am&ot"}}', |
@@ -203,28 +248,43 @@ class CouponController extends AbstractAction | @@ -203,28 +248,43 @@ class CouponController extends AbstractAction | ||
203 | } | 248 | } |
204 | 249 | ||
205 | /** | 250 | /** |
206 | - * 创意生活的品牌领券-上线时间 2015/12/1 | 251 | + * 创意生活的品牌领券 |
252 | + * | ||
253 | + * 上线时间 2015/12/1 | ||
207 | */ | 254 | */ |
208 | public function lifestylebrandAction() | 255 | public function lifestylebrandAction() |
209 | { | 256 | { |
210 | - // 判断是否是应用访问 | 257 | + // 判断是否是应用访问, 拼接APP需要的URL参数 |
211 | $isApp = null !== $this->get('app_version'); | 258 | $isApp = null !== $this->get('app_version'); |
259 | + $isAppLogged = true; | ||
212 | if ($isApp) { | 260 | if ($isApp) { |
213 | - $uid = $this->get('uid'); | ||
214 | - if ($uid && is_numeric($uid)) { | ||
215 | - $this->setSession(self::SESSION_UID, $uid); | ||
216 | - } | 261 | + $isAppLogged = $this->checkIsLogin(); |
217 | } | 262 | } |
218 | - | 263 | + |
264 | + $urlBoys = Helpers::url('/cuxiao/coupon/boysbrand'); | ||
265 | + $urlGirls = Helpers::url('/cuxiao/coupon/girlsbrand'); | ||
266 | + $urlKids = Helpers::url('/cuxiao/coupon/kidsbrand'); | ||
267 | + $urlLifestyle = Helpers::url('/cuxiao/coupon/lifestylebrand'); | ||
268 | + $urlShare = Helpers::url('/cuxiao/coupon/getShare'); | ||
269 | + $urlEncode = strtr($urlLifestyle, array('/' => '\\/')); | ||
270 | + | ||
219 | $this->_view->display('lifestylebrand', array( | 271 | $this->_view->display('lifestylebrand', array( |
220 | - 'activityId' => 6, // 活动ID | 272 | + 'activityId' => 78, // 活动ID |
221 | 'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题 | 273 | 'staticTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', // 标题 |
222 | - 'staticCss' => 'http://static.dev.yohobuy.com/css/cuxiao/coupon.mobile.css', // CSS | ||
223 | - 'staticJs' => 'http://static.dev.yohobuy.com/js/cuxiao/coupon.mobile.js', // JS | ||
224 | - 'jqueryJs' => 'http://static.dev.yohobuy.com/js/cuxiao/jquery.min.js', // JQUERY | 274 | + |
275 | + 'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlLifestyle . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{}},"requesturl":{},"priority":"N"}}', | ||
276 | + | ||
225 | 'weixinShare' => $isApp ? false : true, // 是否需要微信分享 | 277 | 'weixinShare' => $isApp ? false : true, // 是否需要微信分享 |
278 | + 'shareLink' => $urlLifestyle, | ||
279 | + 'shareTitle' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', | ||
280 | + 'shareImg' => 'http://img12.static.yhbimg.com/couponImg/2015/11/26/09/0226ad7f8bcf5467a789e17b761c7557e0.jpg', | ||
281 | + 'shareDesc' => '2015感恩季!品牌专属优惠券限时送!先领券,再购物,让你乐享整个冬季!', | ||
282 | + | ||
283 | + 'url_boys' => $urlBoys . '?yohobuy={"action":"go.h5","params":{"id":"75","share":"' . $urlShare . '","shareparam":{"id":"75"},"islogin":"Y","type":0,"url":"' . $urlBoys . '","param":{}}}', | ||
284 | + 'url_girls' => $urlGirls . '?yohobuy={"action":"go.h5","params":{"id":"76","share":"' . $urlShare . '","shareparam":{"id":"76"},"islogin":"Y","type":0,"url":"' . $urlGirls . '","param":{}}}', | ||
285 | + 'url_kids' => $urlKids . '?yohobuy={"action":"go.h5","params":{"id":"77","share":"' . $urlShare . '","shareparam":{"id":"77"},"islogin":"Y","type":0,"url":"' . $urlKids . '","param":{}}}', | ||
286 | + 'url_lifestyle' => $urlLifestyle . '?yohobuy={"action":"go.h5","params":{"id":"78","share":"' . $urlShare . '","shareparam":{"id":"78"},"islogin":"Y","type":0,"url":"' . $urlLifestyle . '","param":{}}}', | ||
226 | 287 | ||
227 | - 'title' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', | ||
228 | 'url_166' => 'http://list.m.yohobuy.com/?msort=10&brand=166&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"166","title":"九口山"}}', | 288 | 'url_166' => 'http://list.m.yohobuy.com/?msort=10&brand=166&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"166","title":"九口山"}}', |
229 | 'url_201' => 'http://list.m.yohobuy.com/?msort=10&brand=201&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"201","title":"wesc"}}', | 289 | 'url_201' => 'http://list.m.yohobuy.com/?msort=10&brand=201&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"201","title":"wesc"}}', |
230 | 'url_626' => 'http://list.m.yohobuy.com/?msort=10&brand=626&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"626","title":"cliché"}}', | 290 | 'url_626' => 'http://list.m.yohobuy.com/?msort=10&brand=626&openby:yohobuy={"action":"go.list","params":{"gender":"2,3","brand":"626","title":"cliché"}}', |
@@ -242,6 +302,99 @@ class CouponController extends AbstractAction | @@ -242,6 +302,99 @@ class CouponController extends AbstractAction | ||
242 | } | 302 | } |
243 | 303 | ||
244 | /** | 304 | /** |
305 | + * 新客领券 | ||
306 | + * | ||
307 | + * 上线时间2015/12/2 | ||
308 | + */ | ||
309 | + public function newuserAction() | ||
310 | + { | ||
311 | + // 判断是否是应用访问, 拼接APP需要的URL参数 | ||
312 | + $isApp = null !== $this->get('app_version'); | ||
313 | + $isAppLogged = true; | ||
314 | + if ($isApp) { | ||
315 | + $isAppLogged = $this->checkIsLogin(); | ||
316 | + } | ||
317 | + $urlNewuser = Helpers::url('/cuxiao/coupon/newuser'); | ||
318 | + $urlYohope = Helpers::url('/cuxiao/coupon/yohope'); | ||
319 | + $urlHelp = Helpers::url('/cuxiao/coupon/help'); | ||
320 | + $urlEncode = strtr($urlNewuser, array('/' => '\\/')); | ||
321 | + | ||
322 | + $this->_view->display('newuser', array( | ||
323 | + 'activityId' => 83, // 活动ID | ||
324 | + 'staticTitle' => '新人潮这看,超值惊喜等你领', // 标题 | ||
325 | + 'jumpUrl' => $isAppLogged ? 'javascript:;' : $urlNewuser . '?openby:yohobuy={"action":"go.weblogin","params":{"jumpurl":{"url":"' . $urlEncode . '","param":{}},"requesturl":{},"priority":"N"}}', | ||
326 | + | ||
327 | + 'url_mycoupon' => '', | ||
328 | + 'url_yohope' => $urlYohope . '?yohobuy={"action":"go.h5","params":{"islogin":"Y","type":0,"url":"' . $urlYohope . '","param":{}}}', | ||
329 | + 'url_help' => $urlHelp . '?yohobuy={"action":"go.h5","params":{"islogin":"Y","type":0,"url":"' . $urlHelp . '","param":{}}}', | ||
330 | + 'url_more' => 'http://list.m.yohobuy.com/?msort=1&openby:yohobuy={"action":"go.list","params":{"msort":"1","title":"上衣"}}', | ||
331 | + | ||
332 | + 'url_60' => 'http://izzue.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"60"}}', | ||
333 | + 'url_710' => 'http://madness.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"710"}}', | ||
334 | + 'url_138' => 'http://thething.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"138"}}', | ||
335 | + 'url_495' => 'http://lightningbear.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"495"}}', | ||
336 | + 'url_419' => 'http://haso.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"419"}}', | ||
337 | + 'url_868' => 'http://mango.m.yohobuy.com/?gender=2,3&openby:yohobuy={"action":"go.brand","params":{"brand_id":"868"}}', | ||
338 | + 'url_1026' => 'http://jnby.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"1026"}}', | ||
339 | + 'url_1027' => 'http://less.m.yohobuy.com/?gender=2,3&openby:yohobuy={"action":"go.brand","params":{"brand_id":"1027"}}', | ||
340 | + 'url_324' => 'http://bjiaab.m.yohobuy.com/?gender=2,3&openby:yohobuy={"action":"go.brand","params":{"brand_id":"324"}}', | ||
341 | + 'url_649' => 'http://jeffreycampbell.m.yohobuy.com/?gender=2,3&openby:yohobuy={"action":"go.brand","params":{"brand_id":"649"}}', | ||
342 | + )); | ||
343 | + } | ||
344 | + | ||
345 | + /** | ||
346 | + * 新客领券YOHOPE | ||
347 | + * | ||
348 | + * 上线时间2015/12/2 | ||
349 | + */ | ||
350 | + public function yohopeAction() | ||
351 | + { | ||
352 | + $this->_view->display('newuser-yohope', array( | ||
353 | + 'staticTitle' => '新人潮这看,超值惊喜等你领', // 标题 | ||
354 | + | ||
355 | + 'url_208' => 'http://lal.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"208"}}', | ||
356 | + 'url_256' => 'http://blackjack.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"256"}}', | ||
357 | + 'url_257' => 'http://mygesmart.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"257"}}', | ||
358 | + 'url_450' => 'http://intotherainbow.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"450"}}', | ||
359 | + 'url_444' => 'http://evildoer.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"444"}}', | ||
360 | + 'url_443' => 'http://preppyelite.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"443"}}', | ||
361 | + 'url_261' => 'http://teebacco.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"261"}}', | ||
362 | + 'url_350' => 'http://macropus.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"350"}}', | ||
363 | + 'url_302' => 'http://ivyboi.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"302"}}', | ||
364 | + 'url_852' => 'http://gawsfoot.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"852"}}', | ||
365 | + 'url_570' => 'http://iyogurt.m.yohobuy.com/?gender=2,3&openby:yohobuy={"action":"go.brand","params":{"brand_id":"570"}}', | ||
366 | + 'url_560' => 'http://gaws.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"560"}}', | ||
367 | + 'url_520' => 'http://gawscap.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"520"}}', | ||
368 | + 'url_562' => 'http://gawsdigi.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"562"}}', | ||
369 | + 'url_672' => 'http://shapeless.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"672"}}', | ||
370 | + 'url_678' => 'http://halfgirl.m.yohobuy.com/?gender=2,3&openby:yohobuy={"action":"go.brand","params":{"brand_id":"678"}}', | ||
371 | + 'url_396' => 'http://eightguys.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"396"}}', | ||
372 | + 'url_397' => 'http://pinealbody.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"397"}}', | ||
373 | + 'url_550' => 'http://systag.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"550"}}', | ||
374 | + 'url_591' => 'http://flyd.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"591"}}', | ||
375 | + 'url_583' => 'http://masterplan.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"583"}}', | ||
376 | + 'url_598' => 'http://dpk.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"598"}}', | ||
377 | + 'url_824' => 'http://mwowl.m.yohobuy.com/?gender=2,3&openby:yohobuy={"action":"go.brand","params":{"brand_id":"824"}}', | ||
378 | + 'url_481' => 'http://dresslab.m.yohobuy.com/?gender=2,3&openby:yohobuy={"action":"go.brand","params":{"brand_id":"481"}}', | ||
379 | + 'url_701' => 'http://bearburry.m.yohobuy.com/?gender=2,3&openby:yohobuy={"action":"go.brand","params":{"brand_id":"701"}}', | ||
380 | + 'url_464' => 'http://stormstamps.m.yohobuy.com/?openby:yohobuy={"action":"go.brand","params":{"brand_id":"464"}}', | ||
381 | + | ||
382 | + )); | ||
383 | + } | ||
384 | + | ||
385 | + /** | ||
386 | + * 新客领券 - 如何使用优惠券帮助页 | ||
387 | + * | ||
388 | + * 上线时间2015/12/2 | ||
389 | + */ | ||
390 | + public function helpAction() | ||
391 | + { | ||
392 | + $this->_view->display('newuser-help', array( | ||
393 | + 'staticTitle' => '如何使用优惠券', | ||
394 | + )); | ||
395 | + } | ||
396 | + | ||
397 | + /** | ||
245 | * 领取指定的优惠券 | 398 | * 领取指定的优惠券 |
246 | * | 399 | * |
247 | * @param int activityId 活动ID | 400 | * @param int activityId 活动ID |
@@ -270,6 +423,8 @@ class CouponController extends AbstractAction | @@ -270,6 +423,8 @@ class CouponController extends AbstractAction | ||
270 | if (!$uid) { | 423 | if (!$uid) { |
271 | $uid = $this->getSession(self::SESSION_UID); | 424 | $uid = $this->getSession(self::SESSION_UID); |
272 | if (!$uid) { | 425 | if (!$uid) { |
426 | + $result['code'] = 400; | ||
427 | + $result['message'] = '请先登录'; | ||
273 | $result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/'))); | 428 | $result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/'))); |
274 | } | 429 | } |
275 | } | 430 | } |
@@ -300,7 +455,7 @@ class CouponController extends AbstractAction | @@ -300,7 +455,7 @@ class CouponController extends AbstractAction | ||
300 | 455 | ||
301 | /* 判断参数是否有效 */ | 456 | /* 判断参数是否有效 */ |
302 | $activityId = $this->post('activityId'); | 457 | $activityId = $this->post('activityId'); |
303 | - if (!is_numeric($activityId) ) { | 458 | + if (!is_numeric($activityId)) { |
304 | break; | 459 | break; |
305 | } | 460 | } |
306 | 461 | ||
@@ -309,6 +464,8 @@ class CouponController extends AbstractAction | @@ -309,6 +464,8 @@ class CouponController extends AbstractAction | ||
309 | if (!$uid) { | 464 | if (!$uid) { |
310 | $uid = $this->getSession(self::SESSION_UID); | 465 | $uid = $this->getSession(self::SESSION_UID); |
311 | if (!$uid) { | 466 | if (!$uid) { |
467 | + $result['code'] = 400; | ||
468 | + $result['message'] = '请先登录'; | ||
312 | $result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/'))); | 469 | $result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/'))); |
313 | } | 470 | } |
314 | } | 471 | } |
@@ -316,33 +473,97 @@ class CouponController extends AbstractAction | @@ -316,33 +473,97 @@ class CouponController extends AbstractAction | ||
316 | /* 领取指定的优惠券操作 */ | 473 | /* 领取指定的优惠券操作 */ |
317 | $result = ActivityData::getCouponAll($uid, $activityId); | 474 | $result = ActivityData::getCouponAll($uid, $activityId); |
318 | 475 | ||
319 | - | ||
320 | } while (false); | 476 | } while (false); |
321 | 477 | ||
322 | $this->echoJson($result); | 478 | $this->echoJson($result); |
323 | } | 479 | } |
324 | - | 480 | + |
325 | /** | 481 | /** |
326 | * 获取分享链接 | 482 | * 获取分享链接 |
327 | * | 483 | * |
328 | * @param int id 活动ID | 484 | * @param int id 活动ID |
485 | + * @return json | ||
329 | */ | 486 | */ |
330 | public function getshareAction() | 487 | public function getshareAction() |
331 | { | 488 | { |
489 | + $url = ''; | ||
332 | $id = $this->get('id'); | 490 | $id = $this->get('id'); |
333 | - | 491 | + if (!is_numeric($id)) { |
492 | + $id = 0; | ||
493 | + } | ||
494 | + switch (intval($id)) { | ||
495 | + case 75: | ||
496 | + $url = Helpers::url('/cuxiao/coupon/boysbrand'); | ||
497 | + break; | ||
498 | + case 76: | ||
499 | + $url = Helpers::url('/cuxiao/coupon/girlsbrand'); | ||
500 | + break; | ||
501 | + case 77: | ||
502 | + $url = Helpers::url('/cuxiao/coupon/kidsbrand'); | ||
503 | + break; | ||
504 | + case 78: | ||
505 | + $url = Helpers::url('/cuxiao/coupon/lifestyle'); | ||
506 | + break; | ||
507 | + default: | ||
508 | + $url = Helpers::url('/cuxiao/coupon/boysbrand'); | ||
509 | + break; | ||
510 | + } | ||
511 | + | ||
334 | $result = array( | 512 | $result = array( |
335 | 'code' => 200, | 513 | 'code' => 200, |
336 | 'message' => '领券活动分享', | 514 | 'message' => '领券活动分享', |
337 | 'data' => array( | 515 | 'data' => array( |
338 | 'title' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', | 516 | 'title' => 'Yoho!Buy有货2015感恩季,1000万元+品牌专属优惠券大派送!', |
339 | 'content' => '2015感恩季!品牌专属优惠券限时送!先领券,再购物,让你乐享整个冬季!', | 517 | 'content' => '2015感恩季!品牌专属优惠券限时送!先领券,再购物,让你乐享整个冬季!', |
340 | - 'pic' => '', | ||
341 | - 'url' => '', | 518 | + 'pic' => 'http://img12.static.yhbimg.com/couponImg/2015/11/26/09/0226ad7f8bcf5467a789e17b761c7557e0.jpg', |
519 | + 'url' => $url, | ||
342 | ), | 520 | ), |
343 | ); | 521 | ); |
344 | - | 522 | + |
345 | $this->echoJson($result); | 523 | $this->echoJson($result); |
346 | } | 524 | } |
347 | 525 | ||
526 | + /** | ||
527 | + * 检查用户是否登录 | ||
528 | + * | ||
529 | + * @return bool (false:表示未登录,true:表示已登录) | ||
530 | + */ | ||
531 | + private function checkIsLogin() | ||
532 | + { | ||
533 | + do { | ||
534 | + /* 判断是否有参数 */ | ||
535 | + $param = $this->get(); | ||
536 | + if (empty($param)) { | ||
537 | + break; | ||
538 | + } | ||
539 | + | ||
540 | + /* 判断参数是否有效 */ | ||
541 | + if (!isset($param['client_secret']) || empty($param['uid'])) { | ||
542 | + break; | ||
543 | + } | ||
544 | + | ||
545 | + /* 取消无用的参数 */ | ||
546 | + $uri = key($param); | ||
547 | + if (false !== stripos($uri, 'cuxiao/')) { | ||
548 | + unset($param[$uri]); | ||
549 | + } | ||
550 | + | ||
551 | + /* 验证公钥是否有效 */ | ||
552 | + $clientSecret = $param['client_secret']; | ||
553 | + $publicParam = Yohobuy::param(); | ||
554 | + $param['private_key'] = $publicParam['private_key']; | ||
555 | + unset($param['client_secret']); | ||
556 | + if ($clientSecret !== Sign::makeSign($param)) { | ||
557 | + break; | ||
558 | + } | ||
559 | + | ||
560 | + $this->setSession(self::SESSION_UID, $param['uid']); | ||
561 | + | ||
562 | + return true; | ||
563 | + | ||
564 | + } while (false); | ||
565 | + | ||
566 | + return false; | ||
567 | + } | ||
568 | + | ||
348 | } | 569 | } |
-
Please register or login to post a comment