diff --git a/app/Http/Controllers/ArticleController.php b/app/Http/Controllers/ArticleController.php index c7eaee486f748c5d5d9c27334ac8ffb048fa3f29..b72bbfddc4af93cd5eceac337a851c14f8ec8205 100644 --- a/app/Http/Controllers/ArticleController.php +++ b/app/Http/Controllers/ArticleController.php @@ -159,6 +159,10 @@ class ArticleController extends Controller { $isFeed = $this->articleService->isFeed ( $article->feed->id ); } + if($isFeed == false && $article->feed->audit_status == 0) { + throw new CustomException("订阅源审核中,审核通过后可正常分享"); + } + return $this->jsonAndViewAutoResponse ( $request, ResponseDataUtil::genSimpleSucc ( [ 'article' => $article, 'is_feed' => $isFeed diff --git a/app/Http/Controllers/MindController.php b/app/Http/Controllers/MindController.php index ac0c31dfdaf3134b0947aaaead8d17ac2ff7f8dd..05ab166867760d4f2b9bc3bde263ed5ef03aa279 100644 --- a/app/Http/Controllers/MindController.php +++ b/app/Http/Controllers/MindController.php @@ -149,6 +149,14 @@ class MindController extends Controller { ] ), 'minds.outlineview' ); } + public function outlineViewv2(Request $request, Mind $mind) { + $this->authorize ( 'destroy', $mind ); + + return $this->jsonAndViewAutoResponse ( $request, ResponseDataUtil::genSimpleSucc ( [ + 'mind' => $mind + ] ), 'minds.outlineviewv2' ); + } + /** * 通过获取节点思维导图信息 * diff --git a/app/Services/DailySummaryService.php b/app/Services/DailySummaryService.php index 575ed62929a891c29f40f56dbad0146212d915b7..2e727d3d73b19a0312325b267cfd7081cc1716c2 100644 --- a/app/Services/DailySummaryService.php +++ b/app/Services/DailySummaryService.php @@ -91,10 +91,17 @@ class DailySummaryService { $minds = $this->mindRepository->getListForSummary ( Auth::id (), $startTime, $endTime ); $notes = $this->noteRepository->getListForSummary ( Auth::id (), $startTime, $endTime ); - $infos = array (); + $thingTypeInfos = array(1=>'事情', 2=>'任务', 3=>'番茄'); + $infos = array ( + 'thing'=>array('name'=>'事情', 'list'=>array()), + 'article'=>array('name'=>'文章', 'list'=>array()), + 'mind'=>array('name'=>'导图', 'list'=>array()), + 'note'=>array('name'=>'笔记', 'list'=>array()), + ); foreach ( $things as $thing ) { + $type = isset($thingTypeInfos[$thing->type]) ? '['.$thingTypeInfos[$thing->type].']':''; $infos ['thing'] ['list'] [] = array ( - 'content' => $thing->name, + 'content' => $type . $thing->name, 'url' => '' ); } diff --git a/database/db.sql b/database/db.sql index 586664a63be0462ba246b35a50da394e584d517d..606280531e500ce8b3885636e0b08e0364e9bdf5 100644 --- a/database/db.sql +++ b/database/db.sql @@ -266,6 +266,7 @@ CREATE TABLE IF NOT EXISTS `feeds` ( `recommend_category_id` tinyint(4) DEFAULT '0' COMMENT '推荐分类', `active_level` tinyint(4) DEFAULT '0' COMMENT '活跃等级(1/2/3/4 活跃性依次递减)', `last_published` timestamp NULL DEFAULT NULL COMMENT '上次发布时间', + `audit_status` tinyint(4) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '创建时间', `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '修改时间', PRIMARY KEY (`id`), diff --git a/resources/views/articles/index.blade.php b/resources/views/articles/index.blade.php index dd7649e9f7f8692e1528f32336940e796bfe1fa7..cb61f5eaddf3dfd300f95a8930ad6f0809afc67c 100644 --- a/resources/views/articles/index.blade.php +++ b/resources/views/articles/index.blade.php @@ -433,7 +433,7 @@ if(processNavFlag == false) { @else
@endif diff --git a/resources/views/dailysummarys/create.blade.php b/resources/views/dailysummarys/create.blade.php index a3a4e34b4f211d193ea820b22a94bedfb865bdb1..e018f0fd00d98a2de2ed784e0f54377a2e929ef3 100644 --- a/resources/views/dailysummarys/create.blade.php +++ b/resources/views/dailysummarys/create.blade.php @@ -24,15 +24,16 @@ function getInfos($summary_date) { } else { $('#tips').html(""); $.each( result_arr.result.infos, function( subject, tipInfo ){ - var li = '
- 今天发生了点什么,记录一下吧~
+ 今天发生了点什么,记录一下吧~
{{ $exception->getMessage() }}