Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
Rock Zhang
9 years ago
Commit
961dd014d5c1859f7030bfef9763d6b4fbf6eb9e
1 parent
986945b7
修复数据为空会报错的bug
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
yohobuy/m.yohobuy.com/application/controllers/Home.php
yohobuy/m.yohobuy.com/application/models/Index/User.php
yohobuy/m.yohobuy.com/application/controllers/Home.php
View file @
961dd01
...
...
@@ -32,7 +32,7 @@ class HomeController extends AbstractAction
}
$action
=
$this
->
getRequest
()
->
getActionName
();
if
(
!
$this
->
_uid
&&
$action
!==
'index'
&&
$this
->
isAjax
())
{
if
(
!
$this
->
_uid
&&
$action
!==
'index'
&&
!
$this
->
isAjax
())
{
$this
->
go
(
Helpers
::
url
(
'/signin.html'
));
}
...
...
yohobuy/m.yohobuy.com/application/models/Index/User.php
View file @
961dd01
...
...
@@ -33,7 +33,7 @@ class UserModel
$userData
=
UserData
::
userData
(
$uid
);
// 处理个人详情数
if
(
!
isset
(
$userData
[
'code'
]))
{
if
(
$userData
&&
!
isset
(
$userData
[
'code'
]))
{
$result
=
$userData
;
$result
[
'gender'
]
=
$result
[
'gender'
]
==
1
?
'男'
:
'女'
;
$result
[
'head_ico'
]
=
$result
[
'head_ico'
]
?
Images
::
getImageUrl
(
$result
[
'head_ico'
],
128
,
128
)
:
''
;
...
...
@@ -103,7 +103,7 @@ class UserModel
}
// 有货币数量
$coinNum
=
UserData
::
yohoCoinData
(
$uid
);
if
(
!
isset
(
$coinNum
[
'code'
]))
{
if
(
$coinNum
&&
!
isset
(
$coinNum
[
'code'
]))
{
$result
[
'yoho_coin_num'
]
=
$coinNum
;
}
...
...
@@ -354,7 +354,7 @@ class UserModel
$address
=
UserData
::
addressData
(
$uid
);
// 处理地址数据
if
(
!
isset
(
$address
[
'code'
]))
{
if
(
$address
&&
!
isset
(
$address
[
'code'
]))
{
$result
=
$address
;
}
...
...
Please
register
or
login
to post a comment