Showing
15 changed files
with
121 additions
and
35 deletions
@@ -237,7 +237,20 @@ class YoLuckService extends global.yoho.BaseModel { | @@ -237,7 +237,20 @@ class YoLuckService extends global.yoho.BaseModel { | ||
237 | participantCount = r1.limit; | 237 | participantCount = r1.limit; |
238 | } | 238 | } |
239 | 239 | ||
240 | - result.product.notice = result.product.notice || '关注公众号“潮流有货”,发送“开奖”查看中奖结果'; | 240 | + let notice; |
241 | + | ||
242 | + try { | ||
243 | + notice = JSON.parse(result.product.notice); | ||
244 | + } catch (e) { | ||
245 | + console.log(e); | ||
246 | + console.log(result.product.notice); | ||
247 | + } // eslint-disable-line | ||
248 | + | ||
249 | + result.product.notice = _.assign({ | ||
250 | + content: '关注公众号“潮流有货”,发送“开奖”查看中奖结果', | ||
251 | + h5BtnName: '关注' | ||
252 | + }, notice); | ||
253 | + | ||
241 | result.product.participantCount = this.formatN('000000', participantCount).split(''); | 254 | result.product.participantCount = this.formatN('000000', participantCount).split(''); |
242 | result.actionStatus = this.setActionStatus(result.product); | 255 | result.actionStatus = this.setActionStatus(result.product); |
243 | result.resource = r3; | 256 | result.resource = r3; |
1 | {{#result}} | 1 | {{#result}} |
2 | + {{#if product.status}} | ||
3 | + {{#unless @root.isApp}} | ||
4 | + <div class="fellow-bar-wrap"> | ||
5 | + {{> yoluck/fellow-bar}} | ||
6 | + </div> | ||
7 | + {{/unless}} | ||
8 | + {{/if}} | ||
9 | + | ||
2 | <div class="header"> | 10 | <div class="header"> |
3 | {{> yoluck/product-detail-header product=product avatars=avatars}} | 11 | {{> yoluck/product-detail-header product=product avatars=avatars}} |
4 | </div> | 12 | </div> |
@@ -13,12 +21,6 @@ | @@ -13,12 +21,6 @@ | ||
13 | 21 | ||
14 | <div class="line"></div> | 22 | <div class="line"></div> |
15 | 23 | ||
16 | - {{#if product.status}} | ||
17 | - <div class="fellow-bar"> | ||
18 | - {{> yoluck/fellow-bar}} | ||
19 | - </div> | ||
20 | - {{/if}} | ||
21 | - | ||
22 | <div class="action-bar-wrap"> | 24 | <div class="action-bar-wrap"> |
23 | {{> yoluck/action-bar status=actionStatus num=myPrizeCount actPrizeId=actPrizeId lotteryInfo=product.lottery_info}} | 25 | {{> yoluck/action-bar status=actionStatus num=myPrizeCount actPrizeId=actPrizeId lotteryInfo=product.lottery_info}} |
24 | </div> | 26 | </div> |
1 | <div class="fellow-bar-comp"> | 1 | <div class="fellow-bar-comp"> |
2 | - <div class="fellow-bar"> | ||
3 | - <div class="title">{{product.notice}}</div> | ||
4 | - <div class="btn js-fellow">去关注</div> | 2 | + <div id="fellow-bar" class="fellow-bar" data-type='{{product.notice.h5BtnType}}' data-tip='{{product.notice.h5Tip}}' data-copy='{{product.notice.h5Copy}}' data-link='{{product.notice.h5Link}}'> |
3 | + <div class="title">{{product.notice.content}}</div> | ||
4 | + <div class="btn js-fellow">{{product.notice.h5BtnName}}</div> | ||
5 | </div> | 5 | </div> |
6 | </div> | 6 | </div> |
@@ -2,12 +2,17 @@ | @@ -2,12 +2,17 @@ | ||
2 | <div class="machine"> | 2 | <div class="machine"> |
3 | <img src="//img12.static.yhbimg.com/sns/2018/12/21/14/0231fa07f32886117eccea846e03f453a3.png"> | 3 | <img src="//img12.static.yhbimg.com/sns/2018/12/21/14/0231fa07f32886117eccea846e03f453a3.png"> |
4 | <div class="lottery-block"> | 4 | <div class="lottery-block"> |
5 | - <div id="lottery-list" class="lottery-list"> | 5 | + <div id="lottery-list" class="lottery-list more"> |
6 | <div class="lottery lottery-tpl"> | 6 | <div class="lottery lottery-tpl"> |
7 | <div class="l-thumb"></div> | 7 | <div class="l-thumb"></div> |
8 | <p class="l-title">我的<br>抽奖码</p> | 8 | <p class="l-title">我的<br>抽奖码</p> |
9 | <p class="l-code"></p> | 9 | <p class="l-code"></p> |
10 | </div> | 10 | </div> |
11 | + <p class="more-lottery"> | ||
12 | + <a href="/activity/yoluck/index.html?type=3"> | ||
13 | + <span class="iconfont"></span> | ||
14 | + </a> | ||
15 | + </p> | ||
11 | </div> | 16 | </div> |
12 | </div> | 17 | </div> |
13 | </div> | 18 | </div> |
No preview for this file type
@@ -20,13 +20,6 @@ Created by iconfont | @@ -20,13 +20,6 @@ Created by iconfont | ||
20 | /> | 20 | /> |
21 | <missing-glyph /> | 21 | <missing-glyph /> |
22 | 22 | ||
23 | - <glyph glyph-name="x" unicode="x" horiz-adv-x="1001" | ||
24 | -d="M281 543q-27 -1 -53 -1h-83q-18 0 -36.5 -6t-32.5 -18.5t-23 -32t-9 -45.5v-76h912v41q0 16 -0.5 30t-0.5 18q0 13 -5 29t-17 29.5t-31.5 22.5t-49.5 9h-133v-97h-438v97zM955 310v-52q0 -23 0.5 -52t0.5 -58t-10.5 -47.5t-26 -30t-33 -16t-31.5 -4.5q-14 -1 -29.5 -0.5 | ||
25 | -t-29.5 0.5h-32l-45 128h-439l-44 -128h-29h-34q-20 0 -45 1q-25 0 -41 9.5t-25.5 23t-13.5 29.5t-4 30v167h911zM163 247q-12 0 -21 -8.5t-9 -21.5t9 -21.5t21 -8.5q13 0 22 8.5t9 21.5t-9 21.5t-22 8.5zM316 123q-8 -26 -14 -48q-5 -19 -10.5 -37t-7.5 -25t-3 -15t1 -14.5 | ||
26 | -t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-5 19 -11 39h-368zM336 498v228q0 11 2.5 23t10 21.5t20.5 15.5t34 6h188q31 0 51.5 -14.5t20.5 -52.5v-227h-327z" /> | ||
27 | - | ||
28 | - | ||
29 | - | ||
30 | <glyph glyph-name="more" unicode="" d="M109.3993 511.067c49.7953 0 90.1676-40.3716 90.1676-90.1649s-40.3723-90.1659-90.1676-90.1659c-49.7973 0-90.1696 40.3726-90.1696 90.1659S59.603 511.067 109.3993 511.067zM515.1578 511.067c49.7953 0 90.1686-40.3716 90.1686-90.1649s-40.3723-90.1659-90.1686-90.1659c-49.7963 0-90.1696 40.3726-90.1696 90.1659S465.3616 511.067 515.1578 511.067zM920.9144 511.067c49.7963 0 90.1696-40.3716 90.1696-90.1649s-40.3723-90.1659-90.1696-90.1659c-49.7943 0-90.1686 40.3726-90.1686 90.1659S871.1201 511.067 920.9144 511.067z" horiz-adv-x="1000" /> | 23 | <glyph glyph-name="more" unicode="" d="M109.3993 511.067c49.7953 0 90.1676-40.3716 90.1676-90.1649s-40.3723-90.1659-90.1676-90.1659c-49.7973 0-90.1696 40.3726-90.1696 90.1659S59.603 511.067 109.3993 511.067zM515.1578 511.067c49.7953 0 90.1686-40.3716 90.1686-90.1649s-40.3723-90.1659-90.1686-90.1659c-49.7963 0-90.1696 40.3726-90.1696 90.1659S465.3616 511.067 515.1578 511.067zM920.9144 511.067c49.7963 0 90.1696-40.3716 90.1696-90.1649s-40.3723-90.1659-90.1696-90.1659c-49.7943 0-90.1686 40.3726-90.1686 90.1659S871.1201 511.067 920.9144 511.067z" horiz-adv-x="1000" /> |
31 | 24 | ||
32 | 25 | ||
@@ -270,6 +263,9 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q- | @@ -270,6 +263,9 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q- | ||
270 | <glyph glyph-name="2" unicode="" d="M561.511784 223.813189l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM888.942703 223.813189l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM561.594811 113.387243l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM437.524757 458.447568 0 458.447568 0 896l437.524757 0L437.524757 458.447568zM110.702703 569.15027l216.119351 0L326.822054 785.297297 110.702703 785.297297 110.702703 569.15027zM999.507027 458.087784 561.98227 458.087784 561.98227 895.612541l437.524757 0L999.507027 458.087784zM672.684973 568.790486l216.119351 0 0 216.147027-216.119351 0L672.684973 568.790486zM437.524757-105.776432 0-105.776432l0 437.552432 437.524757 0L437.524757-105.776432zM110.702703 4.92627l216.119351 0 0 216.147027L110.702703 221.073297 110.702703 4.92627zM561.207351 334.792649l221.405405 0 0-110.702703-221.405405 0 0 110.702703ZM888.942703 333.934703l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM779.540757 112.695351l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM562.065297 2.407784l217.945946 0 0-110.702703-217.945946 0 0 110.702703ZM888.942703 2.407784l109.097514 0 0-110.702703-109.097514 0 0 110.702703Z" horiz-adv-x="1024" /> | 263 | <glyph glyph-name="2" unicode="" d="M561.511784 223.813189l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM888.942703 223.813189l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM561.594811 113.387243l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM437.524757 458.447568 0 458.447568 0 896l437.524757 0L437.524757 458.447568zM110.702703 569.15027l216.119351 0L326.822054 785.297297 110.702703 785.297297 110.702703 569.15027zM999.507027 458.087784 561.98227 458.087784 561.98227 895.612541l437.524757 0L999.507027 458.087784zM672.684973 568.790486l216.119351 0 0 216.147027-216.119351 0L672.684973 568.790486zM437.524757-105.776432 0-105.776432l0 437.552432 437.524757 0L437.524757-105.776432zM110.702703 4.92627l216.119351 0 0 216.147027L110.702703 221.073297 110.702703 4.92627zM561.207351 334.792649l221.405405 0 0-110.702703-221.405405 0 0 110.702703ZM888.942703 333.934703l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM779.540757 112.695351l109.097514 0 0-110.702703-109.097514 0 0 110.702703ZM562.065297 2.407784l217.945946 0 0-110.702703-217.945946 0 0 110.702703ZM888.942703 2.407784l109.097514 0 0-110.702703-109.097514 0 0 110.702703Z" horiz-adv-x="1024" /> |
271 | 264 | ||
272 | 265 | ||
266 | + <glyph glyph-name="more-down" unicode="" d="M503.074 322.55100000000004a51.6864 51.6864 0 0 1 73.3184 0l369.707 370.492a52.224 52.224 0 0 1 0 73.6597 51.6693 51.6693 0 0 1-73.3184 0L539.716 432.93 206.652 766.703a51.6693 51.6693 0 0 1-73.3184 0 52.2667 52.2667 0 0 1 0-73.6597l369.741-370.492Zm369.707 122.871L539.716 111.65899999999999 206.652 445.423a51.6693 51.6693 0 0 1-73.3184 0 52.2496 52.2496 0 0 1 0-73.6427l369.732-370.492a51.7035 51.7035 0 0 1 73.3184 0l369.741 370.492a52.2581 52.2581 0 0 1 0 73.6427 51.7035 51.7035 0 0 1-73.344 0Z" horiz-adv-x="1079" /> | ||
267 | + | ||
268 | + | ||
273 | <glyph glyph-name="cuxiaobiaoqian" unicode="" d="M512 896C228.505967 896 0 667.494033 0 384 0 101.727924 228.505967-128 512-128 794.272076-128 1024 101.727924 1024 384 1024 667.494033 794.272076 896 512 896z m277.384248-526.663484l-85.536993-85.536993-51.322195 51.322195 64.763723 64.763724 1.221957 183.293556-182.071599-1.221957-277.384248-276.162292c-2.443914-2.443914-2.443914-7.331742 0-9.775656l171.073985-171.073986c3.665871-3.665871 6.109785-3.665871 9.775657 0L601.202864 285.02148l51.322196-51.322196-160.076373-161.298329c-15.885442-15.885442-36.658711-23.217184-57.431981-23.217184s-41.546539 7.331742-57.43198 23.217184l-171.073986 171.073985c-31.770883 31.770883-31.770883 81.871122 0 113.642005l296.935561 296.935561 287.159904 2.443914-1.221957-287.159904z" horiz-adv-x="1024" /> | 269 | <glyph glyph-name="cuxiaobiaoqian" unicode="" d="M512 896C228.505967 896 0 667.494033 0 384 0 101.727924 228.505967-128 512-128 794.272076-128 1024 101.727924 1024 384 1024 667.494033 794.272076 896 512 896z m277.384248-526.663484l-85.536993-85.536993-51.322195 51.322195 64.763723 64.763724 1.221957 183.293556-182.071599-1.221957-277.384248-276.162292c-2.443914-2.443914-2.443914-7.331742 0-9.775656l171.073985-171.073986c3.665871-3.665871 6.109785-3.665871 9.775657 0L601.202864 285.02148l51.322196-51.322196-160.076373-161.298329c-15.885442-15.885442-36.658711-23.217184-57.431981-23.217184s-41.546539 7.331742-57.43198 23.217184l-171.073986 171.073985c-31.770883 31.770883-31.770883 81.871122 0 113.642005l296.935561 296.935561 287.159904 2.443914-1.221957-287.159904z" horiz-adv-x="1024" /> |
274 | 270 | ||
275 | 271 |
No preview for this file type
No preview for this file type
public/img/activity/yoluck/lottery-more.png
0 → 100644
3.37 KB
@@ -32,6 +32,7 @@ let store = { | @@ -32,6 +32,7 @@ let store = { | ||
32 | targetVersion: '6.8.3', | 32 | targetVersion: '6.8.3', |
33 | }; | 33 | }; |
34 | 34 | ||
35 | +let $fellowBar = $('#fellow-bar'); | ||
35 | let $product = $('.product_name'); | 36 | let $product = $('.product_name'); |
36 | let name = $product.data('name'); | 37 | let name = $product.data('name'); |
37 | let img = $product.data('img'); | 38 | let img = $product.data('img'); |
@@ -52,7 +53,14 @@ new Swiper('.swiper-container', { | @@ -52,7 +53,14 @@ new Swiper('.swiper-container', { | ||
52 | autoplay: 4000 | 53 | autoplay: 4000 |
53 | }); | 54 | }); |
54 | 55 | ||
55 | -function fellow() { | 56 | +function fellow(content) { |
57 | + if (content) { | ||
58 | + $.yAlert({ | ||
59 | + content: `<div class="fellow-tip-content">${content}</div>` // eslint-disable-line | ||
60 | + }); | ||
61 | + return; | ||
62 | + } | ||
63 | + | ||
56 | $.yAlert({ | 64 | $.yAlert({ |
57 | content: `<div>公众号 | 65 | content: `<div>公众号 |
58 | <span style="font-weight: bolder">“潮流有货”</span>已经复制成功,</div> | 66 | <span style="font-weight: bolder">“潮流有货”</span>已经复制成功,</div> |
@@ -158,16 +166,27 @@ let luckAlert = { | @@ -158,16 +166,27 @@ let luckAlert = { | ||
158 | } | 166 | } |
159 | }; | 167 | }; |
160 | 168 | ||
161 | -let clipboardFellow = new Clipboard('.js-fellow', { | ||
162 | - text: function() { | ||
163 | - return '潮流有货'; | ||
164 | - } | ||
165 | -}); | 169 | +let fellowInfo = $fellowBar.data() || {}; |
170 | + | ||
171 | +if (+fellowInfo.type === 2) { | ||
172 | + $fellowBar.on('click', '.js-fellow', function() { | ||
173 | + if (fellowInfo.link) { | ||
174 | + window.location.href = fellowInfo.link; | ||
175 | + } | ||
176 | + }); | ||
177 | +} else { | ||
178 | + let clipboardFellow = new Clipboard('.js-fellow', { | ||
179 | + text: function() { | ||
180 | + return fellowInfo.copy || '潮流有货'; | ||
181 | + } | ||
182 | + }); | ||
183 | + | ||
184 | + clipboardFellow.on('success', function(e) { | ||
185 | + fellow(fellowInfo.tip); | ||
186 | + e.clearSelection(); | ||
187 | + }); | ||
188 | +} | ||
166 | 189 | ||
167 | -clipboardFellow.on('success', function(e) { | ||
168 | - fellow(); | ||
169 | - e.clearSelection(); | ||
170 | -}); | ||
171 | 190 | ||
172 | (function() { | 191 | (function() { |
173 | let lotteryInfo = $('.js-lottery').data('lottery'); | 192 | let lotteryInfo = $('.js-lottery').data('lottery'); |
@@ -357,10 +357,11 @@ $tabpanel | @@ -357,10 +357,11 @@ $tabpanel | ||
357 | 357 | ||
358 | return false; | 358 | return false; |
359 | }) | 359 | }) |
360 | - .on('click', '.js-share', function() { | ||
361 | - share($(this)); | ||
362 | - return false; | ||
363 | - }) | 360 | + |
361 | + // .on('click', '.js-share', function() { // 产品要求鱼小程序一致,跳转至小程序分享 | ||
362 | + // share($(this)); | ||
363 | + // return false; | ||
364 | + // }) | ||
364 | .on('click', '.js-fellow', function() { | 365 | .on('click', '.js-fellow', function() { |
365 | fellow($(this).data('id')); | 366 | fellow($(this).data('id')); |
366 | return false; | 367 | return false; |
1 | 1 | ||
2 | .fellow-bar-comp { | 2 | .fellow-bar-comp { |
3 | + height: 66px; | ||
4 | + | ||
3 | .fellow-bar { | 5 | .fellow-bar { |
4 | display: flex; | 6 | display: flex; |
5 | justify-content: space-between; | 7 | justify-content: space-between; |
@@ -12,19 +14,32 @@ | @@ -12,19 +14,32 @@ | ||
12 | } | 14 | } |
13 | 15 | ||
14 | .title { | 16 | .title { |
17 | + max-width: 76%; | ||
15 | color: white; | 18 | color: white; |
16 | font-size: 20px; | 19 | font-size: 20px; |
17 | margin-bottom: 0 !important; | 20 | margin-bottom: 0 !important; |
21 | + text-overflow: -o-ellipsis-lastline; | ||
22 | + overflow: hidden; | ||
23 | + text-overflow: ellipsis; | ||
24 | + display: -webkit-box; | ||
25 | + -webkit-line-clamp: 2; | ||
26 | + line-clamp: 2; | ||
27 | + -webkit-box-orient: vertical; | ||
18 | } | 28 | } |
19 | 29 | ||
20 | .btn { | 30 | .btn { |
31 | + max-width: 160px; | ||
21 | display: inline-block; | 32 | display: inline-block; |
22 | color: white; | 33 | color: white; |
23 | - width: 100px; | 34 | + padding: 0 16px; |
24 | height: 40px; | 35 | height: 40px; |
25 | font-size: 24px; | 36 | font-size: 24px; |
26 | line-height: 40px; | 37 | line-height: 40px; |
27 | background-color: #d0021b; | 38 | background-color: #d0021b; |
28 | text-align: center; | 39 | text-align: center; |
40 | + overflow: hidden; | ||
41 | + text-overflow: ellipsis; | ||
42 | + white-space: nowrap; | ||
43 | + box-sizing: border-box; | ||
29 | } | 44 | } |
30 | } | 45 | } |
@@ -76,5 +76,40 @@ | @@ -76,5 +76,40 @@ | ||
76 | text-align: center; | 76 | text-align: center; |
77 | } | 77 | } |
78 | } | 78 | } |
79 | + | ||
80 | + .more-lottery { | ||
81 | + font-size: 22px; | ||
82 | + line-height: 60px; | ||
83 | + text-align: center; | ||
84 | + color: #555; | ||
85 | + display: none; | ||
86 | + | ||
87 | + &:before { | ||
88 | + content: ""; | ||
89 | + width: 100%; | ||
90 | + height: 40px; | ||
91 | + margin-top: -31px; | ||
92 | + background: url("img/activity/yoluck/lottery-more.png"); | ||
93 | + background-size: 100%; | ||
94 | + display: block; | ||
95 | + position: relative; | ||
96 | + z-index: -1; | ||
97 | + } | ||
98 | + | ||
99 | + a { | ||
100 | + display: block; | ||
101 | + width: 100%; | ||
102 | + } | ||
103 | + } | ||
104 | + | ||
105 | + &.more { | ||
106 | + .lottery:last-child { | ||
107 | + background-color: #eee; | ||
108 | + } | ||
109 | + | ||
110 | + .more-lottery { | ||
111 | + display: block; | ||
112 | + } | ||
113 | + } | ||
79 | } | 114 | } |
80 | } | 115 | } |
@@ -14,13 +14,14 @@ | @@ -14,13 +14,14 @@ | ||
14 | color: #444; | 14 | color: #444; |
15 | margin-left: 32px; | 15 | margin-left: 32px; |
16 | margin-right: 32px; | 16 | margin-right: 32px; |
17 | + text-align: left; | ||
17 | } | 18 | } |
18 | 19 | ||
19 | .product_lucky_bg { | 20 | .product_lucky_bg { |
20 | display: flex; | 21 | display: flex; |
21 | flex-direction: row; | 22 | flex-direction: row; |
22 | align-items: baseline; | 23 | align-items: baseline; |
23 | - justify-content: center; | 24 | + justify-content: space-between; |
24 | margin-left: 32px; | 25 | margin-left: 32px; |
25 | margin-right: 32px; | 26 | margin-right: 32px; |
26 | } | 27 | } |
-
Please register or login to post a comment