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
17b39dd7
Commit
17b39dd7
authored
Jul 02, 2018
by
hujun
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/0702-v.2.2.0' into 0702-v.2.2.0
parents
8536b8fc
8fc109b8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
9 deletions
+52
-9
Agent.php
application/index/controller/Agent.php
+33
-0
VerifyValidate.php
application/index/validate/VerifyValidate.php
+13
-4
route.php
application/route.php
+6
-5
No files found.
application/index/controller/Agent.php
View file @
17b39dd7
...
@@ -27,6 +27,7 @@ use app\model\ABindingDevice;
...
@@ -27,6 +27,7 @@ use app\model\ABindingDevice;
use
app\model\Agents
;
use
app\model\Agents
;
use
app\model\AStore
;
use
app\model\AStore
;
use
app\model\Regions
;
use
app\model\Regions
;
use
think\Exception
;
use
think\Session
;
use
think\Session
;
use
think\Db
;
use
think\Db
;
...
@@ -135,6 +136,38 @@ class Agent extends Basic
...
@@ -135,6 +136,38 @@ class Agent extends Basic
}
}
}
}
/**
* 绑定或者解绑
* @return \think\Response
*/
public
function
updateDevice
()
{
$params
=
$this
->
request
->
param
();
/* $params = array(
"agent_id" => 1,//解绑或者绑定的经纪人id
"id" => 1, //关系id
"operator_id" => 12,//操作人id 登陆后台的经纪人id
"is_forbidden" => 0,//0正常 1禁止
);*/
$checkResult
=
$this
->
validate
(
$params
,
"VerifyValidate.verifyIsForbidden"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
}
$aBD
=
new
ABindingDevice
();
try
{
$id
=
$aBD
->
updateDevice
(
$params
);
if
(
$id
>
0
)
{
return
$this
->
response
(
"200"
,
"update success"
,
[
"id"
=>
$id
]);
}
else
{
return
$this
->
response
(
"101"
,
"请求异常"
);
}
}
catch
(
Exception
$exception
)
{
return
$this
->
response
(
"101"
,
"请求错误:"
.
$exception
);
}
}
/**
/**
* 新增or修改or查看
* 新增or修改or查看
* $group_id !=0为查看
* $group_id !=0为查看
...
...
application/index/validate/VerifyValidate.php
View file @
17b39dd7
...
@@ -13,18 +13,26 @@ class VerifyValidate extends Validate
...
@@ -13,18 +13,26 @@ class VerifyValidate extends Validate
{
{
protected
$rule
=
[
protected
$rule
=
[
'id'
=>
'require|number'
,
'id'
=>
'require|number'
,
'phone'
=>
'require|number'
,
// 'wx_open_id' => 'require|length:10,50
',
'device_id'
=>
'require
'
,
// 'source' => 'require|number
',
'is_forbidden'
=>
'require|in:0,1
'
,
// 'user_id' => 'require|number|gt:0
',
'operator_id'
=>
'require|number
'
,
];
];
protected
$message
=
[
protected
$message
=
[
'id.require'
=>
'id不能为空'
,
'id.require'
=>
'id不能为空'
,
'phone.require'
=>
'手机号不能为空'
,
'phone.number'
=>
'手机号输入错误'
,
'device_id.require'
=>
'设备号获取失败,请联系管理员'
,
'is_forbidden.require'
=>
'是否绑定字段必填'
,
'is_forbidden.in'
=>
'是否绑定字段值只能为0或1'
,
'operator_id.require'
=>
'操作人为必填字段'
,
'operator_id.number'
=>
'操作人编号只能为数字'
,
];
];
protected
$scene
=
[
protected
$scene
=
[
'select'
=>
[
'id'
],
'select'
=>
[
'id'
],
'verifyIsForbidden'
=>
[
'phone'
,
'device_id'
,
'is_forbidden'
,
'operator_id'
],
];
];
}
}
\ No newline at end of file
application/route.php
View file @
17b39dd7
...
@@ -139,7 +139,8 @@ Route::group('index', [
...
@@ -139,7 +139,8 @@ Route::group('index', [
'saveAgent'
=>
[
'index/agent/saveAgent'
,
[
'method'
=>
'get|post'
]
],
//修改经纪人【接口】
'saveAgent'
=>
[
'index/agent/saveAgent'
,
[
'method'
=>
'get|post'
]
],
//修改经纪人【接口】
'updateStatus'
=>
[
'index/agent/updateStatus'
,
[
'method'
=>
'post'
]
],
//状态修改【接口】
'updateStatus'
=>
[
'index/agent/updateStatus'
,
[
'method'
=>
'post'
]
],
//状态修改【接口】
'updateRole'
=>
[
'index/agent/updateRole'
,
[
'method'
=>
'post'
]
],
//经纪人角色修改【接口】
'updateRole'
=>
[
'index/agent/updateRole'
,
[
'method'
=>
'post'
]
],
//经纪人角色修改【接口】
'deviceList'
=>
[
'index/agent/deviceList'
,
[
'method'
=>
'post|get'
]
],
//经纪人设备id绑定列表
'deviceList'
=>
[
'index/agent/deviceList'
,
[
'method'
=>
'post|get'
]
],
//经纪人设备id绑定列表
'updateDevice'
=>
[
'index/agent/updateDevice'
,
[
'method'
=>
'post|get'
]
],
//解绑或绑定经纪人设备id
//客户标签
//客户标签
'getULabelsList'
=>
[
'index/label/getULabelsList'
,
[
'method'
=>
'get'
]
],
//客户标签列表接口/界面
'getULabelsList'
=>
[
'index/label/getULabelsList'
,
[
'method'
=>
'get'
]
],
//客户标签列表接口/界面
...
@@ -374,10 +375,10 @@ Route::group('broker', [
...
@@ -374,10 +375,10 @@ Route::group('broker', [
'statusBargain'
=>
[
'api_broker/OrderLog/statusBargain'
,
[
'method'
=>
'get|post'
]
],
'statusBargain'
=>
[
'api_broker/OrderLog/statusBargain'
,
[
'method'
=>
'get|post'
]
],
'getIsAccountStatement'
=>
[
'api_broker/OrderLog/getIsAccountStatement'
,
[
'method'
=>
'get|post'
]
],
'getIsAccountStatement'
=>
[
'api_broker/OrderLog/getIsAccountStatement'
,
[
'method'
=>
'get|post'
]
],
'login'
=>
[
'api_broker/Broker/login'
,
[
'method'
=>
'post'
]
],
//经纪人登陆 废弃
'login'
=>
[
'api_broker/Broker/login'
,
[
'method'
=>
'post'
]
],
//经纪人登陆 废弃
'loginV2'
=>
[
'api_broker/Broker/loginV2'
,
[
'method'
=>
'post'
]
],
//经纪人登陆
'loginV2'
=>
[
'api_broker/Broker/loginV2'
,
[
'method'
=>
'post'
]
],
//经纪人登陆
'verifyAgentStatus'
=>
[
'api_broker/Broker/verifyAgentStatus'
,
[
'method'
=>
'post'
]
],
//判断经纪人是否被解绑
'verifyAgentStatus'
=>
[
'api_broker/Broker/verifyAgentStatus'
,
[
'method'
=>
'post'
]
],
//判断经纪人是否被解绑
'updateDevice'
=>
[
'api_broker/Broker/updateDevice'
,
[
'method'
=>
'post'
]
],
//解绑或者绑定经纪人
'updateDevice'
=>
[
'api_broker/Broker/updateDevice'
,
[
'method'
=>
'post'
]
],
//解绑或者绑定经纪人
'editAgent'
=>
[
'api_broker/Broker/editAgent'
,
[
'method'
=>
'post'
]
],
//经纪人修改密码
'editAgent'
=>
[
'api_broker/Broker/editAgent'
,
[
'method'
=>
'post'
]
],
//经纪人修改密码
'forgetPwd'
=>
[
'api_broker/Broker/forgetPwd'
,
[
'method'
=>
'post'
]
],
//经纪人忘记密码
'forgetPwd'
=>
[
'api_broker/Broker/forgetPwd'
,
[
'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