123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\common\enum;
-
-
-
- class CommunityArticleEnum
- {
- const STATUS_WAIT = 0;
- const STATUS_SUCCESS = 1;
- const STATUS_REFUSE = 2;
-
-
-
-
- public static function getStatusDesc($status = true)
- {
- $desc = [
- self::STATUS_WAIT => '审核中',
- self::STATUS_SUCCESS => '审核通过',
- self::STATUS_REFUSE => '审核拒绝',
- ];
- if (true === $status) {
- return $desc;
- }
- return $desc[$status];
- }
-
-
-
-
- public static function getStatusRemarkDesc($article, $page_detail = true)
- {
- $desc = '';
- if ($article['status'] == self::STATUS_WAIT) {
- $desc = $page_detail ? '审核通过后,将展示在首页!' : '通过后将展示在社区';
- }
-
- if ($article['status'] == self::STATUS_REFUSE) {
- $desc = $page_detail ? $article['audit_remark'] : '查看未通过原因';
- }
-
- return $desc;
- }
-
- }
|