Authored by yyq

download review by wenxue

... ... @@ -8,7 +8,6 @@
<div class="info">
<p class="name">{{product_name}}</p>
<p class="time">{{sale_attr_desc.skc_attr}} {{sale_attr_desc.sku_attr}}</p>
</div>
</div>
{{/ goodsList}}
... ...
... ... @@ -4,7 +4,7 @@
<p class="status-tip">购买成功!</p>
<p class="download-tip">请下载有货APP查看阅读码和兑换/阅读电子刊。</p>
<a href="#" class="download-btn">
<a href="//union.yoho.cn/union/app-downloads.html?union_type=100000000000349" class="download-btn">
<span class="download-icon"></span>点击下载Yoho!Buy有货
</a>
</div>
... ...
... ... @@ -3,7 +3,6 @@ const detailModel = require('../models/detail'); // detail model
const headerModel = require('../../../doraemon/models/header'); // 头部model
const cover = (req, res, next) => {
console.log(req.params);
req.ctx(detailModel).getMagazineInfo(req.params).then(result => {
res.render('cover/index', {
pageHeader: headerModel.setNav({
... ...
... ... @@ -9,13 +9,7 @@ class detailModel extends global.yoho.BaseModel {
e_id: params[0]
}}).then((data) => {
if (data.code === 200) {
data = data.data || {};
if (data.coverPic && !data.coverPics) {
data.coverPics = [data.coverPic];
}
return data;
return data.data || {};
}
return {};
... ...
... ... @@ -3,18 +3,19 @@
<div class="magazine-cover-container">
<div class="swiper-container cover-block">
<div class="swiper-wrapper">
{{# coverPics}}
{{# eBookPreviewPicBoList}}
<div class="swiper-slide">
<img src="{{.}}" class="cover-img" alt="">
<div class="filter-bg" style="background-image: url('{{picUrl}}')"></div>
<img src="{{picUrl}}" class="cover-img" alt="">
</div>
{{/ coverPics}}
{{/ eBookPreviewPicBoList}}
</div>
<div class="swiper-pagination"></div>
<div class="magazine-info-block">
<p class="m-time">{{bookNumber}}</p>
<p class="m-title">{{title}}</p>
<div class="m-order">查看阅读
<div class="m-order to-download">查看阅读
<i class="iconfont">&#xe614;</i>
</div>
... ... @@ -26,7 +27,6 @@
<div class="magazine-detail-container">
<div class="touch-area"></div>
<div class="tab-wrap">
<label>评论</label>
<label>内容</label>
</div>
<div class="detail-container">
... ...
... ... @@ -3,6 +3,7 @@ require('scss/magazine/detail.page.scss');
let $ = require('yoho-jquery');
let get = require('lodash/get');
let Swiper = require('yoho-swiper');
let dialog = require('js/plugin/dialog');
new Swiper('.swiper-container', {
observer: true,
... ... @@ -16,7 +17,6 @@ new Swiper('.swiper-container', {
pagination: '.swiper-pagination',
});
function DragableElm(elm) {
if (!elm || !elm.length || elm._dragable) {
return;
... ... @@ -96,3 +96,15 @@ function DragableElm(elm) {
}
new DragableElm($('.magazine-detail-container'));
$('.to-download').on('click', function() {
dialog.showDialog({
dialogText: '请下载有货APP阅读电子刊',
hasFooter: {
leftBtnText: '取消',
rightBtnText: '确定'
}
}, function() {
window.location.href = '//union.yoho.cn/union/app-downloads.html?union_type=100000000000349';
});
});
... ...
... ... @@ -27,11 +27,30 @@ body {
height: 100%;
}
.cover-img {
width: 100%;
height: auto;
min-width: 100%;
min-height: 100%;
.swiper-slide {
display: flex;
align-items: center;
position: relative;
box-sizing: border-box;
padding-bottom: 134px;
.filter-bg {
filter: blur(20px);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: -1;
}
.cover-img {
width: 100%;
height: auto;
}
}
.swiper-pagination {
... ... @@ -135,9 +154,17 @@ body {
}
.tab-wrap {
height: 52px;
height: 44px;
line-height: 42px;
border-bottom: 2px solid #eee;
flex-shrink: 0;
label {
font-size: 24px;
color: #000;
font-weight: 500;
margin: 0 100px 0 34px;
}
}
.detail-container {
... ...