Merge branch 'master' into feature/optimize20200528
* master: 还原滑块验证 feat(注册):删除 token验证 feat(注册页):删除潮流口令 feat(电子刊): 边界值判断 chore(*):移除滑块校验 feat(注册): 移除滑块校验 feat(电子刊): 去掉验证码&样式修改 feat(电子刊): 新增购买数量 feat(电子刊): 提示文案修改 chore(*): npm version fix(电子刊): 样式修改 fix(电子刊):样式修改
Showing
6 changed files
with
73 additions
and
22 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 | + }}); | ||
15 | + | ||
16 | + return Promise.all([infoPromise, buyInfoPromise]).then((infos)=> { | ||
17 | + const [bookInfo, buyInfo] = infos; | ||
18 | + let data = {}; | ||
14 | 19 | ||
15 | - return {}; | 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 | } |
@@ -11,18 +11,25 @@ | @@ -11,18 +11,25 @@ | ||
11 | {{/ bookPreviewPicBoList}} | 11 | {{/ bookPreviewPicBoList}} |
12 | </div> | 12 | </div> |
13 | <div class="swiper-pagination"></div> | 13 | <div class="swiper-pagination"></div> |
14 | + <div class="magazine-info-gradient"> | ||
14 | <div class="magazine-info-block"> | 15 | <div class="magazine-info-block"> |
15 | <p class="m-time">{{bookNumber}}</p> | 16 | <p class="m-time">{{bookNumber}}</p> |
16 | <p class="m-title">{{title}}</p> | 17 | <p class="m-title">{{title}}</p> |
17 | 18 | ||
18 | - <div class="m-order to-download">查看阅读 | 19 | + <div class="magazine-info"> |
20 | + <div class="m-order to-download">如何订阅 | ||
19 | <i class="iconfont"></i> | 21 | <i class="iconfont"></i> |
20 | </div> | 22 | </div> |
23 | + {{#if subcribeCount }} | ||
24 | + <div class="m-buy-info">已有{{subcribeCount}}本订阅</div> | ||
25 | + {{/if}} | ||
26 | + </div> | ||
21 | 27 | ||
22 | <button class="buy-magazine-now" data-sku="{{sku}}" data-buy="{{buyFlag}}">立即购买</button> | 28 | <button class="buy-magazine-now" data-sku="{{sku}}" data-buy="{{buyFlag}}">立即购买</button> |
23 | </div> | 29 | </div> |
24 | </div> | 30 | </div> |
25 | </div> | 31 | </div> |
32 | + </div> | ||
26 | 33 | ||
27 | <div class="magazine-detail-container"> | 34 | <div class="magazine-detail-container"> |
28 | <div class="touch-area"></div> | 35 | <div class="touch-area"></div> |
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: '请下载有货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; |
@@ -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,11 +35,12 @@ body { | @@ -33,11 +35,12 @@ body { | ||
33 | } | 35 | } |
34 | 36 | ||
35 | .swiper-slide { | 37 | .swiper-slide { |
36 | - display: flex; | ||
37 | - align-items: center; | ||
38 | - position: relative; | ||
39 | - box-sizing: border-box; | ||
40 | - 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; | ||
41 | overflow: hidden; | 44 | overflow: hidden; |
42 | 45 | ||
43 | .filter-bg { | 46 | .filter-bg { |
@@ -77,6 +80,25 @@ body { | @@ -77,6 +80,25 @@ body { | ||
77 | } | 80 | } |
78 | } | 81 | } |
79 | 82 | ||
83 | + .magazine-info-gradient { | ||
84 | + width: 100%; | ||
85 | + height: 60%; | ||
86 | + position: absolute; | ||
87 | + bottom: 0; | ||
88 | + left: 0; | ||
89 | + right: 0; | ||
90 | + z-index: 3; | ||
91 | + background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%,); | ||
92 | + } | ||
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 | + | ||
80 | .magazine-info-block { | 102 | .magazine-info-block { |
81 | width: 100%; | 103 | width: 100%; |
82 | height: 0; | 104 | height: 0; |
@@ -87,14 +109,14 @@ body { | @@ -87,14 +109,14 @@ body { | ||
87 | 109 | ||
88 | .m-time { | 110 | .m-time { |
89 | font-size: 24px; | 111 | font-size: 24px; |
90 | - color: #ddd; | 112 | + color: #fff; |
91 | line-height: 1.2; | 113 | line-height: 1.2; |
92 | } | 114 | } |
93 | 115 | ||
94 | .m-title { | 116 | .m-title { |
95 | height: 100px; | 117 | height: 100px; |
96 | margin: 10px 0 40px; | 118 | margin: 10px 0 40px; |
97 | - font-size: 40px; | 119 | + font-size: 36px; |
98 | color: #fff; | 120 | color: #fff; |
99 | letter-spacing: 1px; | 121 | letter-spacing: 1px; |
100 | font-weight: 500; | 122 | font-weight: 500; |
@@ -102,17 +124,26 @@ body { | @@ -102,17 +124,26 @@ body { | ||
102 | overflow: hidden; | 124 | overflow: hidden; |
103 | } | 125 | } |
104 | 126 | ||
127 | + .m-buy-info { | ||
128 | + color: #fff; | ||
129 | + font-size: 24px; | ||
130 | + font-weight: bold; | ||
131 | + } | ||
132 | + | ||
105 | .m-order { | 133 | .m-order { |
106 | - margin-bottom: 40px; | ||
107 | color: #fff; | 134 | color: #fff; |
135 | + display: flex; | ||
136 | + align-items: center; | ||
137 | + font-weight: bold; | ||
108 | 138 | ||
109 | &:before { | 139 | &:before { |
110 | content: ""; | 140 | content: ""; |
111 | - width: 26px; | ||
112 | - height: 21px; | 141 | + width: 28px; |
142 | + height: 28px; | ||
113 | margin-right: 10px; | 143 | margin-right: 10px; |
114 | - background-image: url("img/magazine/crown.png"); | 144 | + background-image: url("img/magazine/help-tip@2x.png"); |
115 | background-size: 100% 100%; | 145 | background-size: 100% 100%; |
146 | + background-repeat: no-repeat; | ||
116 | display: inline-block; | 147 | display: inline-block; |
117 | } | 148 | } |
118 | } | 149 | } |
-
Please register or login to post a comment