修复日历事件共享bug
This commit is contained in:
@@ -21,17 +21,7 @@ class WidgetController extends DefaultController
|
||||
->permission('receive_id')
|
||||
->orderBy('created_at', 'desc');
|
||||
|
||||
// 查询是否已经阅读
|
||||
$reader = function ($q) {
|
||||
$q->selectRaw('1')
|
||||
->from('article_reader')
|
||||
->whereRaw('article_reader.article_id = article.id')
|
||||
->where('article_reader.created_id', auth()->id());
|
||||
};
|
||||
$model->whereNotExists($reader);
|
||||
|
||||
$rows = $model->get(['id', 'name', 'created_at']);
|
||||
|
||||
$rows = $model->limit(15)->get(['id', 'name', 'created_at']);
|
||||
$json['total'] = sizeof($rows);
|
||||
$json['data'] = $rows;
|
||||
return $json;
|
||||
@@ -73,6 +63,7 @@ class WidgetController extends DefaultController
|
||||
'count2' => $count2,
|
||||
'rate' => $rate,
|
||||
];
|
||||
|
||||
return $this->render([
|
||||
'dates' => $config['dates'],
|
||||
'info' => $config['info'],
|
||||
|
||||
@@ -14,7 +14,7 @@ return [
|
||||
'more_url' => 'article/article/index',
|
||||
],
|
||||
'info_article_index' => [
|
||||
'name' => '新增公告',
|
||||
'name' => '未读公告',
|
||||
'type' => 2,
|
||||
'url' => 'article/widget/info',
|
||||
'more_url' => 'article/article/index',
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="info-r">
|
||||
<div>较{{$dates[$info['params']['date']]}}</div>
|
||||
<div>比{{$dates[$info['params']['date']]}}</div>
|
||||
<div class="rate @if($res['rate'] > 100) red @endif">{{$res['rate']}}%</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user