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
Email Patches
Plain Diff
Browse Files
Authored by
王水玲
9 years ago
Commit
11d5dc73c30ba1b29b4cdc341e8a81c70b417890
1 parent
e13767cf
星潮教室
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
24 deletions
apps/guang/controllers/star.js
apps/guang/views/action/star/index-html.hbs
public/js/guang/collocation.page.js
public/js/guang/list-common.js
public/js/guang/star.page.js
public/scss/guang/star/_star.css
public/scss/layout/_loading.css
apps/guang/controllers/star.js
View file @
11d5dc7
...
...
@@ -105,7 +105,7 @@ exports.collocation = (req, res) => {
isStarDetailPage
:
true
,
page
:
'collocation'
},
processPublicData
(
req
,
'星潮教室'
),
{
headTab
:
h
eadTab
headTab
:
pageH
eadTab
}));
};
...
...
@@ -138,12 +138,20 @@ exports.collocationList = (req, res) => {
exports
.
setFavorite
=
(
req
,
res
)
=>
{
let
params
=
req
.
body
;
let
uid
=
req
.
user
.
uid
||
0
;
let
isApp
=
req
.
query
.
appVersion
||
false
;
let
url
=
'/guang/star/collocation'
;
let
urlEncode
=
''
;
starModel
.
setFavorite
(
params
,
uid
).
then
((
result
)
=>
{
if
(
result
.
code
===
401
)
{
result
.
data
=
helpers
.
urlFormat
(
'/signin.html'
,
{
refer
:
req
.
get
(
'Referer'
)
||
'/guang/star/collocation'
});
if
(
!
isApp
)
{
result
.
data
=
helpers
.
urlFormat
(
'/signin.html'
,
{
refer
:
req
.
get
(
'Referer'
)
||
url
});
}
else
{
urlEncode
=
'\\/guang\\/star\\/collocation'
;
result
.
data
=
`
$
{
url
}?
openby
:
yohobuy
=
{
"action"
:
"go.weblogin"
,
"params"
:{
"jumpurl"
:{
"url"
:
"${urlEncode}"
,
"param"
:{
"from"
:
"app"
}},
"requesturl"
:{
"url"
:
""
,
"param"
:{}},
"priority"
:
"N"
}}
`
;
// eslint-disable-line
}
}
res
.
json
(
result
);
});
...
...
@@ -176,7 +184,7 @@ exports.detailList = (req, res) => {
layout
:
false
,
params
:
params
,
list
:
result
,
isApp
:
req
.
query
.
app
_v
ersion
||
false
isApp
:
req
.
query
.
app
V
ersion
||
false
}));
});
};
...
...
apps/guang/views/action/star/index-html.hbs
View file @
11d5dc7
...
...
@@ -36,7 +36,7 @@
{{#
each
tags
}}
<li
class=
"swiper-slide"
>
<a
href=
"
{{
avatarUrl
}}
"
>
<
img
data-avatar=
"
{{
image
cover
100
100
}}
"
class=
"rank-avatar"
/
>
<
div
data-avatar=
"
{{
image
cover
100
100
}}
"
class=
"rank-avatar"
></div
>
<p
class=
"name"
>
{{
tagName
}}
</p>
</a>
</li>
...
...
@@ -46,7 +46,7 @@
{{else}}
{{#
tags
}}
<a
href=
"
{{
avatarUrl
}}
"
>
<
img
data-avatar=
"
{{
image
cover
100
100
}}
"
class=
"rank-avatar"
/
>
<
div
data-avatar=
"
{{
image
cover
100
100
}}
"
class=
"rank-avatar"
></div
>
<p
class=
"name"
>
{{
tagName
}}
</p>
</a>
{{/
tags
}}
...
...
public/js/guang/collocation.page.js
View file @
11d5dc7
...
...
@@ -49,7 +49,7 @@ function massageAJAX(pageData) {
$cont
[
0
].
mlellipsis
(
2
);
});
loading
.
hideLoadingMask
();
//
loading.hideLoadingMask();
lazyLoad
(
$
(
'img.lazy'
));
},
error
:
function
()
{
...
...
public/js/guang/list-common.js
View file @
11d5dc7
...
...
@@ -33,6 +33,8 @@ $(document).on('click', '.collection', function() {
success
:
function
(
data
)
{
var
code
=
data
.
code
;
console
.
log
(
data
);
if
(
code
===
200
)
{
if
(
$icon
.
hasClass
(
'collected'
))
{
$icon
.
removeClass
(
'collected'
);
...
...
@@ -48,7 +50,7 @@ $(document).on('click', '.collection', function() {
'<span class="collocation-link"></span></a>'
);
}
$
(
'.collocation-link'
).
click
();
//
$('.collocation-link').click();
}
},
error
:
function
()
{
...
...
public/js/guang/star.page.js
View file @
11d5dc7
...
...
@@ -53,7 +53,7 @@ function setAvatar($userAvatar) {
// 部分老用户没有头像,显示默认头像
avatar
=
$userAvatar
.
data
(
'avatar'
);
myImage
.
src
=
avatar
;
myImage
.
src
=
avatar
||
''
;
myImage
.
onload
=
function
()
{
$userAvatar
.
css
(
'background-image'
,
'url('
+
avatar
+
')'
);
};
...
...
@@ -147,9 +147,10 @@ function setIndexAction() {
$avatar0
.
hide
();
$avatar1
.
show
();
if
(
!
avatarSwiper
[
1
])
{
if
(
!
avatarSwiper
[
1
])
{
avatarSwiper
[
1
]
=
new
Swiper
(
'.avatar-1'
,
{
loop
:
true
,
// loopedSlides: bannerLen,
initialSlide
:
2
,
centeredSlides
:
true
,
...
...
@@ -269,6 +270,7 @@ function setIndexAction() {
if
(
bannerLen
>
1
)
{
avatarSwiper
[
0
]
=
new
Swiper
(
'.avatar-0'
,
{
loop
:
true
,
// loopedSlides: bannerLen,
initialSlide
:
2
,
centeredSlides
:
true
,
...
...
public/scss/guang/star/_star.css
View file @
11d5dc7
...
...
@@ -165,7 +165,7 @@
overflow
:
hidden
;
}
img
{
.rank-avatar
{
width
:
104px
;
height
:
104px
;
border-radius
:
50%
;
...
...
@@ -354,7 +354,6 @@
background-image
:
resolve
(
"guang/star/user-avatar.png"
);
background-repeat
:
no-repeat
;
background-size
:
contain
;
float
:
left
;
}
.avatar-1
{
...
...
public/scss/layout/_loading.css
View file @
11d5dc7
.loading-mask
{
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0.1
);
@keyframes
scale
{
0%
{
opacity
:
1
;
transform
:
scale
(
1
);
opacity
:
1
;
}
45
%
{
opacity
:
0.7
;
transform
:
scale
(
0.1
);
opacity
:
0.7
;
}
80
%
{
opacity
:
1
;
transform
:
scale
(
1
);
opacity
:
1
;
}
}
position
:
fixed
;
top
:
0
;
right
:
0
;
bottom
:
0
;
left
:
0
;
background
:
rgba
(
0
,
0
,
0
,
0
.1
);
.loading
{
position
:
absolute
;
...
...
@@ -35,12 +36,13 @@
$
init
:
0.12
;
@for
$i
from
1
to
3
{
$
init
:
(
$
i
+
1
)
*
0.12
;
&:nth-child($i)
{
animation
:
scale
0.75s
$
(
init
)
s
infinite
cubic-bezier
(
0.2
,
0.68
,
0.18
,
1.08
);
}
$
init
:
calc
((
$
i
+
1
)
*
0
.12
);
}
display
:
inline-block
;
margin
:
4px
;
width
:
30px
;
...
...
Please
register
or
login
to post a comment