Authored by yyq

notice

... ... @@ -237,7 +237,20 @@ class YoLuckService extends global.yoho.BaseModel {
participantCount = r1.limit;
}
result.product.notice = result.product.notice || '关注公众号“潮流有货”,发送“开奖”查看中奖结果';
let notice;
try {
notice = JSON.parse(result.product.notice);
} catch (e) {
console.log(e);
console.log(result.product.notice);
} // eslint-disable-line
result.product.notice = _.assign({
content: '关注公众号“潮流有货”,发送“开奖”查看中奖结果',
h5BtnName: '关注'
}, notice);
result.product.participantCount = this.formatN('000000', participantCount).split('');
result.actionStatus = this.setActionStatus(result.product);
result.resource = r3;
... ...
{{#result}}
{{#if product.status}}
{{#unless @root.isApp}}
<div class="fellow-bar-wrap">
{{> yoluck/fellow-bar}}
</div>
{{/unless}}
{{/if}}
<div class="header">
{{> yoluck/product-detail-header product=product avatars=avatars}}
</div>
... ... @@ -13,12 +21,6 @@
<div class="line"></div>
{{#if product.status}}
<div class="fellow-bar">
{{> yoluck/fellow-bar}}
</div>
{{/if}}
<div class="action-bar-wrap">
{{> yoluck/action-bar status=actionStatus num=myPrizeCount actPrizeId=actPrizeId lotteryInfo=product.lottery_info}}
</div>
... ...
<div class="fellow-bar-comp">
<div class="fellow-bar">
<div class="title">{{product.notice}}</div>
<div class="btn js-fellow">去关注</div>
<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}}'>
<div class="title">{{product.notice.content}}</div>
<div class="btn js-fellow">{{product.notice.h5BtnName}}</div>
</div>
</div>
... ...
... ... @@ -2,12 +2,17 @@
<div class="machine">
<img src="//img12.static.yhbimg.com/sns/2018/12/21/14/0231fa07f32886117eccea846e03f453a3.png">
<div class="lottery-block">
<div id="lottery-list" class="lottery-list">
<div id="lottery-list" class="lottery-list more">
<div class="lottery lottery-tpl">
<div class="l-thumb"></div>
<p class="l-title">我的<br>抽奖码</p>
<p class="l-code"></p>
</div>
<p class="more-lottery">
<a href="/activity/yoluck/index.html?type=3">
<span class="iconfont">&#xe64f;</span>
</a>
</p>
</div>
</div>
</div>
... ...
No preview for this file type
... ... @@ -20,13 +20,6 @@ Created by iconfont
/>
<missing-glyph />
<glyph glyph-name="x" unicode="x" horiz-adv-x="1001"
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
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
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" />
<glyph glyph-name="more" unicode="&#58886;" 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" />
... ... @@ -270,6 +263,9 @@ t9.5 -10.5t21.5 -4h37h67h81h80h64h36q23 0 34 12t2 38q-5 13 -9.5 30.5t-9.5 34.5q-
<glyph glyph-name="2" unicode="&#58957;" 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" />
<glyph glyph-name="more-down" unicode="&#58959;" 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" />
<glyph glyph-name="cuxiaobiaoqian" unicode="&#59061;" 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" />
... ...
No preview for this file type
No preview for this file type
... ... @@ -32,6 +32,7 @@ let store = {
targetVersion: '6.8.3',
};
let $fellowBar = $('#fellow-bar');
let $product = $('.product_name');
let name = $product.data('name');
let img = $product.data('img');
... ... @@ -52,7 +53,14 @@ new Swiper('.swiper-container', {
autoplay: 4000
});
function fellow() {
function fellow(content) {
if (content) {
$.yAlert({
content: `<div class="fellow-tip-content">${content}</div>` // eslint-disable-line
});
return;
}
$.yAlert({
content: `<div>公众号
<span style="font-weight: bolder">“潮流有货”</span>已经复制成功,</div>
... ... @@ -158,16 +166,27 @@ let luckAlert = {
}
};
let clipboardFellow = new Clipboard('.js-fellow', {
text: function() {
return '潮流有货';
}
});
let fellowInfo = $fellowBar.data() || {};
if (+fellowInfo.type === 2) {
$fellowBar.on('click', '.js-fellow', function() {
if (fellowInfo.link) {
window.location.href = fellowInfo.link;
}
});
} else {
let clipboardFellow = new Clipboard('.js-fellow', {
text: function() {
return fellowInfo.copy || '潮流有货';
}
});
clipboardFellow.on('success', function(e) {
fellow(fellowInfo.tip);
e.clearSelection();
});
}
clipboardFellow.on('success', function(e) {
fellow();
e.clearSelection();
});
(function() {
let lotteryInfo = $('.js-lottery').data('lottery');
... ...
... ... @@ -357,10 +357,11 @@ $tabpanel
return false;
})
.on('click', '.js-share', function() {
share($(this));
return false;
})
// .on('click', '.js-share', function() { // 产品要求鱼小程序一致,跳转至小程序分享
// share($(this));
// return false;
// })
.on('click', '.js-fellow', function() {
fellow($(this).data('id'));
return false;
... ...
.fellow-bar-comp {
height: 66px;
.fellow-bar {
display: flex;
justify-content: space-between;
... ... @@ -12,19 +14,32 @@
}
.title {
max-width: 76%;
color: white;
font-size: 20px;
margin-bottom: 0 !important;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.btn {
max-width: 160px;
display: inline-block;
color: white;
width: 100px;
padding: 0 16px;
height: 40px;
font-size: 24px;
line-height: 40px;
background-color: #d0021b;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
box-sizing: border-box;
}
}
... ...
... ... @@ -76,5 +76,40 @@
text-align: center;
}
}
.more-lottery {
font-size: 22px;
line-height: 60px;
text-align: center;
color: #555;
display: none;
&:before {
content: "";
width: 100%;
height: 40px;
margin-top: -31px;
background: url("img/activity/yoluck/lottery-more.png");
background-size: 100%;
display: block;
position: relative;
z-index: -1;
}
a {
display: block;
width: 100%;
}
}
&.more {
.lottery:last-child {
background-color: #eee;
}
.more-lottery {
display: block;
}
}
}
}
... ...
... ... @@ -14,13 +14,14 @@
color: #444;
margin-left: 32px;
margin-right: 32px;
text-align: left;
}
.product_lucky_bg {
display: flex;
flex-direction: row;
align-items: baseline;
justify-content: center;
justify-content: space-between;
margin-left: 32px;
margin-right: 32px;
}
... ...
... ... @@ -25,7 +25,6 @@
position: relative;
text-align: center;
overflow: hidden;
margin-top: 56px;
}
.help {
... ...