Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eduline
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
eduline
Commits
5d94b53c
Commit
5d94b53c
authored
Jun 27, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
6208407d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
29 deletions
+30
-29
apps/basic/Lib/Action/MessageAction.class.php
+30
-29
No files found.
apps/basic/Lib/Action/MessageAction.class.php
View file @
5d94b53c
...
...
@@ -16,7 +16,7 @@ class MessageAction extends Action
* @return void
*/
function
_initialize
(){
}
/**
...
...
@@ -24,28 +24,30 @@ class MessageAction extends Action
* @return void
*/
public
function
index
()
{
$and_uid
=
$_GET
[
'and_uid'
]
?
:
''
;
$dao
=
model
(
'Message'
);
$list
=
$dao
->
getMessageListByUid
(
$this
->
mid
,
array
(
MessageModel
::
ONE_ON_ONE_CHAT
,
MessageModel
::
MULTIPLAYER_CHAT
),
$and_uid
);
$this
->
assign
(
$list
);
if
(
isAjax
()){
Response
::
create
([
'status'
=>
1
,
'data'
=>
[
'html'
=>
$this
->
fetch
(
'index_w3g_ajax'
)]],
'json'
)
->
code
(
200
)
->
send
();
exit
;
}
// 设置信息已读(在右上角提示去掉),
$dao
->
setMessageIsRead
(
t
(
$POST
[
'id'
]),
$this
->
mid
,
1
);
$this
->
setTitle
(
'我的私信'
);
$userInfo
=
model
(
'User'
)
->
getUserInfo
(
$this
->
mid
);
$this
->
setKeywords
(
$userInfo
[
'uname'
]
.
'的私信'
);
$this
->
display
();
// $and_uid = $_GET['and_uid'] ? :'';
//
// $dao = model('Message');
// $list = $dao->getMessageListByUid($this->mid, array(MessageModel::ONE_ON_ONE_CHAT, MessageModel::MULTIPLAYER_CHAT), $and_uid);
//
// $this->assign($list);
// if(isAjax()){
// Response::create(['status'=>1,'data'=>['html'=>$this->fetch('index_w3g_ajax')]],'json')->code(200)->send();exit;
// }
// // 设置信息已读(在右上角提示去掉),
// $dao->setMessageIsRead(t($POST['id']), $this->mid, 1);
// $this->setTitle('我的私信');
// $userInfo = model('User')->getUserInfo($this->mid);
//
// $this->setKeywords($userInfo['uname'].'的私信');
// $this->display();
$this
->
notify
();;
}
/**
* 系统通知
* @return void
*/
*/
public
function
notify
()
{
//$list = model('Notify')->getMessageList($this->mid); //2012/12/27
$map
[
'uid'
]
=
$this
->
mid
;
...
...
@@ -74,7 +76,7 @@ class MessageAction extends Action
/**
* 开课提醒
* @return void
*/
*/
public
function
liveNotify
()
{
$map
[
'uid'
]
=
$this
->
mid
;
$map
[
'node'
]
=
'live_notify'
;
...
...
@@ -96,7 +98,7 @@ class MessageAction extends Action
* 获取指定应用指定用户下的消息列表
* @return void
*/
public
function
notifyDetail
()
{
public
function
notifyDetail
()
{
$appname
=
t
(
$_REQUEST
[
'appname'
]);
//设置为已读
//model('Notify')->setRead($this->mid,$appname);
...
...
@@ -121,13 +123,13 @@ class MessageAction extends Action
/**
* 私信详情
* @return void
*/
*/
public
function
detail
()
{
$message
=
model
(
'Message'
)
->
isMember
(
t
(
$_GET
[
'id'
]),
$this
->
mid
,
true
);
// 验证数据
if
(
empty
(
$message
))
{
if
(
empty
(
$message
))
{
$this
->
error
(
'私信不存在'
);
}
$message
[
'member'
]
=
model
(
'Message'
)
->
getMessageMembers
(
t
(
$_GET
[
'id'
]),
'member_uid'
);
...
...
@@ -139,7 +141,7 @@ class MessageAction extends Action
// 设置信息已读(私信列表页去掉new标识)
model
(
'Message'
)
->
setMessageIsRead
(
t
(
$_GET
[
'id'
]),
$this
->
mid
,
0
);
$message
[
'since_id'
]
=
model
(
'Message'
)
->
getSinceMessageId
(
$message
[
'list_id'
],
$message
[
'message_num'
]);
$this
->
assign
(
'message'
,
$message
);
$this
->
assign
(
'type'
,
intval
(
$_GET
[
'type'
]));
...
...
@@ -180,7 +182,7 @@ class MessageAction extends Action
// 是否能够编辑用户
$editable
=
intval
(
$_REQUEST
[
'editable'
])
==
0
?
0
:
1
;
$this
->
assign
(
'editable'
,
$editable
);
$this
->
display
();
}
...
...
@@ -238,7 +240,7 @@ class MessageAction extends Action
if
(
$school
)
{
$_POST
[
'content'
]
=
"您好,您绑定的机构已经被管理员"
.
$dotype
;
}
$_POST
[
'body'
]
=
$_POST
[
'content'
];
$_POST
[
'uid'
]
=
$_POST
[
'to'
];
...
...
@@ -394,15 +396,15 @@ class MessageAction extends Action
* 删除用户指定私信会话
* @return integer 1=成功 0=失败
*/
public
function
doDeleteSession
()
{
public
function
doDeleteSession
()
{
$res
=
model
(
'Message'
)
->
deleteSessionById
(
$this
->
mid
,
t
(
$_POST
[
'ids'
]));
if
(
$res
)
echo
1
;
else
echo
0
;
}
public
function
doSendFeedMail
(){
//手动执行邮件任务
model
(
'Message'
)
->
doSendFeedMail
();
}
}
\ No newline at end of file
}
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