Merge branch 'hotfix/magazine-style'
Showing
8 changed files
with
67 additions
and
31 deletions
@@ -4,15 +4,27 @@ class detailModel extends global.yoho.BaseModel { | @@ -4,15 +4,27 @@ class detailModel extends global.yoho.BaseModel { | ||
4 | super(ctx); | 4 | super(ctx); |
5 | } | 5 | } |
6 | getMagazineInfo(params) { | 6 | getMagazineInfo(params) { |
7 | - return this.get({data: { | 7 | + const infoPromise = this.get({data: { |
8 | method: 'app.eBook.queryEBookByEId', | 8 | method: 'app.eBook.queryEBookByEId', |
9 | e_id: params[0] | 9 | e_id: params[0] |
10 | - }}).then((data) => { | ||
11 | - if (data.code === 200) { | ||
12 | - return data.data || {}; | ||
13 | - } | 10 | + }}); |
11 | + const buyInfoPromise = this.get({data: { | ||
12 | + method: 'app.eBook.querySubscriberInfo', | ||
13 | + e_id: params[0] | ||
14 | + }}); | ||
14 | 15 | ||
15 | - return {}; | 16 | + return Promise.all([infoPromise, buyInfoPromise]).then((infos)=> { |
17 | + const [bookInfo, buyInfo] = infos; | ||
18 | + let data = {}; | ||
19 | + | ||
20 | + if (bookInfo && bookInfo.code === 200) { | ||
21 | + data = bookInfo.data; | ||
22 | + data.subcribeCount = 0; | ||
23 | + if (buyInfo && buyInfo.code === 200) { | ||
24 | + data.subcribeCount = buyInfo.data.total; | ||
25 | + } | ||
26 | + } | ||
27 | + return data; | ||
16 | }); | 28 | }); |
17 | } | 29 | } |
18 | } | 30 | } |
@@ -15,11 +15,14 @@ | @@ -15,11 +15,14 @@ | ||
15 | <div class="magazine-info-block"> | 15 | <div class="magazine-info-block"> |
16 | <p class="m-time">{{bookNumber}}</p> | 16 | <p class="m-time">{{bookNumber}}</p> |
17 | <p class="m-title">{{title}}</p> | 17 | <p class="m-title">{{title}}</p> |
18 | - | ||
19 | - <div class="m-order to-download">查看阅读 | ||
20 | - <i class="iconfont"></i> | 18 | + |
19 | + <div class="magazine-info"> | ||
20 | + <div class="m-order to-download">如何订阅 | ||
21 | + <i class="iconfont"></i> | ||
22 | + </div> | ||
23 | + <div class="m-buy-info">已有{{subcribeCount}}本订阅</div> | ||
21 | </div> | 24 | </div> |
22 | - | 25 | + |
23 | <button class="buy-magazine-now" data-sku="{{sku}}" data-buy="{{buyFlag}}">立即购买</button> | 26 | <button class="buy-magazine-now" data-sku="{{sku}}" data-buy="{{buyFlag}}">立即购买</button> |
24 | </div> | 27 | </div> |
25 | </div> | 28 | </div> |
@@ -168,7 +168,7 @@ router.get('/passport/sms_login', | @@ -168,7 +168,7 @@ router.get('/passport/sms_login', | ||
168 | login.common.wechatQuickLoginCheck, | 168 | login.common.wechatQuickLoginCheck, |
169 | validateCode.load, | 169 | validateCode.load, |
170 | smsLogin.smsLoginPage); // 短信验证码登录 | 170 | smsLogin.smsLoginPage); // 短信验证码登录 |
171 | -router.post('/passport/sms_login/step1_check', validateCode.check, smsLogin.indexCheck); | 171 | +router.post('/passport/sms_login/step1_check', smsLogin.indexCheck); |
172 | router.get('/passport/sms_login/step1_check', (req, res, next) => { | 172 | router.get('/passport/sms_login/step1_check', (req, res, next) => { |
173 | if (!req.query.callback) { | 173 | if (!req.query.callback) { |
174 | return res.json({code: 400}); | 174 | return res.json({code: 400}); |
public/img/magazine/help-tip@2x.png
0 → 100644
669 Bytes
@@ -127,10 +127,11 @@ new DragableElm($('.magazine-detail-container')); | @@ -127,10 +127,11 @@ new DragableElm($('.magazine-detail-container')); | ||
127 | 127 | ||
128 | $('.to-download').on('click', function() { | 128 | $('.to-download').on('click', function() { |
129 | dialog.showDialog({ | 129 | dialog.showDialog({ |
130 | - dialogText: '请在微信搜索并关注“YOHO潮流志”公众号,或者下载Yoho!Buy有货APP,阅读电子刊', | 130 | + dialogText: '请在微信搜索并关注“YOHO潮流志”公众号,阅读电子刊', |
131 | hasFooter: { | 131 | hasFooter: { |
132 | - leftBtnText: '取消', | ||
133 | - rightBtnText: '确定' | 132 | + centerBtnText: '确定', |
133 | + | ||
134 | + // rightBtnText: '确定' | ||
134 | } | 135 | } |
135 | }, function() { | 136 | }, function() { |
136 | window.location.href = downloadPage; | 137 | window.location.href = downloadPage; |
@@ -219,30 +219,31 @@ class SmsLoginNew extends Page { | @@ -219,30 +219,31 @@ class SmsLoginNew extends Page { | ||
219 | return; | 219 | return; |
220 | } | 220 | } |
221 | 221 | ||
222 | - validate.getResults().then(result => { | 222 | + // validate.getResults().then(result => { |
223 | let params = { | 223 | let params = { |
224 | area: areaCode.replace('+', ''), | 224 | area: areaCode.replace('+', ''), |
225 | mobile: phone | 225 | mobile: phone |
226 | }; | 226 | }; |
227 | 227 | ||
228 | - $.extend(params, result); | 228 | + // $.extend(params, result); |
229 | this.ajax({ | 229 | this.ajax({ |
230 | method: 'POST', | 230 | method: 'POST', |
231 | url: '/passport/sms_login/step1_check', | 231 | url: '/passport/sms_login/step1_check', |
232 | data: params | 232 | data: params |
233 | }).then(data => { | 233 | }).then(data => { |
234 | - validate.type === 2 && validate.refresh(); | 234 | + // validate.type === 2 && validate.refresh(); |
235 | if (data.code === 200) { | 235 | if (data.code === 200) { |
236 | checkPoint('YB_MOBILE_NEXT_C'); // 埋点 | 236 | checkPoint('YB_MOBILE_NEXT_C'); // 埋点 |
237 | this.countDown(); | 237 | this.countDown(); |
238 | } else { | 238 | } else { |
239 | - (data.changeCaptcha && validate.type !== 2) && validate.refresh(); | 239 | + // (data.changeCaptcha && validate.type !== 2) && validate.refresh(); |
240 | tip.show(data.message); | 240 | tip.show(data.message); |
241 | } | 241 | } |
242 | }).catch(() => { | 242 | }).catch(() => { |
243 | - validate.refresh(); | 243 | + // validate.refresh(); |
244 | }); | 244 | }); |
245 | - }); | 245 | + |
246 | + // }); | ||
246 | } | 247 | } |
247 | 248 | ||
248 | /** | 249 | /** |
@@ -3,6 +3,8 @@ | @@ -3,6 +3,8 @@ | ||
3 | html, | 3 | html, |
4 | body { | 4 | body { |
5 | height: 100%; | 5 | height: 100%; |
6 | + padding-bottom: constant(safe-area-inset-bottom); | ||
7 | + padding-bottom: env(safe-area-inset-bottom); | ||
6 | } | 8 | } |
7 | 9 | ||
8 | .main-wrap { | 10 | .main-wrap { |
@@ -33,12 +35,12 @@ body { | @@ -33,12 +35,12 @@ body { | ||
33 | } | 35 | } |
34 | 36 | ||
35 | .swiper-slide { | 37 | .swiper-slide { |
36 | - display: flex; | ||
37 | - // align-items: center; | ||
38 | - justify-content: center; | ||
39 | - position: relative; | ||
40 | - box-sizing: border-box; | ||
41 | - // padding-bottom: 134px; | 38 | + // display: flex; |
39 | + // // align-items: center; | ||
40 | + // justify-content: center; | ||
41 | + // position: relative; | ||
42 | + // box-sizing: border-box; | ||
43 | + // // padding-bottom: 134px; | ||
42 | overflow: hidden; | 44 | overflow: hidden; |
43 | 45 | ||
44 | .filter-bg { | 46 | .filter-bg { |
@@ -89,6 +91,14 @@ body { | @@ -89,6 +91,14 @@ body { | ||
89 | background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%,); | 91 | background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%,); |
90 | } | 92 | } |
91 | 93 | ||
94 | + .magazine-info { | ||
95 | + display: flex; | ||
96 | + align-items: center; | ||
97 | + justify-content: space-between; | ||
98 | + margin-bottom: 40px; | ||
99 | + padding-right: 2px; | ||
100 | + } | ||
101 | + | ||
92 | .magazine-info-block { | 102 | .magazine-info-block { |
93 | width: 100%; | 103 | width: 100%; |
94 | height: 0; | 104 | height: 0; |
@@ -114,17 +124,26 @@ body { | @@ -114,17 +124,26 @@ body { | ||
114 | overflow: hidden; | 124 | overflow: hidden; |
115 | } | 125 | } |
116 | 126 | ||
127 | + .m-buy-info { | ||
128 | + color: #fff; | ||
129 | + font-size: 24px; | ||
130 | + font-weight: bold; | ||
131 | + } | ||
132 | + | ||
117 | .m-order { | 133 | .m-order { |
118 | - margin-bottom: 40px; | ||
119 | color: #fff; | 134 | color: #fff; |
135 | + display: flex; | ||
136 | + align-items: center; | ||
137 | + font-weight: bold; | ||
120 | 138 | ||
121 | &:before { | 139 | &:before { |
122 | content: ""; | 140 | content: ""; |
123 | - width: 26px; | ||
124 | - height: 21px; | 141 | + width: 28px; |
142 | + height: 28px; | ||
125 | margin-right: 10px; | 143 | margin-right: 10px; |
126 | - background-image: url("img/magazine/crown.png"); | 144 | + background-image: url("img/magazine/help-tip@2x.png"); |
127 | background-size: 100% 100%; | 145 | background-size: 100% 100%; |
146 | + background-repeat: no-repeat; | ||
128 | display: inline-block; | 147 | display: inline-block; |
129 | } | 148 | } |
130 | } | 149 | } |
-
Please register or login to post a comment