用户头像 |
用户昵称 |
- 所在地区 |
- 用户性别 |
用户角色 |
+ 课程 |
+ 文章 |
+ 收藏 |
活跃时间 |
注册时间 |
操作 |
@@ -54,15 +56,24 @@
|
- {{ item.name }}({{ item.id }}){{ status_info(item) }} |
- {{ item.area }} |
- {{ gender_info(item.gender) }} |
+
+
+ {{ item.name }}({{ item.id }}){{ status_info(item) }}
+
+
+ 性别:{{ gender_info(item.gender) }}
+ 地区:{{ item.area|default('N/A') }}
+
+ |
教学:{{ edu_role_info(item.edu_role) }}
后台:{{ admin_role_info(item.admin_role) }}
|
- {{ date('Y-m-d H:i:s',item.active_time) }} |
- {{ date('Y-m-d H:i:s',item.create_time) }} |
+ {{ item.course_count }} |
+ {{ item.article_count }} |
+ {{ item.favorite_count }} |
+ {{ date('Y-m-d',item.active_time) }} |
+ {{ date('Y-m-d',item.create_time) }} |
diff --git a/app/Http/Home/Services/ShareUrl.php b/app/Http/Home/Services/ShareUrl.php
index 4c5dd0c5..134f0989 100644
--- a/app/Http/Home/Services/ShareUrl.php
+++ b/app/Http/Home/Services/ShareUrl.php
@@ -120,7 +120,7 @@ class ShareUrl extends Service
$webUrl = $this->webBaseUrl . $route;
- $h5Url = sprintf('%s/user/info?id=%s&referer=%s', $this->h5BaseUrl, $id, $referer);
+ $h5Url = sprintf('%s/user/index?id=%s&referer=%s', $this->h5BaseUrl, $id, $referer);
return ['web' => $webUrl, 'h5' => $h5Url];
}
diff --git a/app/Library/AppInfo.php b/app/Library/AppInfo.php
index 3e782a98..3639ff96 100644
--- a/app/Library/AppInfo.php
+++ b/app/Library/AppInfo.php
@@ -11,7 +11,7 @@ class AppInfo
protected $link = 'https://koogua.com';
- protected $version = '1.3.1';
+ protected $version = '1.3.2';
public function __get($name)
{
diff --git a/app/Models/Course.php b/app/Models/Course.php
index 4d04ed3e..d8c50fed 100644
--- a/app/Models/Course.php
+++ b/app/Models/Course.php
@@ -164,7 +164,7 @@ class Course extends Model
*
* @var float
*/
- public $rating = 0.00;
+ public $rating = 5.00;
/**
* 综合得分
diff --git a/app/Services/Logic/Chapter/ChapterInfo.php b/app/Services/Logic/Chapter/ChapterInfo.php
index dbf0d66e..938d3d16 100644
--- a/app/Services/Logic/Chapter/ChapterInfo.php
+++ b/app/Services/Logic/Chapter/ChapterInfo.php
@@ -194,6 +194,13 @@ class ChapterInfo extends LogicService
$chapter->user_count += 1;
$chapter->update();
+
+ $parent = $this->checkChapter($chapter->parent_id);
+
+ $parent->user_count += 1;
+
+ $parent->update();
+
}
protected function incrGroupUserCount(ImGroupModel $group)
diff --git a/app/Services/Logic/Chapter/ChapterLike.php b/app/Services/Logic/Chapter/ChapterLike.php
index ff6faf72..57424145 100644
--- a/app/Services/Logic/Chapter/ChapterLike.php
+++ b/app/Services/Logic/Chapter/ChapterLike.php
@@ -64,6 +64,12 @@ class ChapterLike extends LogicService
$chapter->like_count += 1;
$chapter->update();
+
+ $parent = $this->checkChapter($chapter->parent_id);
+
+ $parent->like_count += 1;
+
+ $parent->update();
}
protected function decrChapterLikeCount(ChapterModel $chapter)
@@ -72,6 +78,13 @@ class ChapterLike extends LogicService
$chapter->like_count -= 1;
$chapter->update();
}
+
+ $parent = $this->checkChapter($chapter->parent_id);
+
+ if ($parent->like_count > 0) {
+ $parent->like_count -= 1;
+ $parent->update();
+ }
}
protected function incrUserDailyChapterLikeCount(UserModel $user)
diff --git a/app/Services/Logic/Comment/CommentCountTrait.php b/app/Services/Logic/Comment/CommentCountTrait.php
index 4973e553..1bdfc499 100644
--- a/app/Services/Logic/Comment/CommentCountTrait.php
+++ b/app/Services/Logic/Comment/CommentCountTrait.php
@@ -24,6 +24,12 @@ trait CommentCountTrait
$chapter->comment_count += 1;
$chapter->update();
+
+ $parent = $this->checkChapter($chapter->parent_id);
+
+ $parent->comment_count += 1;
+
+ $parent->update();
}
protected function incrArticleCommentCount(ArticleModel $article)
@@ -47,6 +53,13 @@ trait CommentCountTrait
$chapter->comment_count -= 1;
$chapter->update();
}
+
+ $parent = $this->checkChapter($chapter->parent_id);
+
+ if ($parent->comment_count > 0) {
+ $parent->comment_count -= 1;
+ $parent->update();
+ }
}
protected function decrArticleCommentCount(ArticleModel $article)
diff --git a/app/Services/Logic/Comment/CommentCreate.php b/app/Services/Logic/Comment/CommentCreate.php
index 02c59a11..4c7c54e4 100644
--- a/app/Services/Logic/Comment/CommentCreate.php
+++ b/app/Services/Logic/Comment/CommentCreate.php
@@ -6,6 +6,7 @@ use App\Models\Comment as CommentModel;
use App\Services\Logic\ArticleTrait;
use App\Services\Logic\ChapterTrait;
use App\Services\Logic\Service as LogicService;
+use App\Traits\Client as ClientTrait;
use App\Validators\Comment as CommentValidator;
use App\Validators\UserLimit as UserLimitValidator;
@@ -14,6 +15,7 @@ class CommentCreate extends LogicService
use ArticleTrait;
use ChapterTrait;
+ use ClientTrait;
use CommentCountTrait;
public function handle()
@@ -40,6 +42,8 @@ class CommentCreate extends LogicService
];
$data['content'] = $validator->checkContent($post['content']);
+ $data['client_type'] = $this->getClientType();
+ $data['client_ip'] = $this->getClientIp();
if ($post['item_type'] == CommentModel::ITEM_CHAPTER) {
diff --git a/app/Services/Logic/Comment/CommentReply.php b/app/Services/Logic/Comment/CommentReply.php
index dfd4f1ab..fc31d0fe 100644
--- a/app/Services/Logic/Comment/CommentReply.php
+++ b/app/Services/Logic/Comment/CommentReply.php
@@ -7,6 +7,7 @@ use App\Services\Logic\ArticleTrait;
use App\Services\Logic\ChapterTrait;
use App\Services\Logic\CommentTrait;
use App\Services\Logic\Service as LogicService;
+use App\Traits\Client as ClientTrait;
use App\Validators\Comment as CommentValidator;
use App\Validators\UserLimit as UserLimitValidator;
@@ -15,6 +16,7 @@ class CommentReply extends LogicService
use ArticleTrait;
use ChapterTrait;
+ use ClientTrait;
use CommentTrait;
use CommentCountTrait;
@@ -49,6 +51,8 @@ class CommentReply extends LogicService
}
$data['content'] = $validator->checkContent($post['content']);
+ $data['client_type'] = $this->getClientType();
+ $data['client_ip'] = $this->getClientIp();
$comment = new CommentModel();
|