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
uedxwg
9 years ago
Commit
fc6f32089d0c93c1e0e588e40ed8dfb9606fc1e9
1 parent
93f1a713
update
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
16 deletions
library/Plugin/TemplateLayout.php
static/sass/me/_personal-details.scss
static/sass/product/_hot-rank.scss
template/m.yohobuy.com/actions/index/home/personal-details.phtml
yohobuy/m.yohobuy.com/application/controllers/Home.php
library/Plugin/TemplateLayout.php
View file @
fc6f320
...
...
@@ -155,7 +155,7 @@ class TemplateLayout implements View_Interface
$template
=
file_get_contents
(
$viewName
,
false
,
null
);
$phpStr
=
LightnCandy
::
compile
(
$template
,
array
(
// DEBUG: LightnCandy::FLAG_RENDER_DEBUG | LightnCandy::FLAG_ERROR_EXCEPTION
'flags'
=>
LightnCandy
::
FLAG_ERROR_EXCEPTION
|
LightnCandy
::
FLAG_MUSTACHE
|
LightnCandy
::
FLAG_HANDLEBARS
,
// 使用MUSTACHE和HANDLEBARS的模板格式
'flags'
=>
LightnCandy
::
FLAG_
RENDER_DEBUG
|
LightnCandy
::
FLAG_
ERROR_EXCEPTION
|
LightnCandy
::
FLAG_MUSTACHE
|
LightnCandy
::
FLAG_HANDLEBARS
,
// 使用MUSTACHE和HANDLEBARS的模板格式
'basedir'
=>
array
(
$config
->
template
->
partials
),
// 模板里使用 {{> partial_name}} 时查找的目录
'fileext'
=>
array
(
$tplExt
),
// 允许查找文件的后缀
'lcrun'
=>
'Plugin\LCRun3'
,
// 指定编译模板的runtime
...
...
static/sass/me/_personal-details.scss
View file @
fc6f320
...
...
@@ -30,9 +30,10 @@
.head-portrait
{
width
:
90rem
/
$pxConvertRem
;
height
:
90rem
/
$pxConvertRem
;
overflow
:
hidden
;
float
:
right
;
border-radius
:
50%
;
b
ackground
:
#000
;
b
order
:
1px
solid
#eee
;
}
.grade
{
width
:
85rem
/
$pxConvertRem
;
...
...
@@ -40,7 +41,6 @@
overflow
:
hidden
;
display
:
inline-block
;
margin-top
:
25rem
/
$pxConvertRem
;
@include
rem-sprite
(
$vip
,
vip-1
);
}
&
:last-of-type
{
color
:
#b0b0b0
;
...
...
static/sass/product/_hot-rank.scss
View file @
fc6f320
...
...
@@ -38,12 +38,12 @@
text-align
:
center
;
font-size
:
22rem
/
$pxConvertRem
;
color
:
#fff
;
background
:
image-url
(
"sale-icon/rank.png"
)
no-repeat
;
//
background: image-url("sale-icon/rank.png") no-repeat;
background-position
:
center
top
;
background-size
:
auto
100%
;
&
.top
{
background
:
image-url
(
"sale-icon/rank-t.png"
)
no-repeat
;
//
background: image-url("sale-icon/rank-t.png") no-repeat;
background-position
:
center
top
;
background-size
:
100%
;
line-height
:
58rem
/
$pxConvertRem
;
...
...
template/m.yohobuy.com/actions/index/home/personal-details.phtml
View file @
fc6f320
{
{>
layout/header
}
}
{
{
#personalDetails
}
}
<div
class=
"personal-details"
>
<ul>
<li><span>头像</span><span><i
class=
"head-portrait"
></i></span></li>
<li><span>昵称</span><span>
{
{
name
}
}</span></li>
<li><span>性别</span><span>
{
{
sex
}
}</span></li>
<li><span>生日</span><span>
{
{
time
}
}</span></li>
<li><span>会员等级</span><span><i
class=
"grade"
></i>></span></li>
</ul>
</div>
{
{
/personalDetails
}
}
<div
class=
"personal-details"
>
<ul>
<li><span>头像</span><span><i
class=
"head-portrait"
><img
src=
"{{ head_ico }}"
></i></span></li>
<li><span>昵称</span><span>
{
{
username
}
}</span></li>
<li><span>性别</span><span>
{
{
sex
}
}</span></li>
<li><span>生日</span><span>
{
{
birthday
}
}</span></li>
<li><span>会员等级</span><span><i
class=
"grade vip-icon"
></i></span></li>
</ul>
</div>
{
{>
layout/footer
}
}
\ No newline at end of file
...
...
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
fc6f320
...
...
@@ -103,6 +103,20 @@ class HomeController extends AbstractAction
$favBrands
=
\Index\UserModel
::
getFavBrandData
(
$uid
,
$gender
);
print_r
(
$favBrands
);
}
/**
* 个人信息
*/
public
function
personalDetailsAction
()
{
// $uid = $this->getUid();
$uid
=
967016
;
$data
=
\Index\UserModel
::
getUserProfileData
(
$uid
);
$this
->
_view
->
display
(
'personal-details'
,
$data
);
}
/**
...
...
@@ -115,6 +129,8 @@ class HomeController extends AbstractAction
$favBrands
=
\Index\UserModel
::
getYohoCoinData
(
$uid
);
print_r
(
$favBrands
);
$this
->
_view
->
display
(
'currency'
,
$favBrands
);
}
/**
...
...
Please
register
or
login
to post a comment