Authored by shuaiguo

Merge branch 'hotfix/magazine-style'

... ... @@ -4,15 +4,27 @@ class detailModel extends global.yoho.BaseModel {
super(ctx);
}
getMagazineInfo(params) {
return this.get({data: {
const infoPromise = this.get({data: {
method: 'app.eBook.queryEBookByEId',
e_id: params[0]
}}).then((data) => {
if (data.code === 200) {
return data.data || {};
}
}});
const buyInfoPromise = this.get({data: {
method: 'app.eBook.querySubscriberInfo',
e_id: params[0]
}});
return Promise.all([infoPromise, buyInfoPromise]).then((infos)=> {
const [bookInfo, buyInfo] = infos;
let data = {};
return {};
if (bookInfo && bookInfo.code === 200) {
data = bookInfo.data;
data.subcribeCount = 0;
if (buyInfo && buyInfo.code === 200) {
data.subcribeCount = buyInfo.data.total;
}
}
return data;
});
}
}
... ...
... ... @@ -16,9 +16,12 @@
<p class="m-time">{{bookNumber}}</p>
<p class="m-title">{{title}}</p>
<div class="m-order to-download">查看阅读
<div class="magazine-info">
<div class="m-order to-download">如何订阅
<i class="iconfont">&#xe614;</i>
</div>
<div class="m-buy-info">已有{{subcribeCount}}本订阅</div>
</div>
<button class="buy-magazine-now" data-sku="{{sku}}" data-buy="{{buyFlag}}">立即购买</button>
</div>
... ...
... ... @@ -168,7 +168,7 @@ router.get('/passport/sms_login',
login.common.wechatQuickLoginCheck,
validateCode.load,
smsLogin.smsLoginPage); // 短信验证码登录
router.post('/passport/sms_login/step1_check', validateCode.check, smsLogin.indexCheck);
router.post('/passport/sms_login/step1_check', smsLogin.indexCheck);
router.get('/passport/sms_login/step1_check', (req, res, next) => {
if (!req.query.callback) {
return res.json({code: 400});
... ...
{
"name": "yohobuywap-node",
"version": "6.13.7",
"version": "6.13.8",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...
... ... @@ -127,10 +127,11 @@ new DragableElm($('.magazine-detail-container'));
$('.to-download').on('click', function() {
dialog.showDialog({
dialogText: '请在微信搜索并关注“YOHO潮流志”公众号,或者下载Yoho!Buy有货APP,阅读电子刊',
dialogText: '请在微信搜索并关注“YOHO潮流志”公众号,阅读电子刊',
hasFooter: {
leftBtnText: '取消',
rightBtnText: '确定'
centerBtnText: '确定',
// rightBtnText: '确定'
}
}, function() {
window.location.href = downloadPage;
... ...
... ... @@ -219,30 +219,31 @@ class SmsLoginNew extends Page {
return;
}
validate.getResults().then(result => {
// validate.getResults().then(result => {
let params = {
area: areaCode.replace('+', ''),
mobile: phone
};
$.extend(params, result);
// $.extend(params, result);
this.ajax({
method: 'POST',
url: '/passport/sms_login/step1_check',
data: params
}).then(data => {
validate.type === 2 && validate.refresh();
// validate.type === 2 && validate.refresh();
if (data.code === 200) {
checkPoint('YB_MOBILE_NEXT_C'); // 埋点
this.countDown();
} else {
(data.changeCaptcha && validate.type !== 2) && validate.refresh();
// (data.changeCaptcha && validate.type !== 2) && validate.refresh();
tip.show(data.message);
}
}).catch(() => {
validate.refresh();
});
// validate.refresh();
});
// });
}
/**
... ...
... ... @@ -3,6 +3,8 @@
html,
body {
height: 100%;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
.main-wrap {
... ... @@ -33,12 +35,12 @@ body {
}
.swiper-slide {
display: flex;
// align-items: center;
justify-content: center;
position: relative;
box-sizing: border-box;
// padding-bottom: 134px;
// display: flex;
// // align-items: center;
// justify-content: center;
// position: relative;
// box-sizing: border-box;
// // padding-bottom: 134px;
overflow: hidden;
.filter-bg {
... ... @@ -89,6 +91,14 @@ body {
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%,);
}
.magazine-info {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 40px;
padding-right: 2px;
}
.magazine-info-block {
width: 100%;
height: 0;
... ... @@ -114,17 +124,26 @@ body {
overflow: hidden;
}
.m-buy-info {
color: #fff;
font-size: 24px;
font-weight: bold;
}
.m-order {
margin-bottom: 40px;
color: #fff;
display: flex;
align-items: center;
font-weight: bold;
&:before {
content: "";
width: 26px;
height: 21px;
width: 28px;
height: 28px;
margin-right: 10px;
background-image: url("img/magazine/crown.png");
background-image: url("img/magazine/help-tip@2x.png");
background-size: 100% 100%;
background-repeat: no-repeat;
display: inline-block;
}
}
... ...