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
159bc7a8
Commit
159bc7a8
authored
Oct 31, 2018
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户来电统计H5
parent
b69a5f88
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
CallAgent.php
application/api/controller/CallAgent.php
+27
-0
Basic.php
application/api/extend/Basic.php
+2
-1
route.php
application/route.php
+2
-0
No files found.
application/api/controller/CallAgent.php
View file @
159bc7a8
...
@@ -9,6 +9,7 @@ namespace app\api\controller;
...
@@ -9,6 +9,7 @@ namespace app\api\controller;
use
app\api\extend\Basic
;
use
app\api\extend\Basic
;
use
app\model\AAgents
;
use
app\model\AUserCallAgent
;
use
app\model\AUserCallAgent
;
use
think\Request
;
use
think\Request
;
...
@@ -59,7 +60,32 @@ class CallAgent extends Basic
...
@@ -59,7 +60,32 @@ class CallAgent extends Basic
* @return \think\Response
* @return \think\Response
*/
*/
public
function
addUserCallAgentV2
(){
public
function
addUserCallAgentV2
(){
$params
=
$this
->
params
;
/*$params = array(
"user_id" => 1,
"agent_id" => 4,
);*/
if
(
!
isset
(
$params
[
"phone"
])
)
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$model
=
new
AAgents
();
$params_
[
'phone'
]
=
$params
[
"phone"
];
$agents_id
=
$model
->
getAgentsManagerID
(
$params_
);
//先判断是否已经存在数据
$insert
[
"user_id"
]
=
0
;
$insert
[
"agent_id"
]
=
$agents_id
[
0
][
'id'
]
?
$agents_id
[
0
][
'id'
]
:
0
;
$insert
[
"status"
]
=
0
;
$res
=
$this
->
aUserCallAgent
->
saveUserCallAgent
(
$insert
);
//int(1)
if
(
$res
)
{
return
$this
->
response
(
"200"
,
"成功"
);
}
else
{
return
$this
->
response
(
"101"
,
"失败"
);
}
}
}
}
}
\ No newline at end of file
application/api/extend/Basic.php
View file @
159bc7a8
...
@@ -68,7 +68,8 @@ class Basic extends Controller
...
@@ -68,7 +68,8 @@ class Basic extends Controller
"api/getMarchInList"
,
"api/getMarchInList"
,
"api/addSublet"
,
"api/addSublet"
,
"api/getSiteListApp"
,
"api/getSiteListApp"
,
"api/recordCallNumShare"
"api/recordCallNumShare"
,
"api/addUserCallAgentV2"
);
);
/**
/**
...
...
application/route.php
View file @
159bc7a8
...
@@ -426,6 +426,8 @@ Route::group('api', [
...
@@ -426,6 +426,8 @@ Route::group('api', [
'getSiteListApp'
=>
[
'api/Site/getSiteList'
,
[
'method'
=>
'POST|GET'
]
],
//获取站点列表 朱伟 2018-10-18
'getSiteListApp'
=>
[
'api/Site/getSiteList'
,
[
'method'
=>
'POST|GET'
]
],
//获取站点列表 朱伟 2018-10-18
'addUserCallAgent'
=>
[
'api/CallAgent/addUserCallAgent'
,
[
'method'
=>
'POST|GET'
]
],
//客户来电记录
'addUserCallAgent'
=>
[
'api/CallAgent/addUserCallAgent'
,
[
'method'
=>
'POST|GET'
]
],
//客户来电记录
'addUserCallAgentV2'
=>
[
'api/CallAgent/addUserCallAgentV2'
,
[
'method'
=>
'POST|GET'
]
],
//客户来电记录h5
]);
]);
...
...
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