Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
39bda914
Commit
39bda914
authored
Jun 15, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
好友邀请分页
parent
c87343ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
Member.php
application/api/controller/Member.php
+17
-5
No files found.
application/api/controller/Member.php
View file @
39bda914
...
...
@@ -399,19 +399,25 @@ class Member extends Basic
* @throws \think\exception\DbException
*/
public
function
inviteList
()
{
// $id = $this->params['id'];
// if (empty($id)) {
//$id = $this->params['id'];
//if (empty($id)) {
$id
=
$this
->
userId
;
// }
//$id = 5741;
//}
$data
[
'status'
]
=
101
;
$data
[
'data'
]
=
array
();
$data
[
'msg'
]
=
''
;
if
(
$id
)
{
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
$result
=
$this
->
user
->
field
(
'id,user_nick,user_phone,create_time'
)
->
where
(
'referrer_id'
,
$id
)
->
where
(
'status'
,
0
)
->
order
(
'create_time desc'
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
$data_arr
=
[];
foreach
(
$result
as
$k
=>
$v
)
{
...
...
@@ -420,8 +426,14 @@ class Member extends Basic
$data_arr
[
$k
][
'user_phone'
]
=
hide_customer_phone
(
$arr
[
'user_phone'
]);
$data_arr
[
$k
][
'create_time'
]
=
date
(
'Y-m-d'
,
strtotime
(
$arr
[
'create_time'
]));
}
$data
[
'data'
]
=
$data_arr
;
$data
[
'status'
]
=
200
;
$data
[
'data'
][
'list'
]
=
$data_arr
;
$data
[
'status'
]
=
200
;
$data
[
'data'
][
'total'
]
=
$this
->
user
->
field
(
'id,user_nick,user_phone,create_time'
)
->
where
(
'referrer_id'
,
$id
)
->
where
(
'status'
,
0
)
->
order
(
'create_time desc'
)
->
count
();
}
else
{
$data
[
'msg'
]
=
'id is null'
;
}
...
...
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