Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
shuaiguo
5 years ago
Commit
a8f8d4beaec752a949503e95e7c541ac93cb8436
2 parents
21d7b5ab
69f36995
Merge branch 'hotfix/magazine-style'
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
31 deletions
apps/magazine/models/detail.js
apps/magazine/views/action/cover/index.hbs
apps/passport/router.js
package.json
public/img/magazine/help-tip@2x.png
public/js/magazine/detail.page.js
public/js/passport/smslogin/sms-login-new.js
public/scss/magazine/detail.page.scss
apps/magazine/models/detail.js
View file @
a8f8d4b
...
...
@@ -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
{};
return
Promise
.
all
([
infoPromise
,
buyInfoPromise
]).
then
((
infos
)
=>
{
const
[
bookInfo
,
buyInfo
]
=
infos
;
let
data
=
{};
if
(
bookInfo
&&
bookInfo
.
code
===
200
)
{
data
=
bookInfo
.
data
;
data
.
subcribeCount
=
0
;
if
(
buyInfo
&&
buyInfo
.
code
===
200
)
{
data
.
subcribeCount
=
buyInfo
.
data
.
total
;
}
}
return
data
;
});
}
}
...
...
apps/magazine/views/action/cover/index.hbs
View file @
a8f8d4b
...
...
@@ -15,11 +15,14 @@
<div
class=
"magazine-info-block"
>
<p
class=
"m-time"
>
{{
bookNumber
}}
</p>
<p
class=
"m-title"
>
{{
title
}}
</p>
<div
class=
"m-order to-download"
>
查看阅读
<i
class=
"iconfont"
>

</i>
<div
class=
"magazine-info"
>
<div
class=
"m-order to-download"
>
如何订阅
<i
class=
"iconfont"
>

</i>
</div>
<div
class=
"m-buy-info"
>
已有
{{
subcribeCount
}}
本订阅
</div>
</div>
<button
class=
"buy-magazine-now"
data-sku=
"
{{
sku
}}
"
data-buy=
"
{{
buyFlag
}}
"
>
立即购买
</button>
</div>
</div>
...
...
apps/passport/router.js
View file @
a8f8d4b
...
...
@@ -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
});
...
...
package.json
View file @
a8f8d4b
{
"name"
:
"yohobuywap-node"
,
"version"
:
"6.13.
7
"
,
"version"
:
"6.13.
8
"
,
"private"
:
true
,
"description"
:
"A New Yohobuy Project With Express"
,
"repository"
:
{
...
...
public/img/magazine/help-tip@2x.png
0 → 100644
View file @
a8f8d4b
669 Bytes
public/js/magazine/detail.page.js
View file @
a8f8d4b
...
...
@@ -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
;
...
...
public/js/passport/smslogin/sms-login-new.js
View file @
a8f8d4b
...
...
@@ -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();
});
});
// });
}
/**
...
...
public/scss/magazine/detail.page.scss
View file @
a8f8d4b
...
...
@@ -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
;
}
}
...
...
Please
register
or
login
to post a comment