1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-30 22:24:55 +08:00
* 1:更新ip2region,php-cron-scheduler包
2:替换phpqrcode
3:移除lcobucci/jwt

* 后台接入产品动态,相关链接指向官网

* 升级composer依赖包

* v1.2.5阶段新合并

Co-authored-by: winzer <winzer9527@163.com>
This commit is contained in:
jacky huang 2021-01-21 17:47:40 +08:00 committed by GitHub
parent 4d2f97ed33
commit 87db0d0569
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 2974 additions and 1977 deletions

View File

@ -1,3 +1,20 @@
### [v1.2.5](https://gitee.com/koogua/course-tencent-cloud/releases/v1.2.5)(2021-01-20)
### 新增
- 自动化安装脚本
- 自动化更新脚本
- 自动化备份脚本
### 更新
- 更新ip2region包
- 更新php-cron-scheduler包
- 替换aferrandini/phpqrcode为endroid/qr-code
- 替换joyqi/hyper-down为league/commonmark
- 移除lcobucci/jwt包
- 相关连接指向官网
### [v1.2.4](https://gitee.com/koogua/course-tencent-cloud/releases/v1.2.4)(2021-01-10) ### [v1.2.4](https://gitee.com/koogua/course-tencent-cloud/releases/v1.2.4)(2021-01-10)
#### 增加 #### 增加

View File

