code review by fei.hong: do merge huodong girlday the four times
Showing
6 changed files
with
722 additions
and
0 deletions
1 | +<?php return function ($in, $debugopt = 1) { | ||
2 | + $cx = array( | ||
3 | + 'flags' => array( | ||
4 | + 'jstrue' => false, | ||
5 | + 'jsobj' => false, | ||
6 | + 'spvar' => true, | ||
7 | + 'prop' => false, | ||
8 | + 'method' => false, | ||
9 | + 'mustlok' => true, | ||
10 | + 'echo' => false, | ||
11 | + 'debug' => $debugopt, | ||
12 | + ), | ||
13 | + 'constants' => array(), | ||
14 | + 'helpers' => array(), | ||
15 | + 'blockhelpers' => array(), | ||
16 | + 'hbhelpers' => array(), | ||
17 | + 'partials' => array(), | ||
18 | + 'scopes' => array(), | ||
19 | + 'sp_vars' => array('root' => $in), | ||
20 | + 'lcrun' => 'Plugin\LCRun3', | ||
21 | + | ||
22 | + ); | ||
23 | + | ||
24 | + return ''.'<!DOCTYPE html> | ||
25 | +<html> | ||
26 | +<head> | ||
27 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
28 | + <meta charset="utf-8"> | ||
29 | + <title>'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('staticTitle')), ENT_QUOTES, 'UTF-8').'</title> | ||
30 | + <meta name="format-detection" content="telephone=no"> | ||
31 | + <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui"> | ||
32 | + <meta name="apple-mobile-web-app-capable" content="yes"> | ||
33 | + <meta name="apple-mobile-web-app-status-bar-style" content="grey"> | ||
34 | + <script type="text/javascript"> | ||
35 | + (function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=640){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/640)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window); | ||
36 | + </script> | ||
37 | + <link rel="stylesheet" href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('jsUrl')), ENT_QUOTES, 'UTF-8').'/2016xinshili-3/css/style.css"> | ||
38 | +</head> | ||
39 | +<body class="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('pageType')), ENT_QUOTES, 'UTF-8').'"> | ||
40 | +'.' <div class="main-wrap home"> | ||
41 | + <div class="header"> | ||
42 | + </div> | ||
43 | +'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('tab')), $in, function($cx, $in) {return ' <div class="tab type"> | ||
44 | +'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('tab')), $in, false, function($cx, $in) {return ' <div class="tab-item" data-type="'.htmlentities((string)$in, ENT_QUOTES, 'UTF-8').'"></div> | ||
45 | +';}).' <input type="hidden" id="more-brand" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('moreBrand')), ENT_QUOTES, 'UTF-8').'"> | ||
46 | + </div> | ||
47 | +';}).' <div class="content"> | ||
48 | + </div> | ||
49 | + <script type="text/tmpl" id="tmpl"> | ||
50 | + <div class="coupons"> | ||
51 | + {{#coupons}} | ||
52 | + <a class="coupon" href="{{../jumpUrl}}" data-id="{{id}}"> | ||
53 | + <img class="lazy" src="" data-original="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/{{img}}"> | ||
54 | + </a> | ||
55 | + {{/coupons}} | ||
56 | + </div> | ||
57 | + <div class="brands clearfix"> | ||
58 | + {{#brands}} | ||
59 | + <a class="brand" href=\'{{url}}\'> | ||
60 | + <img class="lazy" src="" data-original="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/{{img}}"> | ||
61 | + </a> | ||
62 | + {{/brands}} | ||
63 | + <div class="after"></div> | ||
64 | + </div> | ||
65 | + <div class="more"> | ||
66 | + <div class="more-title"> | ||
67 | + </div> | ||
68 | + <a class="link" href=\'{{more.url}}\'> | ||
69 | + <img class="lazy" src="" data-original="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/{{more.img}}"> | ||
70 | + </a> | ||
71 | + </div> | ||
72 | + </script> | ||
73 | + </div> | ||
74 | + <div class="footer"> | ||
75 | + </div> | ||
76 | + <div class="tip-wrap hide"> | ||
77 | + <div class="tip hide fail"> | ||
78 | + <div class="title"> | ||
79 | + 领取失败<br> | ||
80 | + 请刷新重新领取 | ||
81 | + </div> | ||
82 | + <a class="button" href=""> | ||
83 | + 刷新 | ||
84 | + </a> | ||
85 | + </div> | ||
86 | + </div> | ||
87 | + | ||
88 | + <div class="tip-wrap hide"> | ||
89 | + <div class="tip hide success"> | ||
90 | + <div class="title"> | ||
91 | + 领取成功 | ||
92 | + </div> | ||
93 | + <div class="sub-title"> | ||
94 | + 快去分享给更多<br> | ||
95 | + 喜爱<span class="title">潮流</span>的小伙伴吧! | ||
96 | + </div> | ||
97 | + <a class="button close" href=""> | ||
98 | + 返回 | ||
99 | + </a> | ||
100 | + </div> | ||
101 | + </div> | ||
102 | + | ||
103 | + <div class="tip-wrap hide"> | ||
104 | + <div class="tip hide geted"> | ||
105 | + <div class="title"> | ||
106 | + 您已领取过了 | ||
107 | + </div> | ||
108 | + <div class="sub-title"> | ||
109 | + 快去分享给更多<br> | ||
110 | + 喜爱<span class="title">潮流</span>的小伙伴吧! | ||
111 | + </div> | ||
112 | + <a class="button close" href=""> | ||
113 | + 返回 | ||
114 | + </a> | ||
115 | + </div> | ||
116 | + </div> | ||
117 | + <div class="loading-mask hide"> | ||
118 | + <div class="loading"> | ||
119 | + <div></div> | ||
120 | + <div></div> | ||
121 | + <div></div> | ||
122 | + </div> | ||
123 | + </div> | ||
124 | + | ||
125 | + <input type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('pageType')), ENT_QUOTES, 'UTF-8').'" id="page-type"> | ||
126 | + <input type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('activityId')), ENT_QUOTES, 'UTF-8').'" id="activity-id"> | ||
127 | + <input type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('jumpUrl')), ENT_QUOTES, 'UTF-8').'" id="jump-url"> | ||
128 | +'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('isApp')), $in, function($cx, $in) {return ' <input type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('getCouponUrl')), ENT_QUOTES, 'UTF-8').'" id="getCouponUrl"> | ||
129 | +';}).' <script type="text/javascript"> | ||
130 | + var isOnline = '.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('isOnline')), ENT_QUOTES, 'UTF-8').'; | ||
131 | +'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('isApp')), $in, function($cx, $in) {return ' var isApp = 1; | ||
132 | +'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('isAppLogin')), $in, function($cx, $in) {return ' var isAppLogin = 1; | ||
133 | +';}).'';}).' | ||
134 | + </script> | ||
135 | +'.'<input type="hidden" id="shareTitle" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareTitle')), ENT_QUOTES, 'UTF-8').'"> | ||
136 | +<input type="hidden" id="shareDesc" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareDesc')), ENT_QUOTES, 'UTF-8').'"> | ||
137 | +<input type="hidden" id="shareImg" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareImg')), ENT_QUOTES, 'UTF-8').'"> | ||
138 | +<input type="hidden" id="shareLink" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareLink')), ENT_QUOTES, 'UTF-8').'"> | ||
139 | +<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script> | ||
140 | +<script type="text/javascript" src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('jsUrl')), ENT_QUOTES, 'UTF-8').'/2016xinshili-3/js/libs.js"></script> | ||
141 | +'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('staticJS')), $in, false, function($cx, $in) {return '<script type="text/javascript" src="'.htmlentities((string)Plugin\LCRun3::v($cx, $cx['scopes'][count($cx['scopes'])-1], array('jsUrl')), ENT_QUOTES, 'UTF-8').'/2016xinshili-3/js/'.htmlentities((string)$in, ENT_QUOTES, 'UTF-8').'"></script> | ||
142 | +';}).'</body> | ||
143 | +'.''; | ||
144 | +} | ||
145 | +?> |
1 | +<?php return function ($in, $debugopt = 1) { | ||
2 | + $cx = array( | ||
3 | + 'flags' => array( | ||
4 | + 'jstrue' => false, | ||
5 | + 'jsobj' => false, | ||
6 | + 'spvar' => true, | ||
7 | + 'prop' => false, | ||
8 | + 'method' => false, | ||
9 | + 'mustlok' => true, | ||
10 | + 'echo' => false, | ||
11 | + 'debug' => $debugopt, | ||
12 | + ), | ||
13 | + 'constants' => array(), | ||
14 | + 'helpers' => array(), | ||
15 | + 'blockhelpers' => array(), | ||
16 | + 'hbhelpers' => array(), | ||
17 | + 'partials' => array(), | ||
18 | + 'scopes' => array(), | ||
19 | + 'sp_vars' => array('root' => $in), | ||
20 | + 'lcrun' => 'Plugin\LCRun3', | ||
21 | + | ||
22 | + ); | ||
23 | + | ||
24 | + return ''.'<!DOCTYPE html> | ||
25 | +<html> | ||
26 | +<head> | ||
27 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
28 | + <meta charset="utf-8"> | ||
29 | + <title>'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('staticTitle')), ENT_QUOTES, 'UTF-8').'</title> | ||
30 | + <meta name="format-detection" content="telephone=no"> | ||
31 | + <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui"> | ||
32 | + <meta name="apple-mobile-web-app-capable" content="yes"> | ||
33 | + <meta name="apple-mobile-web-app-status-bar-style" content="grey"> | ||
34 | + <script type="text/javascript"> | ||
35 | + (function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=640){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/640)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window); | ||
36 | + </script> | ||
37 | + <link rel="stylesheet" href="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('jsUrl')), ENT_QUOTES, 'UTF-8').'/2016xinshili-4/css/style.css"> | ||
38 | +</head> | ||
39 | +<body class="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('pageType')), ENT_QUOTES, 'UTF-8').'"> | ||
40 | +'.' <div class="main-wrap home"> | ||
41 | + <div class="header"> | ||
42 | + </div> | ||
43 | +'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('tab')), $in, function($cx, $in) {return ' <div class="tab type"> | ||
44 | +'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('tab')), $in, false, function($cx, $in) {return ' <div class="tab-item" data-type="'.htmlentities((string)$in, ENT_QUOTES, 'UTF-8').'"></div> | ||
45 | +';}).' <input type="hidden" id="more-brand" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('moreBrand')), ENT_QUOTES, 'UTF-8').'"> | ||
46 | + </div> | ||
47 | +';}).' <div class="content"> | ||
48 | + </div> | ||
49 | + <script type="text/tmpl" id="tmpl"> | ||
50 | + <div class="coupons"> | ||
51 | + {{#coupons}} | ||
52 | + <a class="coupon" href="{{../jumpUrl}}" data-id="{{id}}"> | ||
53 | + <img class="lazy" src="" data-original="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/{{img}}"> | ||
54 | + </a> | ||
55 | + {{/coupons}} | ||
56 | + </div> | ||
57 | + <div class="brands clearfix"> | ||
58 | + {{#brands}} | ||
59 | + <a class="brand" href=\'{{url}}\'> | ||
60 | + <img class="lazy" src="" data-original="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/{{img}}"> | ||
61 | + </a> | ||
62 | + {{/brands}} | ||
63 | + <div class="after"></div> | ||
64 | + </div> | ||
65 | + <div class="more"> | ||
66 | + <div class="more-title"> | ||
67 | + </div> | ||
68 | + <a class="link" href=\'{{more.url}}\'> | ||
69 | + <img class="lazy" src="" data-original="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('imgUrl')), ENT_QUOTES, 'UTF-8').'/{{more.img}}"> | ||
70 | + </a> | ||
71 | + </div> | ||
72 | + </script> | ||
73 | + </div> | ||
74 | + <div class="footer"> | ||
75 | + </div> | ||
76 | + <div class="tip-wrap hide"> | ||
77 | + <div class="tip hide fail"> | ||
78 | + <div class="title"> | ||
79 | + 领取失败<br> | ||
80 | + 请刷新重新领取 | ||
81 | + </div> | ||
82 | + <a class="button" href=""> | ||
83 | + 刷新 | ||
84 | + </a> | ||
85 | + </div> | ||
86 | + </div> | ||
87 | + | ||
88 | + <div class="tip-wrap hide"> | ||
89 | + <div class="tip hide success"> | ||
90 | + <div class="title"> | ||
91 | + 领取成功 | ||
92 | + </div> | ||
93 | + <div class="sub-title"> | ||
94 | + 快去分享给更多<br> | ||
95 | + 喜爱<span class="title">潮流</span>的小伙伴吧! | ||
96 | + </div> | ||
97 | + <a class="button close" href=""> | ||
98 | + 返回 | ||
99 | + </a> | ||
100 | + </div> | ||
101 | + </div> | ||
102 | + | ||
103 | + <div class="tip-wrap hide"> | ||
104 | + <div class="tip hide geted"> | ||
105 | + <div class="title"> | ||
106 | + 您已领取过了 | ||
107 | + </div> | ||
108 | + <div class="sub-title"> | ||
109 | + 快去分享给更多<br> | ||
110 | + 喜爱<span class="title">潮流</span>的小伙伴吧! | ||
111 | + </div> | ||
112 | + <a class="button close" href=""> | ||
113 | + 返回 | ||
114 | + </a> | ||
115 | + </div> | ||
116 | + </div> | ||
117 | + <div class="loading-mask hide"> | ||
118 | + <div class="loading"> | ||
119 | + <div></div> | ||
120 | + <div></div> | ||
121 | + <div></div> | ||
122 | + </div> | ||
123 | + </div> | ||
124 | + | ||
125 | + <input type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('pageType')), ENT_QUOTES, 'UTF-8').'" id="page-type"> | ||
126 | + <input type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('activityId')), ENT_QUOTES, 'UTF-8').'" id="activity-id"> | ||
127 | + <input type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('jumpUrl')), ENT_QUOTES, 'UTF-8').'" id="jump-url"> | ||
128 | +'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('isApp')), $in, function($cx, $in) {return ' <input type="hidden" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('getCouponUrl')), ENT_QUOTES, 'UTF-8').'" id="getCouponUrl"> | ||
129 | +';}).' <script type="text/javascript"> | ||
130 | + var isOnline = '.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('isOnline')), ENT_QUOTES, 'UTF-8').'; | ||
131 | +'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('isApp')), $in, function($cx, $in) {return ' var isApp = 1; | ||
132 | +'.Plugin\LCRun3::ifv($cx, Plugin\LCRun3::v($cx, $in, array('isAppLogin')), $in, function($cx, $in) {return ' var isAppLogin = 1; | ||
133 | +';}).'';}).' | ||
134 | + </script> | ||
135 | +'.'<input type="hidden" id="shareTitle" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareTitle')), ENT_QUOTES, 'UTF-8').'"> | ||
136 | +<input type="hidden" id="shareDesc" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareDesc')), ENT_QUOTES, 'UTF-8').'"> | ||
137 | +<input type="hidden" id="shareImg" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareImg')), ENT_QUOTES, 'UTF-8').'"> | ||
138 | +<input type="hidden" id="shareLink" value="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('shareLink')), ENT_QUOTES, 'UTF-8').'"> | ||
139 | +<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.1.0.js"></script> | ||
140 | +<script type="text/javascript" src="'.htmlentities((string)Plugin\LCRun3::v($cx, $in, array('jsUrl')), ENT_QUOTES, 'UTF-8').'/2016xinshili-4/js/libs.js"></script> | ||
141 | +'.Plugin\LCRun3::sec($cx, Plugin\LCRun3::v($cx, $in, array('staticJS')), $in, false, function($cx, $in) {return '<script type="text/javascript" src="'.htmlentities((string)Plugin\LCRun3::v($cx, $cx['scopes'][count($cx['scopes'])-1], array('jsUrl')), ENT_QUOTES, 'UTF-8').'/2016xinshili-4/js/'.htmlentities((string)$in, ENT_QUOTES, 'UTF-8').'"></script> | ||
142 | +';}).'</body> | ||
143 | +'.''; | ||
144 | +} | ||
145 | +?> |
1 | +<?php return function ($in, $debugopt = 1) { | ||
2 | + $cx = array( | ||
3 | + 'flags' => array( | ||
4 | + 'jstrue' => false, | ||
5 | + 'jsobj' => false, | ||
6 | + 'spvar' => true, | ||
7 | + 'prop' => false, | ||
8 | + 'method' => false, | ||
9 | + 'mustlok' => true, | ||
10 | + 'echo' => false, | ||
11 | + 'debug' => $debugopt, | ||
12 | + ), | ||
13 | + 'constants' => array(), | ||
14 | + 'helpers' => array(), | ||
15 | + 'blockhelpers' => array(), | ||
16 | + 'hbhelpers' => array(), | ||
17 | + 'partials' => array(), | ||
18 | + 'scopes' => array(), | ||
19 | + 'sp_vars' => array('root' => $in), | ||
20 | + 'lcrun' => 'Plugin\LCRun3', | ||
21 | + | ||
22 | + ); | ||
23 | + | ||
24 | + return '<!DOCTYPE html> | ||
25 | +<html> | ||
26 | +<head> | ||
27 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
28 | + <meta charset="utf-8"> | ||
29 | + <title>'.Plugin\LCRun3::debug('[staticTitle]', 'encq', $cx, Plugin\LCRun3::debug('[staticTitle]', 'v', $cx, $in, array('staticTitle'))).'</title> | ||
30 | + <link rel="stylesheet" href="'.Plugin\LCRun3::debug('[imgUrl]', 'encq', $cx, Plugin\LCRun3::debug('[imgUrl]', 'v', $cx, $in, array('imgUrl'))).'/2016xinshili-4/css/style.css"> | ||
31 | +</head> | ||
32 | +<body class="'.Plugin\LCRun3::debug('[pageType]', 'encq', $cx, Plugin\LCRun3::debug('[pageType]', 'v', $cx, $in, array('pageType'))).'"> | ||
33 | + <div class="header-wrap"> | ||
34 | + <div class="header"> | ||
35 | + </div> | ||
36 | +'.Plugin\LCRun3::debug('if [tab]', 'ifv', $cx, Plugin\LCRun3::debug('[tab]', 'v', $cx, $in, array('tab')), $in, function($cx, $in) {return ' <div class="tab-wrap"> | ||
37 | + <div class="tab"> | ||
38 | +'.Plugin\LCRun3::debug('[tab]', 'sec', $cx, Plugin\LCRun3::debug('[tab]', 'v', $cx, $in, array('tab')), $in, false, function($cx, $in) {return ' <div class="tab-item tab-'.Plugin\LCRun3::debug('@[index]', 'encq', $cx, Plugin\LCRun3::debug('@[index]', 'v', $cx, $cx['sp_vars'], array('index'))).'" data-type="'.Plugin\LCRun3::debug('this', 'encq', $cx, $in).'"> | ||
39 | + <div class="before"></div> | ||
40 | + </div> | ||
41 | +';}).' </div> | ||
42 | + </div> | ||
43 | +';}).' </div> | ||
44 | + <div class="main-wrap home"> | ||
45 | + <div class="content"> | ||
46 | + </div> | ||
47 | + <script type="text/tmpl" id="tmpl"> | ||
48 | + <div class="coupons"> | ||
49 | + {{#coupons}} | ||
50 | + <img class="lazy coupon" src="" data-original="'.Plugin\LCRun3::debug('[imgUrl]', 'encq', $cx, Plugin\LCRun3::debug('[imgUrl]', 'v', $cx, $in, array('imgUrl'))).'/{{img}}" data-id="{{id}}"> | ||
51 | + {{/coupons}} | ||
52 | + </div> | ||
53 | + <div class="brands clearfix"> | ||
54 | + {{#brands}} | ||
55 | + <a class="brand" target="_blank" href=\'{{url}}\'> | ||
56 | + <img class="lazy" src="" data-original="'.Plugin\LCRun3::debug('[imgUrl]', 'encq', $cx, Plugin\LCRun3::debug('[imgUrl]', 'v', $cx, $in, array('imgUrl'))).'/{{img}}"> | ||
57 | + </a> | ||
58 | + {{/brands}} | ||
59 | + <div class="after"></div> | ||
60 | + </div> | ||
61 | + <div class="more"> | ||
62 | + <div class="more-title"> | ||
63 | + </div> | ||
64 | + <a class="link" target="_blank" href=\'{{more.url}}\'> | ||
65 | + <img class="lazy" src="" data-original="'.Plugin\LCRun3::debug('[imgUrl]', 'encq', $cx, Plugin\LCRun3::debug('[imgUrl]', 'v', $cx, $in, array('imgUrl'))).'/{{more.img}}"> | ||
66 | + </a> | ||
67 | + </div> | ||
68 | + </script> | ||
69 | + <div class="footer"> | ||
70 | + </div> | ||
71 | + </div> | ||
72 | + <div class="tip hide fail"> | ||
73 | + <div class="title"> | ||
74 | + 领取失败<br> | ||
75 | + 请刷新重新领取 | ||
76 | + </div> | ||
77 | + <div class="desc"> | ||
78 | + 如多次领取失败,请联系客服人员<br> | ||
79 | + 带来不便敬请谅解 | ||
80 | + </div> | ||
81 | + <a class="button" href=""> | ||
82 | + 刷新 | ||
83 | + </a> | ||
84 | + </div> | ||
85 | + <div class="tip hide success"> | ||
86 | + <div class="title"> | ||
87 | + 领取成功 | ||
88 | + </div> | ||
89 | + <div class="sub-title"> | ||
90 | + 快去分享给更多<br> | ||
91 | + 喜爱<span class="title">潮流</span>的小伙伴吧! | ||
92 | + </div> | ||
93 | + <a class="button close" href=""> | ||
94 | + 返回 | ||
95 | + </a> | ||
96 | + </div> | ||
97 | + <div class="tip hide geted"> | ||
98 | + <div class="title"> | ||
99 | + 您已领取过了 | ||
100 | + </div> | ||
101 | + <div class="sub-title"> | ||
102 | + 快去分享给更多<br> | ||
103 | + 喜爱<span class="title">潮流</span>的小伙伴吧! | ||
104 | + </div> | ||
105 | + <a class="button close" href=""> | ||
106 | + 返回 | ||
107 | + </a> | ||
108 | + </div> | ||
109 | + <input type="hidden" value="'.Plugin\LCRun3::debug('[pageType]', 'encq', $cx, Plugin\LCRun3::debug('[pageType]', 'v', $cx, $in, array('pageType'))).'" id="page-type"> | ||
110 | + <input type="hidden" value="'.Plugin\LCRun3::debug('[activityId]', 'encq', $cx, Plugin\LCRun3::debug('[activityId]', 'v', $cx, $in, array('activityId'))).'" id="activity-id"> | ||
111 | + <script type="text/javascript"> | ||
112 | + var isOnline = '.Plugin\LCRun3::debug('[isOnline]', 'encq', $cx, Plugin\LCRun3::debug('[isOnline]', 'v', $cx, $in, array('isOnline'))).'; | ||
113 | + </script> | ||
114 | +<script type="text/javascript" src="'.Plugin\LCRun3::debug('[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('[jsUrl]', 'v', $cx, $in, array('jsUrl'))).'/2016xinshili-4/js/libs.js"></script> | ||
115 | +'.Plugin\LCRun3::debug('[staticJS]', 'sec', $cx, Plugin\LCRun3::debug('[staticJS]', 'v', $cx, $in, array('staticJS')), $in, false, function($cx, $in) {return '<script type="text/javascript" src="'.Plugin\LCRun3::debug('../[jsUrl]', 'encq', $cx, Plugin\LCRun3::debug('../[jsUrl]', 'v', $cx, $cx['scopes'][count($cx['scopes'])-1], array('jsUrl'))).'/2016xinshili-4/js/'.Plugin\LCRun3::debug('this', 'encq', $cx, $in).'"></script> | ||
116 | +';}).'</body> | ||
117 | +'; | ||
118 | +} | ||
119 | +?> |
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
5 | + <meta charset="utf-8"> | ||
6 | + <title>{{staticTitle}}</title> | ||
7 | + <link rel="stylesheet" href="{{imgUrl}}/2016xinshili-4/css/style.css"> | ||
8 | +</head> | ||
9 | +<body class="{{pageType}}"> | ||
10 | + <div class="header-wrap"> | ||
11 | + <div class="header"> | ||
12 | + </div> | ||
13 | + {{#if tab}} | ||
14 | + <div class="tab-wrap"> | ||
15 | + <div class="tab"> | ||
16 | + {{#tab}} | ||
17 | + <div class="tab-item tab-{{@index}}" data-type="{{.}}"> | ||
18 | + <div class="before"></div> | ||
19 | + </div> | ||
20 | + {{/tab}} | ||
21 | + </div> | ||
22 | + </div> | ||
23 | + {{/if}} | ||
24 | + </div> | ||
25 | + <div class="main-wrap home"> | ||
26 | + <div class="content"> | ||
27 | + </div> | ||
28 | + <script type="text/tmpl" id="tmpl"> | ||
29 | + <div class="coupons"> | ||
30 | + \{{#coupons}} | ||
31 | + <img class="lazy coupon" src="" data-original="{{imgUrl}}/\{{img}}" data-id="\{{id}}"> | ||
32 | + \{{/coupons}} | ||
33 | + </div> | ||
34 | + <div class="brands clearfix"> | ||
35 | + \{{#brands}} | ||
36 | + <a class="brand" target="_blank" href='\{{url}}'> | ||
37 | + <img class="lazy" src="" data-original="{{imgUrl}}/\{{img}}"> | ||
38 | + </a> | ||
39 | + \{{/brands}} | ||
40 | + <div class="after"></div> | ||
41 | + </div> | ||
42 | + <div class="more"> | ||
43 | + <div class="more-title"> | ||
44 | + </div> | ||
45 | + <a class="link" target="_blank" href='\{{more.url}}'> | ||
46 | + <img class="lazy" src="" data-original="{{imgUrl}}/\{{more.img}}"> | ||
47 | + </a> | ||
48 | + </div> | ||
49 | + </script> | ||
50 | + <div class="footer"> | ||
51 | + </div> | ||
52 | + </div> | ||
53 | + <div class="tip hide fail"> | ||
54 | + <div class="title"> | ||
55 | + 领取失败<br> | ||
56 | + 请刷新重新领取 | ||
57 | + </div> | ||
58 | + <div class="desc"> | ||
59 | + 如多次领取失败,请联系客服人员<br> | ||
60 | + 带来不便敬请谅解 | ||
61 | + </div> | ||
62 | + <a class="button" href=""> | ||
63 | + 刷新 | ||
64 | + </a> | ||
65 | + </div> | ||
66 | + <div class="tip hide success"> | ||
67 | + <div class="title"> | ||
68 | + 领取成功 | ||
69 | + </div> | ||
70 | + <div class="sub-title"> | ||
71 | + 快去分享给更多<br> | ||
72 | + 喜爱<span class="title">潮流</span>的小伙伴吧! | ||
73 | + </div> | ||
74 | + <a class="button close" href=""> | ||
75 | + 返回 | ||
76 | + </a> | ||
77 | + </div> | ||
78 | + <div class="tip hide geted"> | ||
79 | + <div class="title"> | ||
80 | + 您已领取过了 | ||
81 | + </div> | ||
82 | + <div class="sub-title"> | ||
83 | + 快去分享给更多<br> | ||
84 | + 喜爱<span class="title">潮流</span>的小伙伴吧! | ||
85 | + </div> | ||
86 | + <a class="button close" href=""> | ||
87 | + 返回 | ||
88 | + </a> | ||
89 | + </div> | ||
90 | + <input type="hidden" value="{{pageType}}" id="page-type"> | ||
91 | + <input type="hidden" value="{{activityId}}" id="activity-id"> | ||
92 | + <script type="text/javascript"> | ||
93 | + var isOnline = {{isOnline}}; | ||
94 | + </script> | ||
95 | +<script type="text/javascript" src="{{jsUrl}}/2016xinshili-4/js/libs.js"></script> | ||
96 | +{{# staticJS}} | ||
97 | +<script type="text/javascript" src="{{../jsUrl}}/2016xinshili-4/js/{{.}}"></script> | ||
98 | +{{/ staticJS}} | ||
99 | +</body> |
1 | +<?php | ||
2 | +/** | ||
3 | + * Created by PhpStorm. | ||
4 | + * User: Administrator | ||
5 | + * Date: 2016/3/18 | ||
6 | + * Time: 13:27 | ||
7 | + */ | ||
8 | +use Action\HuodongAction; | ||
9 | +use WebPlugin\Helpers; | ||
10 | +use LibModels\Wap\Cuxiao\ActivityData; | ||
11 | +use Plugin\Cache; | ||
12 | +use Configs\CacheConfig; | ||
13 | + | ||
14 | +class GirlfourController extends HuodongAction | ||
15 | +{ | ||
16 | + /** | ||
17 | + * 女生节第四波领券活动-男生品牌页面控制器 | ||
18 | + */ | ||
19 | + public function boyAction() | ||
20 | + { | ||
21 | + $this->_view->display('index', array( | ||
22 | + 'staticTitle' => 'YOHO!BUY有货【春潮新势力】', | ||
23 | + 'staticJS' => array( | ||
24 | + 'main.js' | ||
25 | + ), | ||
26 | + 'pageType' => 'boy', | ||
27 | + 'isOnline' => $this->getisOnline(), | ||
28 | + 'tab' => array('jp', 'hk', 'cn', 'trousers'), | ||
29 | + )); | ||
30 | + } | ||
31 | + | ||
32 | + | ||
33 | + /** | ||
34 | + * 女生节第四波领券活动-女生品牌页面控制器 | ||
35 | + */ | ||
36 | + public function girlAction() | ||
37 | + { | ||
38 | + $this->_view->display('index', array( | ||
39 | + 'staticTitle' => 'YOHO!BUY有货【春潮新势力】', | ||
40 | + 'staticJS' => array( | ||
41 | + 'main.js' | ||
42 | + ), | ||
43 | + 'pageType' => 'girl', | ||
44 | + 'isOnline' => $this->getisOnline(), | ||
45 | + 'tab' => array('hk', 'yohope', 'jean', 'shoes'), | ||
46 | + )); | ||
47 | + } | ||
48 | + | ||
49 | + /** | ||
50 | + * 女生节第四波领券活动-童品牌页面控制器 | ||
51 | + */ | ||
52 | + public function kidAction() | ||
53 | + { | ||
54 | + $this->_view->display('index', array( | ||
55 | + 'staticTitle' => 'YOHO!BUY有货【春潮新势力】', | ||
56 | + 'staticJS' => array( | ||
57 | + 'main.js' | ||
58 | + ), | ||
59 | + 'isOnline' => $this->getisOnline(), | ||
60 | + 'pageType' => 'kid', | ||
61 | + )); | ||
62 | + } | ||
63 | + | ||
64 | + /** | ||
65 | + * 女生节第四波领券活动-创意生活品牌页面控制器 | ||
66 | + */ | ||
67 | + public function lifestyleAction() | ||
68 | + { | ||
69 | + $this->_view->display('index', array( | ||
70 | + 'staticTitle' => 'YOHO!BUY有货【春潮新势力】', | ||
71 | + 'staticJS' => array( | ||
72 | + 'main.js' | ||
73 | + ), | ||
74 | + 'isOnline' => $this->getisOnline(), | ||
75 | + 'pageType' => 'lifestyle', | ||
76 | + 'tab' => array('us', 'hot'), | ||
77 | + )); | ||
78 | + } | ||
79 | + | ||
80 | + | ||
81 | + /** | ||
82 | + * 领取指定的优惠券 | ||
83 | + * | ||
84 | + * @param int activityId 活动ID | ||
85 | + * @param int couponId 优惠券ID | ||
86 | + * @return json | ||
87 | + */ | ||
88 | + public function getnamedAction() | ||
89 | + { | ||
90 | + $result = array('code' => 401, 'message' => '领取失败', 'data' => ''); | ||
91 | + do { | ||
92 | + /* 判断是不是AJAX请求 */ | ||
93 | + if (!$this->isAjax()) { | ||
94 | + break; | ||
95 | + } | ||
96 | + | ||
97 | + /* 判断参数是否有效 */ | ||
98 | + $activityId = $this->getActivityId(); | ||
99 | + $couponId = $this->post('couponId'); | ||
100 | + if (!is_numeric($activityId) || !is_numeric($couponId)) { | ||
101 | + break; | ||
102 | + } | ||
103 | + $uid = $this->getUid(); | ||
104 | + | ||
105 | + if (!$uid) { | ||
106 | + $result['code'] = 400; | ||
107 | + $result['message'] = '请先登录'; | ||
108 | + $result['data'] = Helpers::url('/signin.html', array('refer' => $this->server('HTTP_REFERER', '/')), 'default'); | ||
109 | + break; | ||
110 | + } | ||
111 | + | ||
112 | + /* 领取指定的优惠券操作 */ | ||
113 | + $result = ActivityData::getCouponNamed($uid, $activityId, $couponId); | ||
114 | + if ($uid && isset($result['code']) && intval($result['code'])==200) { | ||
115 | + $couponuid = 'couponnvshengjiedisibo' . $uid; | ||
116 | + $status = Cache::get($couponuid); | ||
117 | + if (!$status) { | ||
118 | + $this->sendMessage($uid, '【优惠券】您已成功领取春潮新势力-品牌优惠券。', '尊敬的客户:恭喜您成功获得春潮新势力-品牌优惠券 !您可以在个人中心查看优惠券详情。'); | ||
119 | + Cache::set($couponuid, true, 3600 * 24 * 5); | ||
120 | + } | ||
121 | + } | ||
122 | + } while (false); | ||
123 | + | ||
124 | + | ||
125 | + $this->echoJson($result); | ||
126 | + } | ||
127 | + | ||
128 | + /** | ||
129 | + * 检测登录状态 | ||
130 | + * | ||
131 | + * @return int | ||
132 | + */ | ||
133 | + private function getLoggedUid() | ||
134 | + { | ||
135 | + if ($this->_isApp) { | ||
136 | + $uid = $this->get('uid'); | ||
137 | + } else { | ||
138 | + $uid = $this->getUid(); | ||
139 | + } | ||
140 | + return $uid; | ||
141 | + } | ||
142 | + | ||
143 | + /** | ||
144 | + * 根据环境来获取活动ID | ||
145 | + * | ||
146 | + * @return int | ||
147 | + */ | ||
148 | + private function getActivityId() | ||
149 | + { | ||
150 | + // 设置环境变量 | ||
151 | + switch (APPLICATION_ENV) { | ||
152 | + case 'production': // 生产 | ||
153 | + return 558; | ||
154 | + case 'preview': // 预览 | ||
155 | + case 'testing': // 测试 | ||
156 | + case 'develop': // 开发 | ||
157 | + default: | ||
158 | + return 496; | ||
159 | + } | ||
160 | + } | ||
161 | + | ||
162 | + /** | ||
163 | + * 发送站内信 | ||
164 | + * | ||
165 | + * @param int $uid 用户ID | ||
166 | + */ | ||
167 | + private function sendMessage($uid, $title, $content) | ||
168 | + { | ||
169 | + try { | ||
170 | + ActivityData::message($uid, $title, $content); | ||
171 | + } catch (Exception $e) { | ||
172 | + // do nothing | ||
173 | + } | ||
174 | + } | ||
175 | + | ||
176 | + /** | ||
177 | + * 根据环境来获取线上线下 | ||
178 | + * | ||
179 | + * @return int | ||
180 | + */ | ||
181 | + private function getisOnline() | ||
182 | + { | ||
183 | + // 设置环境变量 | ||
184 | + switch (APPLICATION_ENV) { | ||
185 | + case 'production': // 生产 | ||
186 | + return 1; | ||
187 | + case 'preview': // 预览 | ||
188 | + case 'testing': // 测试 | ||
189 | + case 'develop': // 开发 | ||
190 | + default: | ||
191 | + return 0; | ||
192 | + } | ||
193 | + } | ||
194 | + | ||
195 | + | ||
196 | +} | ||
197 | +?> |
-
Please register or login to post a comment