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
a42a64c0
Commit
a42a64c0
authored
Mar 02, 2018
by
zfc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc端客户列表修改
parent
136fa753
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
15 deletions
+27
-15
Member.php
application/index/controller/Member.php
+9
-2
Users.php
application/model/Users.php
+18
-13
No files found.
application/index/controller/Member.php
View file @
a42a64c0
...
@@ -24,7 +24,14 @@ class Member extends Basic{
...
@@ -24,7 +24,14 @@ class Member extends Basic{
public
function
index
()
{
public
function
index
()
{
return
view
(
'member/users_list'
);
return
view
(
'member/users_list'
);
}
}
/**
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getUserList
()
{
public
function
getUserList
()
{
$data
[
'status'
]
=
200
;
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
''
;
$data
[
'msg'
]
=
''
;
...
@@ -50,7 +57,7 @@ class Member extends Basic{
...
@@ -50,7 +57,7 @@ class Member extends Basic{
if
(
!
empty
(
$params
[
'id'
]))
{
if
(
!
empty
(
$params
[
'id'
]))
{
$where
[
'id'
]
=
$params
[
'id'
];
$where
[
'id'
]
=
$params
[
'id'
];
}
}
$fields
=
'id,user_nick,user_phone,
user_pic,create_time,user_pswd,referrer_id
'
;
$fields
=
'id,user_nick,user_phone,
sex,user_pic,create_time,user_pswd,referrer_id,status,source
'
;
$data
[
'list'
]
=
$this
->
user
->
getUserAgent
(
$pageNo
,
$pageSize
,
''
,
$fields
,
$where
);
$data
[
'list'
]
=
$this
->
user
->
getUserAgent
(
$pageNo
,
$pageSize
,
''
,
$fields
,
$where
);
$data
[
'total'
]
=
$this
->
user
->
getUserAgentTotal
(
$where
);
$data
[
'total'
]
=
$this
->
user
->
getUserAgentTotal
(
$where
);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
);
...
...
application/model/Users.php
View file @
a42a64c0
...
@@ -22,17 +22,20 @@ class Users extends Model
...
@@ -22,17 +22,20 @@ class Users extends Model
}
}
return
$data
;
return
$data
;
}
}
/**
/**
* 查询用户和经纪人
* 查询用户和经纪人
*
* @param int $pageNo
* @param type $pageNo
* @param int $pageSize
* @param type $pageSize
* @param string $order_
* @param type $order_
* @param string $fields
* @param type $fields
* @param string $params
* @param type $params
* @return mixed
* @return type
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
getUserAgent
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'a.id desc'
,
$fields
=
'*'
,
$params
=
''
)
{
public
function
getUserAgent
(
$pageNo
=
1
,
$pageSize
=
15
,
$order_
=
'a.id desc'
,
$fields
=
'*'
,
$params
=
''
)
{
$result
=
$this
->
field
(
$fields
)
$result
=
$this
->
field
(
$fields
)
->
where
(
$params
)
->
where
(
$params
)
...
@@ -42,13 +45,15 @@ class Users extends Model
...
@@ -42,13 +45,15 @@ class Users extends Model
->
select
();
->
select
();
$agents
=
new
Agents
();
$agents
=
new
Agents
();
foreach
(
$result
as
$k
=>
$v
)
{
foreach
(
$result
as
$k
=>
$v
)
{
$data
[
$k
]
=
$v
->
getData
();
$data
[
$k
]
=
$v
->
getData
();
if
(
$data
[
$k
][
'user_pic'
])
{
$data
[
$k
][
'follow_time'
]
=
Db
::
table
(
'u_phone_follow_up'
)
$data
[
$k
][
'user_pic'
]
=
CURRENT_URL
.
'static/head_portrait/'
.
$data
[
$k
][
'user_pic'
];
->
field
(
'create_time'
)
}
else
{
->
where
(
"user_id"
,
$data
[
$k
][
'id'
])
$data
[
$k
][
'user_pic'
]
=
''
;
->
order
(
'id desc'
)
}
->
value
(
'create_time'
);
$agent_data
=
$agents
->
field
(
'realname,phone'
)
->
where
(
'id'
,
$data
[
$k
][
'referrer_id'
])
->
find
();
$agent_data
=
$agents
->
field
(
'realname,phone'
)
->
where
(
'id'
,
$data
[
$k
][
'referrer_id'
])
->
find
();
$data
[
$k
][
'realname'
]
=
$agent_data
[
'realname'
];
$data
[
$k
][
'realname'
]
=
$agent_data
[
'realname'
];
$data
[
$k
][
'phone'
]
=
$agent_data
[
'phone'
];
$data
[
$k
][
'phone'
]
=
$agent_data
[
'phone'
];
...
...
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