Commit 3fc77002 by 冷斌

fix bug

parent 5d94b53c
...@@ -41,7 +41,27 @@ class MessageAction extends Action ...@@ -41,7 +41,27 @@ class MessageAction extends Action
// $this->setKeywords($userInfo['uname'].'的私信'); // $this->setKeywords($userInfo['uname'].'的私信');
// $this->display(); // $this->display();
$this->notify();; $map['uid'] = $this->mid;
$map['node'] = ['neq', 'live_notify'];
$list = D('notify_message')->where($map)->order('ctime desc')->findpage(20);
foreach($list['data'] as $k=>&$v){
if($appname !='public'){
$list['data'][$k]['app'] = model('App')->getAppByName($v['appname']);
}
if($v['node'] == 'live_notify' && strpos($v['body'],"{SITE_URL}")){
$v['body'] = str_replace("{SITE_URL}", SITE_URL, $v['body']);
}
}
unset($v);
model('Notify')->setRead($this->mid);
$this->assign('list',$list);
if(isAjax()){
Response::create(['status'=>1,'data'=>['html'=>$this->fetch('mynotify_w3g_ajax')]],'json')->code(200)->send();exit;
}
$this->setTitle('系统消息');
$this->setKeywords('系统消息');
$this->display();
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment