Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
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
2015-11-19 10:46:36 +0800
Commit
cb28ba1b0977717aaa936dd02bedc4d66f850688
1 parent
84821671
头像加载失败改成默认头像
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
2 deletions
static/img/me/index/user-avatar.png
static/js/me/index.js
static/js/me/personal-details.js
template/m.yohobuy.com/actions/index/home/personal-details.phtml
template/m.yohobuy.com/partials/layout/use.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
static/img/me/index/user-avatar.png
0 → 100644
View file @
cb28ba1
4.37 KB
static/js/me/index.js
View file @
cb28ba1
...
...
@@ -3,5 +3,10 @@
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/12
*/
var
$
=
require
(
'jquery'
);
require
(
'../product/recommend-for-you.js'
);
\ No newline at end of file
require
(
'../product/recommend-for-you.js'
);
$
(
'.user-avatar'
).
on
(
'error'
,
function
()
{
$
(
this
).
attr
(
'src'
,
'http://static.dev.yohobuy.com/img/me/index/user-avatar.png'
);
});
\ No newline at end of file
...
...
static/js/me/personal-details.js
0 → 100644
View file @
cb28ba1
/**
* 个人信息
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/11/19
*/
var
$
=
require
(
'jquery'
);
$
(
'.user-avatar'
).
on
(
'error'
,
function
()
{
$
(
this
).
attr
(
'src'
,
'http://static.dev.yohobuy.com/img/me/index/user-avatar.png'
);
});
\ No newline at end of file
...
...
template/m.yohobuy.com/actions/index/home/personal-details.phtml
View file @
cb28ba1
{
{>
layout/header
}
}
<div
class=
"personal-details"
>
<ul>
<li><span>头像</span><span><i
class=
"head-portrait"
><img
src=
"{{ head_ico }}"
></i></span></li>
<li><span>头像</span><span><i
class=
"head-portrait"
><img
class=
"user-avatar"
src=
"{{ head_ico }}"
></i></span></li>
<li><span>昵称</span><span>
{
{
username
}
}</span></li>
<li><span>性别</span><span>
{
{
gender
}
}</span></li>
<li><span>生日</span><span>
{
{
birthday
}
}</span></li>
...
...
template/m.yohobuy.com/partials/layout/use.phtml
View file @
cb28ba1
...
...
@@ -247,4 +247,9 @@
<script>
seajs.use('js/me/my-guang');
</script>
{{/if}}
{{#if personalDetailsPage}}
<script>
seajs.use('js/me/personal-details');
</script>
{{/if}}
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
cb28ba1
...
...
@@ -127,6 +127,7 @@ class HomeController extends AbstractAction
// $uid = $this->getUid();
$uid
=
967016
;
$data
=
\Index\UserModel
::
getUserProfileData
(
$uid
);
$data
[
'personalDetailsPage'
]
=
true
;
$data
[
'pageFooter'
]
=
true
;
$this
->
_view
->
display
(
'personal-details'
,
$data
);
}
...
...
Please
register
or
login
to post a comment