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
68a5a037
Commit
68a5a037
authored
Jul 10, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
聊天
parent
52d1871e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
AppChat.php
application/chat/controller/AppChat.php
+21
-21
No files found.
application/chat/controller/AppChat.php
View file @
68a5a037
...
@@ -79,14 +79,14 @@ class AppChat extends Basic
...
@@ -79,14 +79,14 @@ class AppChat extends Basic
public
function
userChat
()
public
function
userChat
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/* $params = array(
/* $params = array(
"user_id" => 80,
"user_id" => 80,
"mobile" => "15821506182",
"mobile" => "15821506182",
"source" => 1, //1经纪人 2用户
"source" => 1, //1经纪人 2用户
"device_id" => "ssss1231231123123",
"device_id" => "ssss1231231123123",
"push_id" => "ssss1231231123123"
"push_id" => "ssss1231231123123"
);*/
);*/
if
(
!
isset
(
$params
[
'user_id'
])
||
!
isset
(
$params
[
'mobile'
])
||
!
isset
(
$params
[
'source'
])
||
!
isset
(
$params
[
'push_id'
]))
{
if
(
!
isset
(
$params
[
'user_id'
])
||
!
isset
(
$params
[
'mobile'
])
||
!
isset
(
$params
[
'source'
])
||
!
isset
(
$params
[
'push_id'
]))
{
...
@@ -149,21 +149,21 @@ class AppChat extends Basic
...
@@ -149,21 +149,21 @@ class AppChat extends Basic
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
$params
=
array
(
'user_name'
=>
'cesh'
,
'msg_content'
=>
'ceshi666'
,
'target_type'
=>
'users'
,
'source'
=>
'1'
,
'from'
=>
'qqqq'
,
'type'
=>
'1'
,
'is_user'
=>
'0'
,
'target'
=>
'agent_5740'
,
);
if
(
!
isset
(
$params
[
'target_type'
])
||
!
isset
(
$params
[
'target'
])
||
!
isset
(
$params
[
'type'
])
if
(
!
isset
(
$params
[
'target_type'
])
||
!
isset
(
$params
[
'target'
])
||
!
isset
(
$params
[
'type'
])
||
!
isset
(
$params
[
'msg_content'
])
||
!
isset
(
$params
[
'source'
])
||
!
isset
(
$params
[
'is_user'
])
||
!
isset
(
$params
[
'from'
]))
{
||
!
isset
(
$params
[
'msg_content'
])
||
!
isset
(
$params
[
'source'
])
||
!
isset
(
$params
[
'is_user'
])
||
!
isset
(
$params
[
'from'
]))
{
return
$this
->
response
(
ErrorCodeConst
::
ERROR_CODE_PARAM_NOT_EXIST
,
"请求参数错误"
);
return
$this
->
response
(
ErrorCodeConst
::
ERROR_CODE_PARAM_NOT_EXIST
,
"请求参数错误"
);
}
}
/* $params = array(
'user_name' => 'cesh',
'msg_content' => 'ceshi666',
'target_type' => 'users',
'source' => '1',
'from' => 'admin',
'type' => '1',
'is_user' => '0',
'target' => '18112347151',
);*/
$user_name
=
isset
(
$params
[
'user_name'
])
?
$params
[
'user_name'
]
:
$params
[
'from'
];
//用户昵称
$user_name
=
isset
(
$params
[
'user_name'
])
?
$params
[
'user_name'
]
:
$params
[
'from'
];
//用户昵称
$target_type
=
$params
[
'target_type'
];
// 消息类型 users 给用户发消息。chatgroups: 给群发消息,chatrooms: 给聊天室发消息
$target_type
=
$params
[
'target_type'
];
// 消息类型 users 给用户发消息。chatgroups: 给群发消息,chatrooms: 给聊天室发消息
$target
=
$params
[
'target'
];
//接受人 if target_type 群 者表示群id
$target
=
$params
[
'target'
];
//接受人 if target_type 群 者表示群id
...
@@ -322,9 +322,9 @@ class AppChat extends Basic
...
@@ -322,9 +322,9 @@ class AppChat extends Basic
public
function
getChatRelation
()
public
function
getChatRelation
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/* $params = array(
/* $params = array(
"target" => "agent_5775"
"target" => "agent_5775"
);*/
);*/
if
(
!
isset
(
$params
[
'target'
]))
{
if
(
!
isset
(
$params
[
'target'
]))
{
return
$this
->
response
(
"300"
,
"参数不全"
);
return
$this
->
response
(
"300"
,
"参数不全"
);
}
}
...
...
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