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
293f03ab
Commit
293f03ab
authored
Nov 14, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chat bug
parent
79f9d3bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
AppChat.php
application/chat/controller/AppChat.php
+15
-4
No files found.
application/chat/controller/AppChat.php
View file @
293f03ab
...
@@ -246,6 +246,7 @@ class AppChat extends Basic
...
@@ -246,6 +246,7 @@ class AppChat extends Basic
'target' => 'agent_5775', //接受人
'target' => 'agent_5775', //接受人
'page_no' => '1', //第几页
'page_no' => '1', //第几页
'page_size' => '15' //每页多少条
'page_size' => '15' //每页多少条
'self' => 'agent_5775'
);*/
);*/
if
(
!
isset
(
$params
[
'target_type'
])
||
!
isset
(
$params
[
'from'
])
||
!
isset
(
$params
[
'target'
])
||
!
isset
(
$params
[
'last_msg_id'
]))
{
if
(
!
isset
(
$params
[
'target_type'
])
||
!
isset
(
$params
[
'from'
])
||
!
isset
(
$params
[
'target'
])
||
!
isset
(
$params
[
'last_msg_id'
]))
{
return
$this
->
response
(
ErrorCodeConst
::
ERROR_CODE_PARAM_NOT_EXIST
,
"请求参数错误"
);
return
$this
->
response
(
ErrorCodeConst
::
ERROR_CODE_PARAM_NOT_EXIST
,
"请求参数错误"
);
...
@@ -253,10 +254,20 @@ class AppChat extends Basic
...
@@ -253,10 +254,20 @@ class AppChat extends Basic
$msgModel
=
new
ChatMsg
();
$msgModel
=
new
ChatMsg
();
//进入详情页修改已读消息 只修改自己收到的消息为已读,自己发送的是在对方判断已读未读
//进入详情页修改已读消息 只修改自己收到的消息为已读,自己发送的是在对方判断已读未读
$where_arr
[
"from"
]
=
$params
[
"from"
];
if
(
!
empty
(
$params
[
"self"
]
)){
$where_arr
[
"target"
]
=
$params
[
"target"
];
$where_arr
=
[];
$update_arr
[
"is_read"
]
=
1
;
if
(
$params
[
"self"
]
==
$params
[
"from"
]){
$msgModel
->
updateIsRead
(
$where_arr
,
$update_arr
);
$where_arr
[
"from"
]
=
$params
[
"target"
];
$where_arr
[
"target"
]
=
$params
[
"from"
];
}
else
{
$where_arr
[
"from"
]
=
$params
[
"from"
];
$where_arr
[
"target"
]
=
$params
[
"target"
];
}
$update_arr
[
"is_read"
]
=
1
;
$msgModel
->
updateIsRead
(
$where_arr
,
$update_arr
);
}
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_no
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$page_size
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
...
...
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