Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into feat/mip-ad-ecom-height
  • Loading branch information
Espoir-L committed Oct 15, 2018
2 parents 491269a + 0f52103 commit a9d7054
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 11 deletions.
20 changes: 12 additions & 8 deletions src/mip-story/mip-story-bookend.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,14 @@ define(function (require) {
data: ['_trackEvent', '小故事关闭按钮_分享页', '点击', window.location.href]
})
);
var recommendStats = encodeURIComponent(
JSON.stringify({
type: 'click',
data: ['_trackEvent', '更多推荐', '点击', window.location.href]
})
);
var recommendStats = function (url) {
return encodeURIComponent(
JSON.stringify({
type: 'click',
data: ['_trackEvent', '更多推荐', '点击', url]
})
);
};
var infoStats = encodeURIComponent(
JSON.stringify({
type: 'click',
Expand All @@ -111,7 +113,7 @@ define(function (require) {
var item = items[i];
innerTpl += ''
+ '<a ondragstart="return false;" ondrop="return false;" href="' + item.url
+ '" class="recommend-item" data-stats-baidu-obj="' + recommendStats + '">'
+ '" class="recommend-item" data-stats-baidu-obj="' + recommendStats(item.url) + '">'
+ '<div class="mip-backend-preview"> <mip-story-img src='
+ (item.cover || " ")
+ '></mip-story-img></div>'
Expand Down Expand Up @@ -144,7 +146,9 @@ define(function (require) {
+ historyTpl
+ shareTpl
+ '</mip-fixed>'
+ '<div class="mip-backend-outer "style="background-image: url(' + share.background + ')">'
+ '<div class="mip-backend-outer "style="">'
+ '<div class="mip-backend-background" style="background-image: url(' + share.background + ')">'
+ '</div>'
+ '<div class="recommend-item recommend-now">'
+ '<div class="mip-backend-preview"'
+ 'style="background-position:center;background-size:cover;background-image:url('
Expand Down
5 changes: 4 additions & 1 deletion src/mip-story/mip-story.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,10 @@ define(function (require) {
MIPStory.prototype.initPreload = function () {
var storyViewData = this.storyViews;
for (var i = 0; i <= preloadPages; i++) {
storyViewData[i].setAttribute('preload','')
if (!storyViewData[i]) {
return;
}
storyViewData[i].setAttribute('preload','');
}
};

Expand Down
44 changes: 42 additions & 2 deletions src/mip-story/mip-story.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ mip-story {
left: 0;
top: 0;
}
.mip-story-close {
display: none;
}
}
}

Expand Down Expand Up @@ -507,7 +510,7 @@ mip-story-layer[template=thirds] {
height: 100%;
text-align: center;
color: #fff;
background: rgba(0, 0, 0, .9);
background: #000;
}
.mip-backend[active] {
display: block!important;
Expand All @@ -530,6 +533,17 @@ mip-story-layer[template=thirds] {
&::-webkit-scrollbar {
display: none;
}
.mip-backend-background {
background-size: cover;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
-webkit-filter: blur(5px);
filter: blur(5px);
opacity: 0.3;
}
}

.mip-story-middle {
Expand Down Expand Up @@ -876,7 +890,7 @@ mip-story-layer[template=thirds] {
text-align: left;
border-top: 1px solid rgba(255, 255, 255, 0.3);
padding-top: 2px;
margin: 42px 17px 0 17px;
margin: 30px 17px 0 17px;

.readmore {
font-size: 18px;
Expand Down Expand Up @@ -993,3 +1007,29 @@ mip-story-layer[template=thirds] {
}
}
}

// 尾页字号
@media only screen and (min-width: 320px) {
.recommend-detail {
padding-right: 30px;
span {
font-size: 14px;
}
}
}
@media only screen and (min-width: 375px) {
.recommend-detail {
padding-right: 32px;
span {
font-size: 16px;
}
}
}
@media only screen and (min-width: 414px) {
.recommend-detail {
padding-right: 34px;
span {
font-size: 18px;
}
}
}

0 comments on commit a9d7054

Please sign in to comment.