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
53f5d51b
Commit
53f5d51b
authored
Mar 02, 2018
by
zfc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编辑跟进
parent
92d0c9bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
1 deletion
+36
-1
Member.php
application/index/controller/Member.php
+34
-0
Users.php
application/model/Users.php
+1
-1
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Member.php
View file @
53f5d51b
...
@@ -16,10 +16,13 @@ use think\session;
...
@@ -16,10 +16,13 @@ use think\session;
*/
*/
class
Member
extends
Basic
{
class
Member
extends
Basic
{
protected
$user
;
protected
$user
;
protected
$code
=
200
;
protected
$msg
=
''
;
public
function
__construct
(
Request
$request
=
null
)
public
function
__construct
(
Request
$request
=
null
)
{
{
parent
::
__construct
(
$request
);
parent
::
__construct
(
$request
);
$this
->
user
=
new
Users
();
$this
->
user
=
new
Users
();
}
}
public
function
index
()
{
public
function
index
()
{
...
@@ -154,6 +157,37 @@ class Member extends Basic{
...
@@ -154,6 +157,37 @@ class Member extends Basic{
}
}
}
}
/**
* 查看或编辑客户
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
pcEditClient
()
{
$data
=
array
();
if
(
$this
->
params
[
'user_nick'
]
||
$this
->
params
[
'user_nick'
]
||
$this
->
params
[
'id'
])
{
if
(
$this
->
request
->
isPost
())
{
if
(
$this
->
params
[
'id'
])
{
//编辑
$data
[
'start'
]
=
$this
->
user
->
edit
(
$this
->
params
,
$this
->
params
[
'id'
]);
$this
->
operating_records
(
Session
::
get
(
"userinfo.id"
),
$type
=
3
,
$remark
=
'用户编辑'
,
0
,
$this
->
params
[
'id'
]);
}
}
else
{
$data
[
'list'
]
=
$this
->
user
->
getClient
(
$this
->
params
[
'id'
]);
}
}
else
{
$this
->
code
=
101
;
$this
->
msg
=
'user_nick or user_phone or id is null'
;
}
return
$this
->
response
(
$this
->
code
,
$this
->
msg
,
$data
);
}
/**
/**
* 删除用户
* 删除用户
* @return \think\Response
* @return \think\Response
...
...
application/model/Users.php
View file @
53f5d51b
...
@@ -143,7 +143,7 @@ class Users extends Model
...
@@ -143,7 +143,7 @@ class Users extends Model
*/
*/
public
function
getClient
(
$id
)
{
public
function
getClient
(
$id
)
{
if
(
$id
)
{
if
(
$id
)
{
$data
=
$this
->
field
(
'a.
user_nick,a.user_phone,a.sex,a.agent_id
,b.realname,b.phone'
)
$data
=
$this
->
field
(
'a.
id as user_id,a.user_nick,a.user_phone,a.sex,a.agent_id,a.create_time
,b.realname,b.phone'
)
->
alias
(
'a'
)
->
alias
(
'a'
)
->
join
(
'agents b'
,
'a.agent_id=b.id'
,
'left'
)
->
join
(
'agents b'
,
'a.agent_id=b.id'
,
'left'
)
->
where
(
'a.id'
,
$id
)
->
find
();
->
where
(
'a.id'
,
$id
)
->
find
();
...
...
application/route.php
View file @
53f5d51b
...
@@ -48,6 +48,7 @@ Route::group('index', [
...
@@ -48,6 +48,7 @@ Route::group('index', [
'user_add'
=>
[
'index/member/user_add'
,[
'method'
=>
'post'
]],
'user_add'
=>
[
'index/member/user_add'
,[
'method'
=>
'post'
]],
'del_user'
=>
[
'index/member/delUser'
,[
'method'
=>
'post'
]],
'del_user'
=>
[
'index/member/delUser'
,[
'method'
=>
'post'
]],
'pcAddFollow'
=>
[
'index/member/pcAddFollow'
,[
'method'
=>
'post'
]],
'pcAddFollow'
=>
[
'index/member/pcAddFollow'
,[
'method'
=>
'post'
]],
'pcEditClient'
=>
[
'index/member/pcEditClient'
,[
'method'
=>
'post | get'
]],
//transfer转铺列表
//transfer转铺列表
'transfer_list'
=>
[
'index/transfer/index'
,
[
'method'
=>
'get'
]],
'transfer_list'
=>
[
'index/transfer/index'
,
[
'method'
=>
'get'
]],
...
...
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