Showing
4 changed files
with
346 additions
and
8 deletions
assets/help/limitcodehelp.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html lang="en"> | ||
3 | +<head> | ||
4 | + <meta charset="UTF-8"> | ||
5 | + <title>如何获得限购码</title> | ||
6 | + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> | ||
7 | + <meta http-equiv="cleartype" content="on"> | ||
8 | + <meta content="telephone=no" name="format-detection" /> | ||
9 | + <script type="text/javascript"> | ||
10 | + (function(doc, win) { | ||
11 | + var docEl = doc.documentElement; | ||
12 | + (function() { | ||
13 | + var clientWidth = docEl.clientWidth; | ||
14 | + if (!clientWidth) { | ||
15 | + return; | ||
16 | + } | ||
17 | + docEl.style.fontSize = 20 * (clientWidth / 320) + 'px'; | ||
18 | + }()); | ||
19 | + })(document, window); | ||
20 | + </script> | ||
21 | + <style> | ||
22 | + html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video, .yoho-header .nav-back, .yoho-header .nav-home, .yoho-header .nav-btn { | ||
23 | + margin: 0; | ||
24 | + padding: 0; | ||
25 | + border: 0; | ||
26 | + font: inherit; | ||
27 | + font-size: 100%; | ||
28 | + vertical-align: baseline; | ||
29 | + } | ||
30 | + | ||
31 | + html { | ||
32 | + line-height: 1; | ||
33 | + } | ||
34 | + | ||
35 | + ol, ul { | ||
36 | + list-style: none; | ||
37 | + } | ||
38 | + | ||
39 | + table { | ||
40 | + border-collapse: collapse; | ||
41 | + border-spacing: 0; | ||
42 | + } | ||
43 | + | ||
44 | + caption, th, td { | ||
45 | + text-align: left; | ||
46 | + font-weight: normal; | ||
47 | + vertical-align: middle; | ||
48 | + } | ||
49 | + | ||
50 | + q, blockquote { | ||
51 | + quotes: none; | ||
52 | + } | ||
53 | + | ||
54 | + q:before, q:after, blockquote:before, blockquote:after { | ||
55 | + content: ""; | ||
56 | + content: none; | ||
57 | + } | ||
58 | + | ||
59 | + a img { | ||
60 | + border: none; | ||
61 | + } | ||
62 | + | ||
63 | + article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary, .yoho-header .nav-back, .yoho-header .nav-home, .yoho-header .nav-btn { | ||
64 | + display: block; | ||
65 | + } | ||
66 | + /*Reset End*/ | ||
67 | + | ||
68 | + .clearfix:after{ | ||
69 | + content: ''; | ||
70 | + display: table; | ||
71 | + clear: both; | ||
72 | + } | ||
73 | + | ||
74 | + * { | ||
75 | + -webkit-tap-highlight-color: rgba(0,0,0,0); | ||
76 | + -moz-tap-highlight-color: rgba(0,0,0,0); | ||
77 | + tap-highlight-color: rgba(0,0,0,0); | ||
78 | + } | ||
79 | + | ||
80 | + html, body { | ||
81 | + font-family: helvetica,Arial,"黑体"; | ||
82 | + width: 100%; | ||
83 | + font-size: 12PX; | ||
84 | + line-height: 1.4; | ||
85 | + } | ||
86 | + | ||
87 | + button, input, select, textarea { | ||
88 | + font-size: 100%; | ||
89 | + margin: 0; | ||
90 | + } | ||
91 | + | ||
92 | + img { | ||
93 | + max-width: 100%; | ||
94 | + display: block; | ||
95 | + border: 0; | ||
96 | + margin: 0 auto; | ||
97 | + } | ||
98 | + | ||
99 | + a { | ||
100 | + text-decoration: none; | ||
101 | + outline: none; | ||
102 | + color: #000 | ||
103 | + } | ||
104 | + | ||
105 | + a:link, a:visited, a:hover, a:actived{ | ||
106 | + color: #000; | ||
107 | + } | ||
108 | + | ||
109 | + *:focus { | ||
110 | + outline: none; | ||
111 | + } | ||
112 | + | ||
113 | + .hide { | ||
114 | + display: none; | ||
115 | + } | ||
116 | + | ||
117 | + .overflow-hidden { | ||
118 | + overflow: hidden; | ||
119 | + } | ||
120 | + | ||
121 | + @font-face { | ||
122 | + font-family: "iconfont"; | ||
123 | + src: url('../font/iconfont.eot'); /* IE9*/ | ||
124 | + src: url('../font/iconfont.eot?#iefix') format('embedded-opentype'), | ||
125 | + url('../font/iconfont.woff') format('woff'), | ||
126 | + url('../font/iconfont.ttf') format('truetype'), | ||
127 | + url('../font/iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */ | ||
128 | + } | ||
129 | + | ||
130 | + .iconfont { | ||
131 | + font-family: "iconfont" !important; | ||
132 | + font-size: 16PX; | ||
133 | + font-style: normal; | ||
134 | + text-decoration: none; | ||
135 | + -webkit-font-smoothing: antialiased; | ||
136 | + -webkit-text-stroke-width: 0.2PX; | ||
137 | + -moz-osx-font-smoothing: grayscale; | ||
138 | + } | ||
139 | + .limit-help-page{ | ||
140 | + padding: 0.7rem; | ||
141 | + color: #444; | ||
142 | + } | ||
143 | + .limit-help-page h2{ | ||
144 | + font-size: 0.75rem; | ||
145 | + font-weight: bold; | ||
146 | + } | ||
147 | + .limit-help-page .method{ | ||
148 | + display: block; | ||
149 | + width: 2.3rem; | ||
150 | + height: 0.875rem; | ||
151 | + line-height: 0.9rem; | ||
152 | + background-color: #444; | ||
153 | + color: #fff; | ||
154 | + border-radius: 0.5rem; | ||
155 | + text-align: center; | ||
156 | + margin: 0.5rem 0; | ||
157 | + } | ||
158 | + .limit-help-page li{ | ||
159 | + font-size: 0.6rem; | ||
160 | + } | ||
161 | + .limit-help-page .intro-img{ | ||
162 | + width: 100%; | ||
163 | + height: 5.5rem; | ||
164 | + background-size: 100%; | ||
165 | + background-repeat: no-repeat; | ||
166 | + margin: 0.5rem 0; | ||
167 | + } | ||
168 | + .limit-help-page .method-1 li:nth-child(1) .intro-img{ | ||
169 | + background-image: url('../assets/img/product/help/1.png'); | ||
170 | + } | ||
171 | + .limit-help-page .method-1 li:nth-child(2) .intro-img{ | ||
172 | + background-image: url('../assets/img/product/help/2.png'); | ||
173 | + } | ||
174 | + .limit-help-page .method-1 li:nth-child(3) .intro-img{ | ||
175 | + background-image: url('../assets/img/product/help/3.png'); | ||
176 | + } | ||
177 | + .limit-help-page .method-2 li:nth-child(1) .intro-img{ | ||
178 | + background-image: url('../assets/img/product/help/4.png'); | ||
179 | + } | ||
180 | + .limit-help-page .method-2 li:nth-child(2) .intro-img{ | ||
181 | + background-image: url('../assets/img/product/help/5.png'); | ||
182 | + } | ||
183 | + .limit-help-page .method-2 li:nth-child(3) .intro-img{ | ||
184 | + background-image: url('../assets/img/product/help/6.png'); | ||
185 | + } | ||
186 | + .limit-help-page .method-2 li:nth-child(4) .intro-img{ | ||
187 | + background-image: url('../assets/img/product/help/7.png'); | ||
188 | + } | ||
189 | + .limit-help-page .how li:nth-child(1) .intro-img{ | ||
190 | + background-image: url('../assets/img/product/help/8.png'); | ||
191 | + } | ||
192 | + .limit-help-page .how li:nth-child(2) .intro-img{ | ||
193 | + background-image: url('../assets/img/product/help/9.png'); | ||
194 | + margin-bottom: 0; | ||
195 | + } | ||
196 | + </style> | ||
197 | + | ||
198 | +</head> | ||
199 | +<body> | ||
200 | + <div class="limit-help-page yoho-page"> | ||
201 | + <h2>不同限定商品获取限购码方式不同,获取限购码目前有两种方式:</h2> | ||
202 | + <span class="method">方式一</span> | ||
203 | + <ul class="method-1"> | ||
204 | + <li>1.在限定发售详情页点击分享或者底部“获取限购码”图标。 | ||
205 | + <div class="intro-img"></div> | ||
206 | + </li> | ||
207 | + <li>2.从弹出的分享中选取需要分享的渠道。 | ||
208 | + <div class="intro-img"></div> | ||
209 | + </li> | ||
210 | + <li>3.分享成功后返回Yoho!Buy有货APP会提示已获得限购码。 | ||
211 | + <div class="intro-img"></div> | ||
212 | + </li> | ||
213 | + </ul> | ||
214 | + <span class="method">方式二</span> | ||
215 | + <ul class="method-2"> | ||
216 | + <li>1.在限定发售详情页点击参加排队赢取限购码图标。 | ||
217 | + <div class="intro-img"></div> | ||
218 | + </li> | ||
219 | + <li>2.进入限定发售排队页面,点击参加排队。 | ||
220 | + <div class="intro-img"></div> | ||
221 | + </li> | ||
222 | + <li>3.排队成功后凭排队序列号作为抽奖凭证,等待开奖时间。 | ||
223 | + <div class="intro-img"></div> | ||
224 | + </li> | ||
225 | + <li>4.开奖后,排队页面会公布中奖名单,限购码会直接发送至账户。 | ||
226 | + <div class="intro-img"></div> | ||
227 | + </li> | ||
228 | + </ul> | ||
229 | + <h2>查看和使用限购码</h2> | ||
230 | + <ul class="how"> | ||
231 | + <li>1.从个人中心进入我的限购码页面,可查看所获取的限购码。 | ||
232 | + <div class="intro-img"></div> | ||
233 | + </li> | ||
234 | + <li>2.商品开售后,可凭此限购码购买对应商品。 | ||
235 | + <div class="intro-img"></div> | ||
236 | + </li> | ||
237 | + </ul> | ||
238 | + </div> | ||
239 | +</body> | ||
240 | +</html> |
assets/help/limitcodeintro.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html lang="en"> | ||
3 | +<head> | ||
4 | + <meta charset="UTF-8"> | ||
5 | + <title>什么是限购码</title> | ||
6 | + <meta name="description" content=""> | ||
7 | + <meta name="viewport" content="width=device-width"> | ||
8 | + <script type="text/javascript"> | ||
9 | + (function(doc, win) { | ||
10 | + var docEl = doc.documentElement; | ||
11 | + (function() { | ||
12 | + var clientWidth = docEl.clientWidth; | ||
13 | + if (!clientWidth) { | ||
14 | + return; | ||
15 | + } | ||
16 | + docEl.style.fontSize = 20 * (clientWidth / 320) + 'px'; | ||
17 | + }()); | ||
18 | + })(document, window); | ||
19 | + </script> | ||
20 | + <style> | ||
21 | + html, body, p { | ||
22 | + margin: 0; | ||
23 | + padding: 0; | ||
24 | + font-family: helvetica,Arial,"黑体"; | ||
25 | + } | ||
26 | + div { | ||
27 | + padding: 0.7rem | ||
28 | + } | ||
29 | + p { | ||
30 | + font-size: 0.7rem; | ||
31 | + color: #444; | ||
32 | + margin: 0.3rem 0; | ||
33 | + line-height: 1rem; | ||
34 | + } | ||
35 | + | ||
36 | + span { | ||
37 | + font-weight: bold; | ||
38 | + } | ||
39 | + </style> | ||
40 | +</head> | ||
41 | +<body> | ||
42 | + <div> | ||
43 | + <p> | ||
44 | + <span>介绍:</span> | ||
45 | + 限购码是指用于删除商品的一种权利,达到一定条件即可获得。 | ||
46 | + </p> | ||
47 | + <p> | ||
48 | + <span>优势:</span> | ||
49 | + 限定商品购买权 | ||
50 | + </p> | ||
51 | + <p> | ||
52 | + <span>用户:</span> | ||
53 | + Yoho!Buy有货忠实用户 | ||
54 | + </p> | ||
55 | + <p> | ||
56 | + <span>如何使用:</span> | ||
57 | + 相关商品开放购买的时候,页面会出现使用限购码的按钮,点击购买即可。 | ||
58 | + <br> | ||
59 | + 限购码对应的商品是唯一的,一个码只可买一个商品。 | ||
60 | + </p> | ||
61 | + </div> | ||
62 | +</body> | ||
63 | +</html> |
@@ -5502,7 +5502,7 @@ $('#likeBtn').on('touchstart', function() { | @@ -5502,7 +5502,7 @@ $('#likeBtn').on('touchstart', function() { | ||
5502 | 5502 | ||
5503 | $('#addtoCart').on('touchstart', function() { | 5503 | $('#addtoCart').on('touchstart', function() { |
5504 | $('.cart-bar').hide(); | 5504 | $('.cart-bar').hide(); |
5505 | - chosePanel.setLimitGoodModeWithSknId(productCode, skn); | 5505 | + productCode && chosePanel.setLimitGoodModeWithSknId(productCode, skn); |
5506 | chosePanel.show(); | 5506 | chosePanel.show(); |
5507 | 5507 | ||
5508 | //统计代码:用于统计用户加入购物车的动作 | 5508 | //统计代码:用于统计用户加入购物车的动作 |
@@ -5614,7 +5614,7 @@ function setEditModeWithSknId(sknId, isThisGoodSelected) { | @@ -5614,7 +5614,7 @@ function setEditModeWithSknId(sknId, isThisGoodSelected) { | ||
5614 | * @return {undefined} | 5614 | * @return {undefined} |
5615 | */ | 5615 | */ |
5616 | function setLimitGoodModeWithSknId(code, sknId) { | 5616 | function setLimitGoodModeWithSknId(code, sknId) { |
5617 | - $('#chose-btn-sure').html('结算'); | 5617 | + $('#chose-btn-sure').html('立即购买'); |
5618 | limitProductCode = code; | 5618 | limitProductCode = code; |
5619 | skn = sknId; | 5619 | skn = sknId; |
5620 | } | 5620 | } |
@@ -5692,7 +5692,7 @@ function updateConformButtonClassAndText() { | @@ -5692,7 +5692,7 @@ function updateConformButtonClassAndText() { | ||
5692 | if (2 === $chosed.closest('.zero-stock').length) { | 5692 | if (2 === $chosed.closest('.zero-stock').length) { |
5693 | $('#chose-btn-sure').css('background-color', '#c0c0c0').html('已售罄'); | 5693 | $('#chose-btn-sure').css('background-color', '#c0c0c0').html('已售罄'); |
5694 | } else if (limitProductCode) { | 5694 | } else if (limitProductCode) { |
5695 | - $('#chose-btn-sure').css('background-color', '#eb0313').html('结算'); | 5695 | + $('#chose-btn-sure').css('background-color', '#eb0313').html('立即购买'); |
5696 | } else { | 5696 | } else { |
5697 | $('#chose-btn-sure').css('background-color', '#eb0313').html(isEdit ? '确认' : '加入购物车'); | 5697 | $('#chose-btn-sure').css('background-color', '#eb0313').html(isEdit ? '确认' : '加入购物车'); |
5698 | } | 5698 | } |
@@ -5993,8 +5993,8 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | @@ -5993,8 +5993,8 @@ $yohoPage.on('touchstart', '.btn-minus', function() { | ||
5993 | } else if (limitProductCode) { | 5993 | } else if (limitProductCode) { |
5994 | 5994 | ||
5995 | // 当前面板选择的是限购商品 | 5995 | // 当前面板选择的是限购商品 |
5996 | - url = 'http://m.yohobuy.com/cart/index/orderEnsure?code=' + limitProductCode + '&&sku=' + | ||
5997 | - productSku + '&&skn=' + skn + '&&buy_num=' + buyNumber; | 5996 | + url = $('#limitProductPay').val() + '?limitproductcode=' + limitProductCode + '&sku=' + |
5997 | + productSku + '&skn=' + skn + '&buy_number=' + buyNumber; | ||
5998 | 5998 | ||
5999 | //打开结算页面,结束函数执行。 | 5999 | //打开结算页面,结束函数执行。 |
6000 | window.location.href = url; | 6000 | window.location.href = url; |
@@ -9947,6 +9947,26 @@ require("js/common"); | @@ -9947,6 +9947,26 @@ require("js/common"); | ||
9947 | 9947 | ||
9948 | lazyLoad(); | 9948 | lazyLoad(); |
9949 | 9949 | ||
9950 | +function getQueryParam() { | ||
9951 | + var queryArray = location.search.substr(1).split('&'), | ||
9952 | + i, | ||
9953 | + subArr = [], | ||
9954 | + obj = {}; | ||
9955 | + | ||
9956 | + for (i = 0; i < queryArray.length; i++) { | ||
9957 | + subArr = queryArray[i].split('='); | ||
9958 | + obj[subArr[0]] = subArr[1]; | ||
9959 | + subArr = []; | ||
9960 | + } | ||
9961 | + | ||
9962 | + return obj; | ||
9963 | +} | ||
9964 | + | ||
9965 | +function isLimitGood() { | ||
9966 | + return getQueryParam().limitproductcode; | ||
9967 | +} | ||
9968 | + | ||
9969 | + | ||
9950 | if (window.getUid() !== orderInfo('uid')) { | 9970 | if (window.getUid() !== orderInfo('uid')) { |
9951 | order.init(); | 9971 | order.init(); |
9952 | window.location.reload(); | 9972 | window.location.reload(); |
@@ -9963,6 +9983,18 @@ if (document.referrer && document.referrer.indexOf('/cart/index/index') !== -1) | @@ -9963,6 +9983,18 @@ if (document.referrer && document.referrer.indexOf('/cart/index/index') !== -1) | ||
9963 | orderInfo('couponName', null); | 9983 | orderInfo('couponName', null); |
9964 | } | 9984 | } |
9965 | 9985 | ||
9986 | +isLimitGood() && (function() { | ||
9987 | + var a = []; | ||
9988 | + | ||
9989 | + var data = getQueryParam(); | ||
9990 | + | ||
9991 | + data['type'] = 'limitcode'; | ||
9992 | + | ||
9993 | + a.push(data); | ||
9994 | + orderInfo('skuList', JSON.stringify(a)); | ||
9995 | + orderInfo('limitUrlSufix', location.search); | ||
9996 | +})(); | ||
9997 | + | ||
9966 | if (queryString.cartType || queryString.carttype || !orderInfo('cartType')) { | 9998 | if (queryString.cartType || queryString.carttype || !orderInfo('cartType')) { |
9967 | orderInfo('cartType', queryString.cartType || queryString.carttype || 'ordinary'); | 9999 | orderInfo('cartType', queryString.cartType || queryString.carttype || 'ordinary'); |
9968 | } | 10000 | } |
@@ -10019,7 +10051,8 @@ function orderCompute() { | @@ -10019,7 +10051,8 @@ function orderCompute() { | ||
10019 | deliveryId: orderInfo('deliveryId'), | 10051 | deliveryId: orderInfo('deliveryId'), |
10020 | paymentTypeId: orderInfo('paymentTypeId'), | 10052 | paymentTypeId: orderInfo('paymentTypeId'), |
10021 | couponCode: orderInfo('couponCode'), | 10053 | couponCode: orderInfo('couponCode'), |
10022 | - yohoCoin: yohoCoin | 10054 | + yohoCoin: yohoCoin, |
10055 | + skuList: isLimitGood() ? orderInfo('skuList') : undefined | ||
10023 | } | 10056 | } |
10024 | }).then(function(res) { | 10057 | }).then(function(res) { |
10025 | var priceHtml; | 10058 | var priceHtml; |
@@ -10094,7 +10127,9 @@ function submitOrder() { | @@ -10094,7 +10127,9 @@ function submitOrder() { | ||
10094 | paymentTypeId: orderInfo('paymentTypeId'), | 10127 | paymentTypeId: orderInfo('paymentTypeId'), |
10095 | paymentType: orderInfo('paymentType'), //支付方式 | 10128 | paymentType: orderInfo('paymentType'), //支付方式 |
10096 | couponCode: orderInfo('couponCode'), | 10129 | couponCode: orderInfo('couponCode'), |
10097 | - yohoCoin: orderInfo('yohoCoin') | 10130 | + yohoCoin: orderInfo('yohoCoin'), |
10131 | + skuList: isLimitGood() ? orderInfo('skuList') : undefined | ||
10132 | + | ||
10098 | } | 10133 | } |
10099 | }).then(function(res) { | 10134 | }).then(function(res) { |
10100 | var url; | 10135 | var url; |
@@ -10499,7 +10534,7 @@ $('.address-item').on('touchend', function() { | @@ -10499,7 +10534,7 @@ $('.address-item').on('touchend', function() { | ||
10499 | orderInfo('addressId', addressId); | 10534 | orderInfo('addressId', addressId); |
10500 | orderInfo('address', address); | 10535 | orderInfo('address', address); |
10501 | 10536 | ||
10502 | - window.location.href = $this.data('href'); | 10537 | + window.location.href = $this.data('href') + (orderInfo('limitUrlSufix') || ''); |
10503 | }).on('touchend', '.edit', function() { | 10538 | }).on('touchend', '.edit', function() { |
10504 | window.location.href = $(this).data('href'); | 10539 | window.location.href = $(this).data('href'); |
10505 | return false; | 10540 | return false; |
This diff could not be displayed because it is too large.
-
Please register or login to post a comment