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
8 years ago
Commit
f58d60e940767566f818078c800ede57c589e76f
1 parent
a87d00e0
add css
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
6 deletions
apps/product/views/partial/product/activity-list.hbs
config/common.js
public/js/product/detail.page.js
public/scss/product/_detail.css
apps/product/views/partial/product/activity-list.hbs
View file @
f58d60e
...
...
@@ -2,7 +2,7 @@
<div
class=
"row activity-wrapper clearfix"
>
<span
class=
"title pull-left"
>
促
销:
</span>
{{#
if_cond
activity
.
length
'>
=
'
3
}}
{{#
if_cond
activity
.
length
'>'
3
}}
<div
class=
"activity-title"
>
展开全部促销
<span
class=
"iconfont index"
>

</span>
</div>
<div
class=
"activity-container"
></div>
{{/
if_cond
}}
...
...
config/common.js
View file @
f58d60e
...
...
@@ -24,8 +24,8 @@ module.exports = {
api
:
'http://api.yoho.cn/'
,
service
:
'http://service.yoho.cn/'
,
// api: 'http://dev-api.yohops.com:9999/',
// service: 'http://dev-service.yohops.com:9999/',
//api: 'http://dev-api.yohops.com:9999/',
//service: 'http://dev-service.yohops.com:9999/',
search
:
'http://192.168.102.216:8080/yohosearch/'
},
...
...
public/js/product/detail.page.js
View file @
f58d60e
...
...
@@ -222,6 +222,32 @@ bindEvent.add(function() {
move
(
e
);
});
//促销弹出框
var
icon
=
{
unfold
:
''
,
fold
:
''
};
$
(
'.activity-title'
).
click
(
function
()
{
$
(
this
).
toggleClass
(
'active'
);
$
(
'.activity-container'
).
empty
();
if
(
$
(
this
).
hasClass
(
'active'
))
{
$
(
this
).
find
(
'span'
).
html
(
icon
.
fold
);
if
(
!
$
(
'.activity-container'
).
html
())
{
$
(
'.activity-container'
).
append
(
$
(
'.activity'
).
clone
().
find
(
'li'
).
each
(
function
()
{
$
(
this
).
removeClass
(
'hide'
);
}).
end
());
}
$
(
'.activity-container'
).
slideDown
(
400
);
}
else
{
$
(
this
).
find
(
'span'
).
html
(
icon
.
unfold
);
$
(
'.activity-container'
).
slideUp
(
400
);
}
});
function
getCouponAsync
(
cid
)
{
var
uid
=
getUid
();
// eslint-disable-line
...
...
public/scss/product/_detail.css
View file @
f58d60e
...
...
@@ -337,10 +337,11 @@
.activity-container
{
position
:
absolute
;
width
:
100%
;
height
:
10px
;
background
:
#b3b3b3
;
left
:
72px
;
width
:
calc
(
585px
-
72px
);
background
:
#f5f5f5
;
z-index
:
5
;
display
:
none
;
}
}
...
...
Please
register
or
login
to post a comment