Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
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
ccbikai
9 years ago
Commit
e7170142f101853b96f86fb093494815838dc9c5
1 parent
09ca316d
个人中心点击背景变化
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletions
static/js/me/index.js
static/sass/me/_home.scss
static/js/me/index.js
View file @
e717014
...
...
@@ -4,7 +4,8 @@
* @date: 2015/11/12
*/
var
$
=
require
(
'jquery'
);
var
$userAvatar
=
$
(
'.user-avatar'
);
var
$userAvatar
=
$
(
'.user-avatar'
),
$listItem
=
$
(
'.list-item'
);
var
myImage
=
new
Image
();
require
(
'../product/recommend-for-you.js'
);
...
...
@@ -12,3 +13,10 @@ myImage.src = $userAvatar.attr('src');
myImage
.
onerror
=
function
()
{
$userAvatar
.
attr
(
'src'
,
'http://static.dev.yohobuy.com/img/me/index/user-avatar.png'
);
};
$
(
'.yoho-page'
).
on
(
'touchstart'
,
'.list-item, .type-item'
,
function
()
{
$listItem
.
removeClass
(
'highlight'
);
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
'.list-item, .type-item'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
...
...
static/sass/me/_home.scss
View file @
e717014
...
...
@@ -138,6 +138,10 @@
font-size
:
pxToRem
(
28px
);
line-height
:
1
.5
;
width
:
pxToRem
(
193px
);
&
.highlight
{
background
:
#eee
;
}
}
.iconfont
{
...
...
@@ -158,6 +162,11 @@
padding
:
0
pxToRem
(
30px
);
font-size
:
pxToRem
(
32px
);
line-height
:
pxToRem
(
88px
);
&
.highlight
{
background
:
#eee
;
}
&
:after
{
content
:
''
;
position
:
absolute
;
...
...
Please
register
or
login
to post a comment