前台插件访问
This commit is contained in:
@@ -15,7 +15,7 @@ namespace app\common\model;
|
||||
class Document extends \think\model\Merge{
|
||||
|
||||
protected $fk = 'doc_id';
|
||||
//protected static $relationModel = array('document_article');
|
||||
protected $relationModel = array('document_article');
|
||||
|
||||
// 定义需要自动写入时间戳格式的字段
|
||||
protected $autoWriteTimestamp = array('create_time','update_time','deadline');
|
||||
|
||||
@@ -125,7 +125,6 @@ class Content extends Fornt {
|
||||
//当为文章模型时
|
||||
$info = $this->model->detail($id);
|
||||
|
||||
//文档模型数据统计,同一台电脑半小时更新一次
|
||||
if ($this->modelInfo['extend'] = 1 && (time() - session('set_content_view')) > 1800) {
|
||||
db('Document')->where(array('id' => $id))->setInc('view');
|
||||
session('set_content_view', time());
|
||||
|
||||
Reference in New Issue
Block a user