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
40a5f5e9
Commit
40a5f5e9
authored
Jul 11, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除方法saveAgent
parent
16f0557a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
76 deletions
+2
-76
Broker.php
application/index/controller/Broker.php
+1
-75
route.php
application/route.php
+1
-1
No files found.
application/index/controller/Broker.php
View file @
40a5f5e9
...
...
@@ -468,84 +468,10 @@ class Broker extends Basic
/**
* 新增or修改or查看
* $group_id !=0为查看
* post存在id为新增
*
* @return \think\Response
*/
public
function
saveAgent
()
{
$m_agent
=
new
AAgents
();
$id
=
$this
->
params
[
'id'
];
if
(
$this
->
request
->
isPost
())
{
if
(
empty
(
$this
->
params
[
'store_id'
]))
{
return
$this
->
response
(
101
,
'门店id为空!'
);
}
if
(
empty
(
$this
->
params
[
'district_id'
]))
{
return
$this
->
response
(
101
,
'部门id为空!'
);
}
$num
=
0
;
//判断重复手机号
//新增或者编辑数据
if
(
empty
(
$this
->
params
[
'id'
]))
{
$num
=
$m_agent
->
getListDistrictTotal
([
'phone'
=>
$this
->
params
[
'phone'
]
]);
$data
[
'create_time'
]
=
date
(
'Y-m-d H:i:s'
,
time
());
$data
[
'update_time'
]
=
date
(
'Y-m-d H:i:s'
,
time
());
$id
=
0
;
$data
[
'password'
]
=
md5
(
substr
(
$this
->
params
[
'phone'
],
-
6
));
//默认号码后6位
$data
[
'auth_group_id'
]
=
5
;
}
else
{
$agent_data
=
$m_agent
->
verifyUser
(
'phone,password'
,
''
,
[
'id'
=>
$this
->
params
[
'id'
]
]);
if
(
$agent_data
[
'phone'
]
!=
$this
->
params
[
'phone'
])
{
$num
=
$m_agent
->
getListDistrictTotal
([
'phone'
=>
$this
->
params
[
'phone'
]
]);
}
$data
[
'update_time'
]
=
date
(
'Y-m-d H:i:s'
,
time
());
if
(
!
empty
(
$this
->
params
[
'password'
])
&&
!
empty
(
$agent_data
[
'password'
]))
{
$md5_password
=
md5
(
$this
->
params
[
'password'
]);
if
((
$md5_password
!=
$agent_data
[
'password'
])
&&
(
$agent_data
[
'password'
]
!=
$this
->
params
[
'password'
]))
{
$data
[
'password'
]
=
$md5_password
;
}
}
}
if
(
$num
>
0
)
{
return
$this
->
response
(
101
,
'手机号重复'
);
}
$data
[
'district_id'
]
=
$this
->
params
[
'district_id'
];
$data
[
'name'
]
=
trim
(
$this
->
params
[
'name'
]);
$data
[
'store_id'
]
=
$this
->
params
[
'store_id'
];
$data
[
'phone'
]
=
trim
(
$this
->
params
[
'phone'
]);
$data
[
'admin_off'
]
=
$this
->
params
[
'admin_off'
];
$data
[
'sex'
]
=
$this
->
params
[
'sex'
];
$data
[
'remarks'
]
=
$this
->
params
[
'remarks'
];
if
(
$m_agent
->
editData
(
$data
,
$id
))
{
return
$this
->
response
(
200
,
'成功'
);
}
else
{
return
$this
->
response
(
101
,
'无修改'
);
}
}
else
{
//查看
$info
=
$m_agent
->
verifyUser
(
'id,name,phone,password,district_id,store_id,sex,admin_off,remarks'
,
''
,
[
'id'
=>
$id
]);
return
$this
->
response
(
200
,
'查看'
,
$info
);
}
}
/**
* 新增or修改or查看
*
* @return \think\Response
*/
public
function
saveAgentV2
()
{
public
function
saveAgent
()
{
$result
[
'code'
]
=
200
;
$result
[
'msg'
]
=
""
;
$result
[
'data'
]
=
[];
...
...
application/route.php
View file @
40a5f5e9
...
...
@@ -168,7 +168,7 @@ Route::group('index', [
'agent'
=>
[
'index/broker/agent'
,
[
'method'
=>
'get'
]],
//首页列表界面
'saveAgentIndex'
=>
[
'index/broker/saveAgentIndex'
,
[
'method'
=>
'get'
]],
//编辑列表列表界面
'AgentList'
=>
[
'index/broker/AgentList'
,
[
'method'
=>
'get'
]],
//首页列表【接口】
'saveAgent'
=>
[
'index/broker/saveAgent
V2
'
,
[
'method'
=>
'get|post'
]],
//修改经纪人【接口】
'saveAgent'
=>
[
'index/broker/saveAgent'
,
[
'method'
=>
'get|post'
]],
//修改经纪人【接口】
'updatePhone'
=>
[
'index/broker/updatePhone'
,
[
'method'
=>
'post'
]],
//修改手机号
'updateStatus'
=>
[
'index/broker/updateStatusV2'
,
[
'method'
=>
'post'
]],
//状态修改【接口】
'updatePosition'
=>
[
'index/broker/updatePosition'
,
[
'method'
=>
'post'
]],
//职称【接口】
...
...
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