Toggle navigation
Toggle navigation
This project
Loading...
Sign in
wangshusheng
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
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
d1df1be042232293d841ade755f0047f1d1912ef
1 parent
0a176fb2
个人资料增加信息同步提示
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
5 deletions
library/LibModels/Web/Home/UserData.php
template/www.yohobuy.com/actions/home/user/user.phtml
yohobuy/www.yohobuy.com/application/modules/Home/controllers/User.php
library/LibModels/Web/Home/UserData.php
View file @
d1df1be
...
...
@@ -58,6 +58,22 @@ class UserData
}
/**
* 查询配置信息
*
* @param int $uid 用户ID
* @return array 用户配置接口返回的数据
*/
public
static
function
getTipConfig
(
$uid
)
{
$param
=
Yohobuy
::
param
();
$param
[
'method'
]
=
'app.resources.config.clientInitConfig'
;
$param
[
'uid'
]
=
$uid
;
$param
[
'client_secret'
]
=
Sign
::
getSign
(
$param
);
return
Yohobuy
::
post
(
Yohobuy
::
API_URL
,
$param
);
}
/**
* 修改个人详情数据
*
* @param array $params 需要修改的参数集合
...
...
template/www.yohobuy.com/actions/home/user/user.phtml
View file @
d1df1be
...
...
@@ -14,8 +14,11 @@
</div>
</div>
</div>
{
{#if
isShowTip
}
}
<p
class=
"help-us"
>
如果你还使用了我们的其他产品(Yoho!Now和mars)修改个人信息时将同步
</p>
{
{/if
}
}
{
{/
user
}
}
{
{>
home/help-us
}
}
</div>
{
{>
layout/footer
}
}
...
...
yohobuy/www.yohobuy.com/application/modules/Home/controllers/User.php
View file @
d1df1be
...
...
@@ -24,6 +24,8 @@ class UserController extends WebAction
$leftNav
=
UserModel
::
getCenterLeftNav
(
'编辑个人资料'
,
$uid
);
//用户信息-基础信息
$userInfo
=
UserModel
::
getUserInfo
(
$uid
);
//配置信息
$configInfo
=
UserData
::
getTipConfig
(
$uid
);
//联系信息
$userContactInfo
=
UserModel
::
getUserContactInfo
(
$uid
);
//习惯信息
...
...
@@ -35,6 +37,7 @@ class UserController extends WebAction
'path'
=>
$path
,
'homeNav'
=>
$leftNav
,
'userThumb'
=>
$userInfo
[
'headIco'
],
'isShowTip'
=>
intval
(
$configInfo
[
'data'
][
'config'
][
'sn'
]),
'userPersonalInfo'
=>
array
(
'subTitle'
=>
'会员信息'
,
'firstBox'
=>
true
,
...
...
@@ -49,13 +52,13 @@ class UserController extends WebAction
'labelText'
=>
'昵称:'
,
'value'
=>
$userInfo
[
'nickname'
],
'key'
=>
'nickname'
,
'tips'
=>
'
昵称必须大于2而小于20个字符
'
'tips'
=>
'
与Yoho!业务或商家品牌冲突的昵称,Yoho!将有可能收回
'
),
array
(
'labelText'
=>
'真实姓名:'
,
'value'
=>
$userInfo
[
'username'
],
'key'
=>
'username'
,
'tips'
=>
'
真实姓名至少2个中文,最多5个中文'
'tips'
=>
'
'
// 4.8去掉该提示
)
),
'gender'
=>
array
(
...
...
@@ -172,7 +175,6 @@ class UserController extends WebAction
'hotBrands'
=>
$userLikeBrandInfo
[
'hotBrands'
],
)
);
$this
->
_view
->
display
(
'user'
,
array
(
'user'
=>
$data
,
'meEditPage'
=>
true
...
...
Please
register
or
login
to post a comment