From 9b22fd665605d22e8265799e2badaaee85e1e98b Mon Sep 17 00:00:00 2001 From: koogua Date: Sat, 10 Jul 2021 21:48:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B8=85=E7=90=86=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E6=96=87=E4=BB=B6=EF=BC=8C=E5=A4=84=E7=90=86=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=88=A0=E9=99=A4=E5=90=8E=E7=9A=84=E6=B5=8F?= =?UTF-8?q?=E8=A7=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 +-- app/Caches/TopAnswererList.php | 2 +- app/Console/Tasks/MaintainTask.php | 25 +++++ .../Admin/Controllers/IndexController.php | 2 + app/Http/Admin/Services/Index.php | 5 + app/Http/Admin/Services/Tag.php | 2 +- app/Http/Admin/Views/answer/list.volt | 15 +++ app/Http/Admin/Views/index/index.volt | 2 +- app/Http/Admin/Views/order/show.volt | 2 +- app/Http/Admin/Views/public/login.volt | 53 +++++++-- app/Http/Admin/Views/refund/show.volt | 2 +- app/Http/Admin/Views/setting/storage.volt | 10 +- app/Http/Admin/Views/trade/show.volt | 4 +- .../Home/Controllers/AnswerController.php | 4 + .../Home/Controllers/ArticleController.php | 7 ++ .../Home/Controllers/ChapterController.php | 4 + .../Home/Controllers/ConsultController.php | 4 + .../Home/Controllers/CourseController.php | 4 + app/Http/Home/Controllers/HelpController.php | 4 + .../Home/Controllers/ImGroupController.php | 4 + .../Home/Controllers/PackageController.php | 4 + app/Http/Home/Controllers/PageController.php | 4 + .../Home/Controllers/PointGiftController.php | 4 + .../Home/Controllers/QuestionController.php | 4 + app/Http/Home/Controllers/UserController.php | 4 + app/Http/Home/Services/ImGroup.php | 4 + .../Home/Views/account/forget_password.volt | 13 +-- .../Home/Views/account/login_by_password.volt | 10 +- .../Home/Views/account/login_by_verify.volt | 8 +- app/Http/Home/Views/account/register.volt | 11 +- app/Http/Home/Views/article/comment.volt | 2 +- app/Http/Home/Views/article/edit.volt | 5 +- app/Http/Home/Views/chapter/comment.volt | 2 +- app/Http/Home/Views/chapter/read.volt | 14 ++- app/Http/Home/Views/chapter/resources.volt | 2 - app/Http/Home/Views/comment/list.volt | 2 +- app/Http/Home/Views/comment/replies.volt | 2 +- app/Http/Home/Views/question/edit.volt | 5 +- .../Home/Views/teacher/console/consults.volt | 2 +- app/Library/Helper.php | 4 +- app/Models/Upload.php | 1 + app/Providers/Cache.php | 1 - app/Services/Logic/Answer/AnswerInfo.php | 1 + app/Services/Logic/Article/ArticleInfo.php | 1 + app/Services/Logic/Chapter/BasicInfo.php | 12 ++ app/Services/Logic/Comment/CommentInfo.php | 3 + app/Services/Logic/Consult/ConsultInfo.php | 2 + app/Services/Logic/Course/BasicInfo.php | 4 + app/Services/Logic/Help/HelpInfo.php | 2 + app/Services/Logic/Package/PackageInfo.php | 4 + app/Services/Logic/Page/PageInfo.php | 2 + app/Services/Logic/Point/GiftInfo.php | 4 + app/Services/Logic/Question/QuestionInfo.php | 1 + app/Services/Logic/Review/ReviewInfo.php | 2 + app/Services/Logic/Topic/TopicInfo.php | 4 + app/Services/Logic/User/UserInfo.php | 1 + app/Services/MyStorage.php | 18 +-- app/Traits/Response.php | 17 +++ public/static/admin/css/common.css | 34 +++++- public/static/admin/js/chapter.resource.js | 4 +- public/static/admin/js/xm-course.js | 106 ------------------ public/static/home/css/common.css | 59 ++++------ public/static/home/css/markdown.css | 1 + public/static/home/js/common.js | 17 +++ public/static/home/js/markdown.preview.js | 20 ---- public/static/lib/jquery.buoyant.min.js | 2 + 66 files changed, 338 insertions(+), 260 deletions(-) delete mode 100644 public/static/admin/js/xm-course.js delete mode 100644 public/static/home/js/markdown.preview.js create mode 100644 public/static/lib/jquery.buoyant.min.js diff --git a/README.md b/README.md index ab93e614..0367f964 100644 --- a/README.md +++ b/README.md @@ -4,17 +4,17 @@ ### 项目介绍 -酷瓜云课堂,依托腾讯云基础服务架构,采用C扩展框架Phalcon开发,GPL-2.0开源协议,致力开源网课系统,开源网校系统,开源在线教育系统。 +酷瓜云课堂,依托腾讯云基础服务架构,采用C扩展框架Phalcon开发,GPL-2.0开源协议,致力开源网课系统,开源网校系统,开源知识付费系统,开源在线教育系统。 [![Gitee star](https://gitee.com/koogua/course-tencent-cloud/badge/star.svg?theme=gitee)](https://gitee.com/koogua/course-tencent-cloud) [![Gitee fork](https://gitee.com/koogua/course-tencent-cloud/badge/fork.svg?theme=gitee)](https://gitee.com/koogua/course-tencent-cloud) -[![Github stars](https://img.shields.io/github/stars/mindskip/xzs-mysql?logo=github)](https://github.com/xiaochong0302/course-tencent-cloud) -[![Github forks](https://img.shields.io/github/forks/mindskip/xzs-mysql?logo=github)](https://github.com/xiaochong0302/course-tencent-cloud) +[![Github stars](https://img.shields.io/github/stars/xiaochong0302/course-tencent-cloud?logo=github)](https://github.com/xiaochong0302/course-tencent-cloud) +[![Github forks](https://img.shields.io/github/forks/xiaochong0302/course-tencent-cloud?logo=github)](https://github.com/xiaochong0302/course-tencent-cloud) ![GPL-2.0](https://img.shields.io/static/v1?label=license&message=GPL-2.0&color=blue) ### 系统功能 -实现了点播、直播、专栏、面授、问答、会员、群组、积分、秒杀等,100%真开源在线教育解决方案。 +实现了点播、直播、专栏、面授、问答、会员、群组、微聊、积分、秒杀等。 友情提示: @@ -57,7 +57,7 @@ Tips: 请用手机注册一个新账号,用户中心 -> 关注订阅,扫码 ### 项目组件 - 后台框架:[phalcon 3.4.5](https://phalcon.io) -- 前端框架:[layui 2.5.6](https://layui.com), [layim 3.9.5](https://www.layui.com/layim)(已授权) +- 前端框架:[layui 2.6.8](https://layui.com), [layim 3.9.8](https://www.layui.com/layim)(已授权) - 全文检索:[xunsearch 1.4.9](http://www.xunsearch.com) - 即时通讯:[workerman 3.5.22](https://workerman.net) - 基础依赖:[php7.3](https://php.net), [mysql5.7](https://mysql.com), [redis5.0](https://redis.io) @@ -70,8 +70,8 @@ Tips: 请用手机注册一个新账号,用户中心 -> 关注订阅,扫码 ### 意见反馈 -- [在线反馈](https://gitee.com/koogua/course-tencent-cloud/issues)(推荐) -- [官方论坛](https://koogua.com/forum)(推荐) +- [码云平台](https://gitee.com/koogua/course-tencent-cloud/issues) +- [官方社区](https://koogua.com/community) - QQ交流群: 787363898 ### 有阿里云版吗? diff --git a/app/Caches/TopAnswererList.php b/app/Caches/TopAnswererList.php index 08555564..aa2f5225 100644 --- a/app/Caches/TopAnswererList.php +++ b/app/Caches/TopAnswererList.php @@ -25,7 +25,7 @@ class TopAnswererList extends Cache public function getKey($id = null) { - return 'question_top_answerer_list'; + return 'top_answerer_list'; } public function getContent($id = null) diff --git a/app/Console/Tasks/MaintainTask.php b/app/Console/Tasks/MaintainTask.php index df392491..dc67e75f 100644 --- a/app/Console/Tasks/MaintainTask.php +++ b/app/Console/Tasks/MaintainTask.php @@ -9,6 +9,7 @@ namespace App\Console\Tasks; use App\Http\Admin\Services\Setting as SettingService; use App\Library\Utils\Password as PasswordUtil; +use App\Models\ChapterVod as ChapterVodModel; use App\Services\Utils\IndexCourseCache as IndexCourseCacheUtil; use App\Validators\Account as AccountValidator; @@ -119,4 +120,28 @@ class MaintainTask extends Task echo '------ enable site success ------' . PHP_EOL; } + /** + * 清理点播转码缓存 + * + * @command: php console.php maintain clear_file_transcode + */ + public function clearFileTranscodeAction() + { + $chapterVodModel = new ChapterVodModel(); + + $tableName = $chapterVodModel->getSource(); + + $data = ['file_transcode' => '[]']; + + $fields = array_keys($data); + + $values = array_values($data); + + $where = ['conditions' => 'file_id > 0']; + + $this->db->update($tableName, $fields, $values, $where); + + echo '------ clear file transcode success ------' . PHP_EOL; + } + } diff --git a/app/Http/Admin/Controllers/IndexController.php b/app/Http/Admin/Controllers/IndexController.php index 7d861396..72710d48 100644 --- a/app/Http/Admin/Controllers/IndexController.php +++ b/app/Http/Admin/Controllers/IndexController.php @@ -26,9 +26,11 @@ class IndexController extends Controller $topMenus = $indexService->getTopMenus(); $leftMenus = $indexService->getLeftMenus(); $appInfo = $indexService->getAppInfo(); + $siteInfo = $indexService->getSiteInfo(); $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW); $this->view->setVar('app_info', $appInfo); + $this->view->setVar('site_info', $siteInfo); $this->view->setVar('top_menus', $topMenus); $this->view->setVar('left_menus', $leftMenus); } diff --git a/app/Http/Admin/Services/Index.php b/app/Http/Admin/Services/Index.php index 0fa5f7cc..b9d5bae3 100644 --- a/app/Http/Admin/Services/Index.php +++ b/app/Http/Admin/Services/Index.php @@ -47,6 +47,11 @@ class Index extends Service return $appInfo; } + public function getSiteInfo() + { + return $this->getSettings('site'); + } + public function getServerInfo() { return [ diff --git a/app/Http/Admin/Services/Tag.php b/app/Http/Admin/Services/Tag.php index 75a69c62..5317f8b3 100644 --- a/app/Http/Admin/Services/Tag.php +++ b/app/Http/Admin/Services/Tag.php @@ -67,7 +67,7 @@ class Tag extends Service if (isset($post['name'])) { $data['name'] = $validator->checkName($post['name']); - if ($data['name'] != $tag->name) { + if (strtolower($data['name']) != strtolower($tag->name)) { $validator->checkIfNameExists($data['name']); } } diff --git a/app/Http/Admin/Views/answer/list.volt b/app/Http/Admin/Views/answer/list.volt index d25b93b5..113b3510 100644 --- a/app/Http/Admin/Views/answer/list.volt +++ b/app/Http/Admin/Views/answer/list.volt @@ -4,6 +4,21 @@ {{ partial('macros/answer') }} + {% set search_url = url({'for':'admin.answer.search'}) %} + +
+
+ + 回答管理 + +
+ +
+ diff --git a/app/Http/Admin/Views/index/index.volt b/app/Http/Admin/Views/index/index.volt index fd48a48a..7fc4383a 100644 --- a/app/Http/Admin/Views/index/index.volt +++ b/app/Http/Admin/Views/index/index.volt @@ -13,7 +13,7 @@
- +
diff --git a/app/Http/Admin/Views/order/show.volt b/app/Http/Admin/Views/order/show.volt index 12f567ce..998f1322 100644 --- a/app/Http/Admin/Views/order/show.volt +++ b/app/Http/Admin/Views/order/show.volt @@ -10,7 +10,7 @@
- +
{% if refunds.count() > 0 %} diff --git a/app/Http/Admin/Views/public/login.volt b/app/Http/Admin/Views/public/login.volt index adcbcbc1..3e6f7e25 100644 --- a/app/Http/Admin/Views/public/login.volt +++ b/app/Http/Admin/Views/public/login.volt @@ -7,18 +7,16 @@