Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
xiaozhan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
xiaozhan
Commits
96164233
Commit
96164233
authored
Feb 14, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
族员审核列表
parent
50c1e10b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
5 deletions
+23
-5
api/Appapi/Model/User.php
+23
-5
No files found.
api/Appapi/Model/User.php
View file @
96164233
...
@@ -38,8 +38,8 @@ class Model_User extends PhalApi_Model_NotORM
...
@@ -38,8 +38,8 @@ class Model_User extends PhalApi_Model_NotORM
}
}
$info
[
'anchor_certification'
]
=
$anchor_certification
;
$info
[
'anchor_certification'
]
=
$anchor_certification
;
list
(
$type
,
$familyId
)
=
$this
->
getFamilyRole
(
$uid
);
$info
[
'family_type'
]
=
$t
his
->
getFamilyRole
(
$uid
)
;
$info
[
'family_type'
]
=
$t
ype
;
}
}
return
$info
;
return
$info
;
...
@@ -47,16 +47,19 @@ class Model_User extends PhalApi_Model_NotORM
...
@@ -47,16 +47,19 @@ class Model_User extends PhalApi_Model_NotORM
protected
function
getFamilyRole
(
$uid
)
protected
function
getFamilyRole
(
$uid
)
{
{
$type
=
0
;
$
id
=
$
type
=
0
;
$familyinfo
=
DI
()
->
notorm
->
family
->
where
(
"uid="
.
$uid
)
->
fetchOne
();
$familyinfo
=
DI
()
->
notorm
->
family
->
where
(
"uid="
.
$uid
)
->
fetchOne
();
$user_family
=
DI
()
->
notorm
->
users_family
->
where
(
"uid="
.
$uid
)
->
fetchOne
();
$user_family
=
DI
()
->
notorm
->
users_family
->
where
(
"uid="
.
$uid
)
->
fetchOne
();
if
(
!
empty
(
$familyinfo
))
{
if
(
!
empty
(
$familyinfo
))
{
$type
=
1
;
$type
=
1
;
$id
=
$familyinfo
[
'id'
];
}
}
if
(
!
empty
(
$user_family
))
{
if
(
!
empty
(
$user_family
))
{
$type
=
$user_family
[
'role'
]
?
2
:
3
;
$type
=
$user_family
[
'role'
]
?
2
:
3
;
$id
=
$user_family
[
'familyid'
];
}
}
return
$type
;
return
[
$type
,
$id
];
}
}
/* 判断昵称是否重复 */
/* 判断昵称是否重复 */
...
@@ -982,10 +985,25 @@ class Model_User extends PhalApi_Model_NotORM
...
@@ -982,10 +985,25 @@ class Model_User extends PhalApi_Model_NotORM
public
function
familyAuthList
(
$uid
)
public
function
familyAuthList
(
$uid
)
{
{
$role
=
$this
->
getFamilyRole
(
$uid
);
list
(
$role
,
$familyId
)
=
$this
->
getFamilyRole
(
$uid
);
if
(
in_array
(
$role
,
[
0
,
3
]))
{
if
(
in_array
(
$role
,
[
0
,
3
]))
{
return
$role
;
return
$role
;
}
}
$list
=
DI
()
->
notorm
->
users_family
->
select
(
'id, uid'
)
->
where
(
"familyid=
{
$familyId
}
and state=0"
)
->
fetchAll
();
foreach
(
$list
as
$k
=>
$v
){
$userinfo
=
getUserInfo
(
$v
[
'uid'
]);
$v
[
'user_nicename'
]
=
$userinfo
[
'user_nicename'
];
$v
[
'avatar'
]
=
$userinfo
[
'avatar'
];
$v
[
'avatar_thumb'
]
=
$userinfo
[
'avatar_thumb'
];
$v
[
'sex'
]
=
$userinfo
[
'sex'
];
$v
[
'level'
]
=
$userinfo
[
'level'
];
$v
[
'level_anchor'
]
=
$userinfo
[
'level_anchor'
];
$list
[
$k
]
=
$v
;
}
return
[];
return
[];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment