|
@@ -12,6 +12,7 @@
|
|
|
namespace App\Services;
|
|
namespace App\Services;
|
|
|
|
|
|
|
|
use App\Models\ArticleModel;
|
|
use App\Models\ArticleModel;
|
|
|
|
|
+use App\Models\MemberModel;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 文章管理-服务类
|
|
* 文章管理-服务类
|
|
@@ -207,6 +208,11 @@ class ArticleService extends BaseService
|
|
|
$info['thumb'] = $info['thumb']? get_image_url($info['thumb']) : '';
|
|
$info['thumb'] = $info['thumb']? get_image_url($info['thumb']) : '';
|
|
|
$info['publish_at'] = $info['publish_at']? $info['publish_at'] : datetime( $info['create_time'],'Y-m-d H:i:s');
|
|
$info['publish_at'] = $info['publish_at']? $info['publish_at'] : datetime( $info['create_time'],'Y-m-d H:i:s');
|
|
|
|
|
|
|
|
|
|
+ $info['author'] = '报恩寺';
|
|
|
|
|
+ if($info['user_id']){
|
|
|
|
|
+ $author = MemberModel::where(['id'=> $info['user_id']])->value('nickname');
|
|
|
|
|
+ $info['author'] = $author? $author : '报恩寺';
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return $info;
|
|
return $info;
|
|
|
}
|
|
}
|