From c8b96ec4acd51918fdc6c4e886eada93386cebc1 Mon Sep 17 00:00:00 2001 From: xiaochong0302 Date: Tue, 24 Nov 2020 20:44:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4Mobile=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8DAPI=E8=AF=B7=E6=B1=82=E7=AB=A0?= =?UTF-8?q?=E8=8A=82=E4=BF=A1=E6=81=AF=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 5 --- README.md | 32 +++++---------- .../Api/Controllers/ChapterController.php | 6 +++ app/Http/Home/Controllers/IndexController.php | 2 - app/Http/Home/Views/chapter/catalog.volt | 3 +- app/Http/Home/Views/chapter/live/active.volt | 1 - app/Http/Home/Views/chapter/live/forbid.volt | 1 - .../Home/Views/chapter/live/inactive.volt | 1 - app/Http/Home/Views/chapter/read.volt | 1 - app/Http/Home/Views/chapter/vod.volt | 1 - app/Http/Mobile/Controllers/Controller.php | 20 ---------- .../Mobile/Controllers/IndexController.php | 40 ------------------- .../Mobile/Controllers/PublicController.php | 14 ------- app/Http/Mobile/Module.php | 31 -------------- app/Http/Mobile/Services/Login.php | 29 -------------- app/Http/Mobile/Services/Logout.php | 18 --------- app/Http/Mobile/Services/Service.php | 8 ---- app/Services/Logic/Consult/ConsultCreate.php | 1 + app/Services/Logic/Consult/ConsultDelete.php | 18 ++++++--- app/Services/Logic/Review/ReviewCreate.php | 6 +-- app/Services/Logic/Review/ReviewDelete.php | 6 +-- app/Services/Logic/Review/ReviewUpdate.php | 7 ++-- bootstrap/HttpKernel.php | 4 -- 23 files changed, 41 insertions(+), 214 deletions(-) delete mode 100644 LICENSE delete mode 100644 app/Http/Mobile/Controllers/Controller.php delete mode 100644 app/Http/Mobile/Controllers/IndexController.php delete mode 100644 app/Http/Mobile/Controllers/PublicController.php delete mode 100644 app/Http/Mobile/Module.php delete mode 100644 app/Http/Mobile/Services/Login.php delete mode 100644 app/Http/Mobile/Services/Logout.php delete mode 100644 app/Http/Mobile/Services/Service.php diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 1afa4e89..00000000 --- a/LICENSE +++ /dev/null @@ -1,5 +0,0 @@ -使用协议 - -1. 本系统属于强业务类型,非通用类库框架,不适合再次衍生发布。 -2. 在保留我们版权标识的前提下,用户可以修改以满足自己的需求,可以用于商业用途。 -3. 有限社区支持,用户对自己的行为负责。 \ No newline at end of file diff --git a/README.md b/README.md index abfadbd8..8e45f66a 100644 --- a/README.md +++ b/README.md @@ -2,23 +2,27 @@ #### 项目介绍 -酷瓜云课堂,依托腾讯云基础服务架构,采用 C 扩展框架 Phalcon 开发,致力网络教育软件。 +酷瓜云课堂,依托腾讯云基础服务架构,采用C扩展PHP框架Phalcon开发,致力开源网课系统,开源网校系统,开源在线教育系统。 #### 系统功能 实现了点播、直播、专栏、会员、微聊等,是一个完整的产品,具体功能我也不想写一大堆,自己体验吧! -- [前台演示](https://ctc.koogua.com) -- [后台演示](https://ctc.koogua.com/admin) - -帐号:100015@163.com / 123456 (前后台通用) - 友情提示: - 系统配置低(1核 1G 1M 跑多个容器),切莫压测 - 课程数据来源于网络(无实质内容),切莫购买 - 管理后台已禁止数据提交,私密配置已过滤 +演示帐号:100015@163.com / 123456 (前后台通用) + +- [前台演示](https://ctc.koogua.com) +- [后台演示](https://ctc.koogua.com/admin) + +移动端演示: + +![移动端扫码演示](https://upload-images.jianshu.io/upload_images/326350-83444e0bbe14db9f.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) + #### 项目组件 - 后台框架:[phalcon 3.4.5](https://phalcon.io) @@ -27,14 +31,6 @@ - 即时通讯:[workerman 3.5.22](https://workerman.net) - 基础依赖:[php7.3](https://php.net), [mysql5.7](https://mysql.com), [redis5.0](https://redis.io) -#### 使用协议 - -虽然尝试了解过开源协议,但是理解的模棱两可,干脆用自己的协议吧。 - -1. 本系统属于强业务类型,非通用类库框架,不适合再次衍生发布。 -2. 在保留我们版权标识的前提下,用户可以修改以满足自己的需求,可以用于商业用途。 -3. 有限社区支持,用户对自己的行为负责。 - #### 安装指南 - [运行环境搭建](https://gitee.com/koogua/course-tencent-cloud-docker) @@ -43,7 +39,7 @@ #### 开发计划 - 桌面端:进行中 -- 移动端:待启动 +- 移动端:进行中 - 小程序:待启动 #### 意见反馈 @@ -52,12 +48,6 @@ - QQ邮箱: 76632555@qq.com - QQ群组: 787363898 -#### 加入我们 - -这是一个创业项目,个人能力和精力有限,要兼顾产品规划以及开发,还要处理很多琐碎事情。目前在南山科技园某个众创空间,希望有 **深圳前端同学** 加入我们。 - -联系邮箱:76632555@qq.com - #### 通过这个项目能学到什么? - 项目规划,phalcon,缓存,JWT,即时通讯,全文检索 diff --git a/app/Http/Api/Controllers/ChapterController.php b/app/Http/Api/Controllers/ChapterController.php index 1897b9d1..d990ac62 100644 --- a/app/Http/Api/Controllers/ChapterController.php +++ b/app/Http/Api/Controllers/ChapterController.php @@ -47,6 +47,12 @@ class ChapterController extends Controller $chapter = $service->handle($id); + $owned = $chapter['me']['owned'] ?? false; + + if (!$owned) { + return $this->jsonError(['msg' => '没有访问章节权限']); + } + return $this->jsonSuccess(['chapter' => $chapter]); } diff --git a/app/Http/Home/Controllers/IndexController.php b/app/Http/Home/Controllers/IndexController.php index 82430cfd..ea099b71 100644 --- a/app/Http/Home/Controllers/IndexController.php +++ b/app/Http/Home/Controllers/IndexController.php @@ -44,8 +44,6 @@ class IndexController extends Controller { $service = new IndexService(); - dd($service->getLives()); - $this->view->pick('index/full'); $this->view->setVar('lives', $service->getLives()); $this->view->setVar('slides', $service->getSlides()); diff --git a/app/Http/Home/Views/chapter/catalog.volt b/app/Http/Home/Views/chapter/catalog.volt index 71105da9..9625d784 100644 --- a/app/Http/Home/Views/chapter/catalog.volt +++ b/app/Http/Home/Views/chapter/catalog.volt @@ -7,11 +7,10 @@