forked from nangge/noneCms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
添加定时器 每隔5s检测客户端是否已断开 不刷新实现断线重连 归档链接优化 归档文章不存在时跳转到404页面 修复404页面bug
- Loading branch information
Showing
17 changed files
with
739 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: zhl | ||
* Date: 2018/3/28 | ||
* Time: 14:44 | ||
*/ | ||
|
||
namespace app\common\lib\log; | ||
use PHPMailer\PHPMailer\Exception; | ||
use Raven_Client; | ||
use Raven_ErrorHandler; | ||
|
||
class SentryLog | ||
{ | ||
protected $dsn = 'https://cd8fc57db1ef4d86b41d85070f933ffa:[email protected]/711251'; | ||
protected $client; | ||
public function __construct($config) | ||
{ | ||
if(!$config){ | ||
$this->dsn = $config; | ||
} | ||
try{ | ||
$sentryClient = new Raven_Client($this->dsn); | ||
$error_handler = new Raven_ErrorHandler($sentryClient); | ||
$error_handler->registerExceptionHandler(); | ||
$error_handler->registerErrorHandler(); | ||
$error_handler->registerShutdownFunction(); | ||
$this->client = $sentryClient; | ||
}catch (Exception $e){ | ||
throw new Exception('Client Keys 配置不正确'); | ||
} | ||
|
||
} | ||
|
||
public function addLog($e,$data = []){ | ||
$this->client->captureException($e, $data); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: zhl | ||
* Date: 2018/3/29 | ||
* Time: 15:53 | ||
*/ | ||
|
||
namespace app\common\model; | ||
|
||
|
||
use think\Model; | ||
|
||
class Chatrecord extends Model | ||
{ | ||
protected $autoWriteTimestamp = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: zhl | ||
* Date: 2018/4/3 | ||
* Time: 13:47 | ||
*/ | ||
|
||
namespace app\common\model; | ||
|
||
|
||
use think\Model; | ||
|
||
class Chatroom extends Model | ||
{ | ||
protected $autoWriteTimestamp = true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: zhl | ||
* Date: 2018/3/29 | ||
* Time: 14:47 | ||
*/ | ||
|
||
namespace app\common\model; | ||
|
||
|
||
use think\Model; | ||
|
||
class User extends Model | ||
{ | ||
protected $autoWriteTimestamp = true; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/** | ||
* Created by PhpStorm. | ||
* User: zhl | ||
* Date: 2018/4/3 | ||
* Time: 13:51 | ||
*/ | ||
|
||
namespace app\index\controller; | ||
|
||
use app\common\model\Chatroom; | ||
|
||
class Room | ||
{ | ||
public function getList(){ | ||
$room = Chatroom::all(['status'=>1])->hidden(['status','type']); | ||
return json($room); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.