Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
htoooth
7 years ago
Commit
2d901dc3c77322c1c5be03a69f58e3f1d97e2015
1 parent
516b86ca
h5 login
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
12 deletions
apps/channel/models/index.js
apps/guang/models/guang-service.js
apps/passport/models/login-service.js
public/scss/guang/_base.css
apps/channel/models/index.js
View file @
2d901dc
...
...
@@ -192,7 +192,8 @@ module.exports = class extends global.yoho.BaseModel {
let
items
=
[],
brandLogos
=
[],
i
=
0
,
fillNum
=
0
;
fillNum
=
0
,
isSwitch
=
true
;
// 品牌数据
_
.
forEach
(
args
,
(
floorData
)
=>
{
...
...
@@ -202,14 +203,21 @@ module.exports = class extends global.yoho.BaseModel {
});
});
// 不是每页显示个数的倍数,填充数据
if
(
items
.
length
%
showNum
!==
0
)
{
fillNum
=
showNum
-
(
items
.
length
%
showNum
);
for
(
i
=
0
;
i
<
fillNum
;
i
++
)
{
items
.
push
({
href
:
'javascript:;'
,
// eslint-disable-line
img
:
''
});
// 男首需要只有 17 条数据时,把上一页下一页隐藏
if
(
items
.
length
===
17
)
{
isSwitch
=
false
;
}
if
(
isSwitch
)
{
// 不是每页显示个数的倍数,填充数据
if
(
items
.
length
%
showNum
!==
0
)
{
fillNum
=
showNum
-
(
items
.
length
%
showNum
);
for
(
i
=
0
;
i
<
fillNum
;
i
++
)
{
items
.
push
({
href
:
'javascript:;'
,
// eslint-disable-line
img
:
''
});
}
}
}
...
...
@@ -225,7 +233,7 @@ module.exports = class extends global.yoho.BaseModel {
if
(
i
%
showNum
===
5
||
i
===
5
)
{
// 插入切换按钮的位置
brandLogo
.
isSwitch
=
true
;
brandLogo
.
isSwitch
=
isSwitch
;
}
else
if
(
i
!==
0
&&
i
%
showNum
===
0
)
{
// 插入more的位置,more占的是下一页第一个brand的位置,所以page是i/17
...
...
apps/guang/models/guang-service.js
View file @
2d901dc
...
...
@@ -110,7 +110,7 @@ module.exports = class extends global.yoho.BaseModel {
if
(
Number
(
articleData
.
conver_image_type
)
===
2
)
{
width
=
360
;
height
=
2
40
;
height
=
2
24
;
isSquareImage
=
false
;
}
...
...
apps/passport/models/login-service.js
View file @
2d901dc
...
...
@@ -128,6 +128,7 @@ module.exports = class extends global.yoho.BaseModel {
req
.
session
.
LOGIN_UID_
=
uid
;
req
.
session
.
USER_MOBILE
=
data
.
mobile
;
req
.
session
.
SESSION_TYPE
=
config
.
app
;
req
.
session
.
SESSION_KEY
=
sessionKey
;
res
.
cookie
(
'_TOKEN'
,
publicToken
,
{
domain
:
config
.
cookieDomain
,
...
...
public/scss/guang/_base.css
View file @
2d901dc
...
...
@@ -159,7 +159,7 @@
img
{
display
:
block
;
width
:
360px
;
height
:
2
40
px
;
height
:
2
24
px
;
}
img
.square
{
...
...
Please
register
or
login
to post a comment