@ -6,10 +6,11 @@
酷瓜云课堂依托腾讯云基础服务架构采用C扩展框架Phalcon开发GPL-2.0开源协议,致力开源网课系统,开源网校系统,开源在线教育系统。 酷瓜云课堂依托腾讯云基础服务架构采用C扩展框架Phalcon开发GPL-2.0开源协议,致力开源网课系统,开源网校系统,开源在线教育系统。
![](https://img.shields.io/static/v1?label=release&message=1.2.4&color=blue) [![Gitee star](https://gitee.com/koogua/course-tencent-cloud/badge/star.svg?theme=gitee)](https://gitee.com/koogua/course-tencent-cloud)
![](https://img.shields.io/static/v1?label=stars&message=170&color=blue) [![Gitee fork](https://gitee.com/koogua/course-tencent-cloud/badge/fork.svg?theme=gitee)](https://gitee.com/koogua/course-tencent-cloud)
![](https://img.shields.io/static/v1?label=forks&message=66&color=blue) [![Github stars](https://img.shields.io/github/stars/mindskip/xzs-mysql?logo=github)](https://github.com/xiaochong0302/course-tencent-cloud)
![](https://img.shields.io/static/v1?label=license&message=GPL-2.0&color=blue) [![Github forks](https://img.shields.io/github/forks/mindskip/xzs-mysql?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)
### 系统功能 ### 系统功能

View File

@ -60,11 +60,11 @@ class CourseIndexTask extends Task
$index = $handler->getXS()->getIndex(); $index = $handler->getXS()->getIndex();
echo 'start clean index' . PHP_EOL; echo 'start clean course index' . PHP_EOL;
$index->clean(); $index->clean();
echo 'end clean index' . PHP_EOL; echo 'end clean course index' . PHP_EOL;
} }
/** /**
@ -82,7 +82,7 @@ class CourseIndexTask extends Task
$index = $handler->getXS()->getIndex(); $index = $handler->getXS()->getIndex();
echo 'start rebuild index' . PHP_EOL; echo 'start rebuild course index' . PHP_EOL;
$index->beginRebuild(); $index->beginRebuild();
@ -93,7 +93,7 @@ class CourseIndexTask extends Task
$index->endRebuild(); $index->endRebuild();
echo 'end rebuild index' . PHP_EOL; echo 'end rebuild course index' . PHP_EOL;
} }
/** /**

View File

@ -60,11 +60,11 @@ class GroupIndexTask extends Task
$index = $handler->getXS()->getIndex(); $index = $handler->getXS()->getIndex();
echo 'start clean index' . PHP_EOL; echo 'start clean group index' . PHP_EOL;
$index->clean(); $index->clean();
echo 'end clean index' . PHP_EOL; echo 'end clean group index' . PHP_EOL;
} }
/** /**
@ -82,7 +82,7 @@ class GroupIndexTask extends Task
$index = $handler->getXS()->getIndex(); $index = $handler->getXS()->getIndex();
echo 'start rebuild index' . PHP_EOL; echo 'start rebuild group index' . PHP_EOL;
$index->beginRebuild(); $index->beginRebuild();
@ -93,7 +93,7 @@ class GroupIndexTask extends Task
$index->endRebuild(); $index->endRebuild();
echo 'end rebuild index' . PHP_EOL; echo 'end rebuild group index' . PHP_EOL;
} }
/** /**

View File

@ -60,11 +60,11 @@ class UserIndexTask extends Task
$index = $handler->getXS()->getIndex(); $index = $handler->getXS()->getIndex();
echo 'start clean index' . PHP_EOL; echo 'start clean user index' . PHP_EOL;
$index->clean(); $index->clean();
echo 'end clean index' . PHP_EOL; echo 'end clean user index' . PHP_EOL;
} }
/** /**
@ -82,7 +82,7 @@ class UserIndexTask extends Task
$index = $handler->getXS()->getIndex(); $index = $handler->getXS()->getIndex();
echo 'start rebuild index' . PHP_EOL; echo 'start rebuild user index' . PHP_EOL;
$index->beginRebuild(); $index->beginRebuild();
@ -93,7 +93,7 @@ class UserIndexTask extends Task
$index->endRebuild(); $index->endRebuild();
echo 'end rebuild index' . PHP_EOL; echo 'end rebuild user index' . PHP_EOL;
} }
/** /**

View File

@ -39,11 +39,13 @@ class IndexController extends Controller
$todayStat = $indexService->getTodayStat(); $todayStat = $indexService->getTodayStat();
$appInfo = $indexService->getAppInfo(); $appInfo = $indexService->getAppInfo();
$serverInfo = $indexService->getServerInfo(); $serverInfo = $indexService->getServerInfo();
$releases = $indexService->getReleases();
$this->view->setVar('global_stat', $globalStat); $this->view->setVar('global_stat', $globalStat);
$this->view->setVar('today_stat', $todayStat); $this->view->setVar('today_stat', $todayStat);
$this->view->setVar('app_info', $appInfo); $this->view->setVar('app_info', $appInfo);
$this->view->setVar('server_info', $serverInfo); $this->view->setVar('server_info', $serverInfo);
$this->view->setVar('releases', $releases);
} }
/** /**

View File

@ -6,6 +6,7 @@ use App\Caches\SiteGlobalStat;
use App\Caches\SiteTodayStat; use App\Caches\SiteTodayStat;
use App\Library\AppInfo; use App\Library\AppInfo;
use App\Library\Utils\ServerInfo; use App\Library\Utils\ServerInfo;
use GuzzleHttp\Client;
class Index extends Service class Index extends Service
{ {
@ -52,4 +53,17 @@ class Index extends Service
return $cache->get(); return $cache->get();
} }
public function getReleases()
{
$url = 'https://koogua.com/api-releases.json';
$client = new Client();
$response = $client->get($url, ['timeout' => 3]);
$content = json_decode($response->getBody(), true);
return $content['releases'] ?? [];
}
} }

View File

@ -63,7 +63,7 @@
<iframe name="content" style="width:100%;height:100%;border:0;" src="{{ url({'for':'admin.main'}) }}"></iframe> <iframe name="content" style="width:100%;height:100%;border:0;" src="{{ url({'for':'admin.main'}) }}"></iframe>
</div> </div>
<div class="layui-copyright"> <div class="layui-copyright">
Powered by <a href="{{ app_info.link }}" title="{{ app_info.name }}">{{ app_info.alias }} {{ app_info.version }}</a> Powered by <a href="{{ app_info.link }}" title="{{ app_info.name }}" target="_blank">{{ app_info.alias }} {{ app_info.version }}</a>
</div> </div>
</div> </div>
</body> </body>

View File

@ -13,7 +13,7 @@
</tr> </tr>
<tr> <tr>
<td>系统框架</td> <td>系统框架</td>
<td><a href="https://gitee.com/koogua/cphalcon">Phalcon 3.4.5</a></td> <td><a href="https://gitee.com/koogua/cphalcon/releases/v3.4.5.1" target="_blank">Phalcon 3.4.5</a></td>
</tr> </tr>
<tr> <tr>
<td>获取渠道</td> <td>获取渠道</td>

View File

@ -1,6 +1,19 @@
<div class="layui-card layui-text"> <div class="layui-card layui-text">
<div class="layui-card-header">产品动态</div> <div class="layui-card-header">产品动态</div>
<div class="layui-card-body"> <div class="layui-card-body">
<table class="layui-table">
<colgroup>
<col width="80%">
<col>
</colgroup>
<tbody>
{% for release in releases %}
<tr>
<td><a href="{{ release.url }}" target="_blank">{{ release.title }}</a></td>
<td>{{ release.date }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div> </div>
</div> </div>

View File

@ -9,7 +9,7 @@
<tbody> <tbody>
<tr> <tr>
<td>版权所有</td> <td>版权所有</td>
<td><a href="http://koogua.com">深圳市酷瓜软件有限公司</a></td> <td><a href="https://koogua.com" target="_blank">深圳市酷瓜软件有限公司</a></td>
</tr> </tr>
<tr> <tr>
<td>产品经理</td> <td>产品经理</td>

View File

@ -10,7 +10,7 @@ use App\Services\Pay\Wxpay as WxpayService;
use App\Services\Storage as StorageService; use App\Services\Storage as StorageService;
use App\Traits\Response as ResponseTrait; use App\Traits\Response as ResponseTrait;
use App\Traits\Security as SecurityTrait; use App\Traits\Security as SecurityTrait;
use PHPQRCode\QRcode; use Endroid\QrCode\QrCode;
class PublicController extends \Phalcon\Mvc\Controller class PublicController extends \Phalcon\Mvc\Controller
{ {
@ -49,14 +49,17 @@ class PublicController extends \Phalcon\Mvc\Controller
public function qrcodeAction() public function qrcodeAction()
{ {
$text = $this->request->getQuery('text', 'string'); $text = $this->request->getQuery('text', 'string');
$level = $this->request->getQuery('level', 'int', 0); $size = $this->request->getQuery('size', 'int', 320);
$size = $this->request->getQuery('size', 'int', 5);
$url = urldecode($text); $text = urldecode($text);
QRcode::png($url, false, $level, $size); $qrCode = new QrCode($text);
$this->response->send(); $qrCode->setSize($size);
$qrCode->getContentType();
echo $qrCode->writeString();
exit; exit;
} }

View File

@ -9,12 +9,12 @@
{% if site_info.copyright %} {% if site_info.copyright %}
<span>&copy; {{ site_info.copyright }}</span> <span>&copy; {{ site_info.copyright }}</span>
{% endif %} {% endif %}
<a href="{{ app_info.link }}" title="{{ app_info.name }}">Powered by {{ app_info.alias }} {{ app_info.version }}</a> <a href="{{ app_info.link }}" title="{{ app_info.name }}" target="_blank">Powered by {{ app_info.alias }} {{ app_info.version }}</a>
{% if site_info.icp_sn %} {% if site_info.icp_sn %}
<a href="{{ site_info.icp_link }}">{{ site_info.icp_sn }}</a> <a href="{{ site_info.icp_link }}" target="_blank">{{ site_info.icp_sn }}</a>
{% endif %} {% endif %}
{% if site_info.police_sn %} {% if site_info.police_sn %}
<a href="{{ site_info.police_link }}">{{ site_info.police_sn }}</a> <a href="{{ site_info.police_link }}" target="_blank">{{ site_info.police_sn }}</a>
{% endif %} {% endif %}
</div> </div>
</div> </div>

View File

@ -9,9 +9,9 @@ class AppInfo
protected $alias = 'CTC'; protected $alias = 'CTC';
protected $link = 'https://gitee.com/koogua'; protected $link = 'https://koogua.com';
protected $version = '1.2.4'; protected $version = '1.2.5';
public function __get($name) public function __get($name)
{ {

View File

@ -281,9 +281,12 @@ function kg_parse_markdown($content)
return sprintf('/img/content/%s!content_800)', trim($matches[1])); return sprintf('/img/content/%s!content_800)', trim($matches[1]));
}, $content); }, $content);
$parser = new HyperDown\Parser(); $parser = new League\CommonMark\GithubFlavoredMarkdownConverter([
'html_input' => 'strip',
'allow_unsafe_links' => false,
]);
return $parser->makeHtml($content); return $parser->convertToHtml($content);
} }
/** /**

View File

@ -8,7 +8,7 @@
"phalcon/incubator": "^3.4", "phalcon/incubator": "^3.4",
"guzzlehttp/guzzle": "^6.3", "guzzlehttp/guzzle": "^6.3",
"swiftmailer/swiftmailer": "^6.0", "swiftmailer/swiftmailer": "^6.0",
"peppeocchi/php-cron-scheduler": "^2.4", "peppeocchi/php-cron-scheduler": "^3.0",
"yansongda/pay": "^2.9", "yansongda/pay": "^2.9",
"tencentcloud/tencentcloud-sdk-php": "^3.0", "tencentcloud/tencentcloud-sdk-php": "^3.0",
"qcloudsms/qcloudsms_php": "^0.1", "qcloudsms/qcloudsms_php": "^0.1",
@ -17,12 +17,11 @@
"workerman/gatewayclient": "^3.0", "workerman/gatewayclient": "^3.0",
"whichbrowser/parser": "^2.0", "whichbrowser/parser": "^2.0",
"hightman/xunsearch": "^1.4", "hightman/xunsearch": "^1.4",
"aferrandini/phpqrcode": "1.0.1",
"xiaochong0302/ip2region": "^1.0", "xiaochong0302/ip2region": "^1.0",
"robmorgan/phinx": "^0.12", "robmorgan/phinx": "^0.12",
"lcobucci/jwt": "^3.3",
"overtrue/wechat": "^4.2", "overtrue/wechat": "^4.2",
"joyqi/hyper-down": "dev-master" "endroid/qr-code": "^3.9",
"league/commonmark": "^1.5"
}, },
"require-dev": { "require-dev": {
"odan/phinx-migrations-generator": "^5.3", "odan/phinx-migrations-generator": "^5.3",

1979
composer.lock generated

File diff suppressed because it is too large Load Diff