mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-07-16 05:12:19 +08:00
去除group残留
This commit is contained in:
parent
1093f52350
commit
fbcc721828
16
README.md
16
README.md
@ -6,10 +6,10 @@
|
||||
|
||||
酷瓜云课堂,依托腾讯云基础服务架构,采用C扩展框架Phalcon开发,GPL-2.0开源协议,致力开源网课系统,开源网校系统,开源知识付费系统,开源在线教育系统。
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
### 系统功能
|
||||
|
||||
@ -69,12 +69,12 @@ Tips: 请用手机注册一个新账号,用户中心 -> 关注订阅,扫码
|
||||
|
||||
### 项目文档
|
||||
|
||||
- [运行环境搭建](https://koogua.com/page/wiki)
|
||||
- [系统服务配置](https://koogua.com/page/wiki)
|
||||
- [客户终端配置](https://koogua.com/page/wiki)
|
||||
- [运行环境搭建](https://www.koogua.com/page/wiki)
|
||||
- [系统服务配置](https://www.koogua.com/page/wiki)
|
||||
- [客户终端配置](https://www.koogua.com/page/wiki)
|
||||
|
||||
### 意见反馈
|
||||
|
||||
- [码云平台](https://gitee.com/koogua/course-tencent-cloud/issues)
|
||||
- [官方社区](https://koogua.com/community)
|
||||
- [官方社区](https://www.koogua.com/community)
|
||||
- QQ交流群: 787363898
|
||||
|
@ -104,9 +104,6 @@ class CleanDemoDataTask extends Task
|
||||
$courseIndexTask = new CourseIndexTask();
|
||||
$courseIndexTask->cleanAction();
|
||||
|
||||
$groupIndexTask = new GroupIndexTask();
|
||||
$groupIndexTask->cleanAction();
|
||||
|
||||
$questionIndexTask = new QuestionIndexTask();
|
||||
$questionIndexTask->cleanAction();
|
||||
|
||||
|
@ -115,7 +115,7 @@ class Index extends Service
|
||||
|
||||
public function getReleases()
|
||||
{
|
||||
$url = 'https://koogua.com/api/releases';
|
||||
$url = 'https://www.koogua.com/api/releases';
|
||||
|
||||
$client = new Client();
|
||||
|
||||
|
@ -1,11 +0,0 @@
|
||||
{%- macro type_info(value) %}
|
||||
{% if value == 1 %}
|
||||
课程
|
||||
{% elseif value == 2 %}
|
||||
水吧
|
||||
{% elseif value == 3 %}
|
||||
职工
|
||||
{% else %}
|
||||
未知
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
@ -1,9 +0,0 @@
|
||||
{%- macro type_info(value) %}
|
||||
{% if value == 1 %}
|
||||
课程
|
||||
{% elseif value == 2 %}
|
||||
水吧
|
||||
{% elseif value == 3 %}
|
||||
职工
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
@ -14,9 +14,9 @@ class AppInfo
|
||||
|
||||
protected $alias = 'CTC';
|
||||
|
||||
protected $link = 'https://koogua.com';
|
||||
protected $link = 'https://www.koogua.com';
|
||||
|
||||
protected $version = '1.5.8';
|
||||
protected $version = '1.5.9';
|
||||
|
||||
public function __get($name)
|
||||
{
|
||||
|
@ -199,16 +199,6 @@ function kg_default_user_avatar_path()
|
||||
return '/img/default/user_avatar.png';
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取默认群组头像路径
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function kg_default_group_avatar_path()
|
||||
{
|
||||
return '/img/default/group_avatar.png';
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取默认课程封面路径
|
||||
*
|
||||
@ -315,20 +305,6 @@ function kg_cos_user_avatar_url($path, $style = null)
|
||||
return kg_cos_img_url($path, $style);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取群组头像URL
|
||||
*
|
||||
* @param string $path
|
||||
* @param string $style
|
||||
* @return string
|
||||
*/
|
||||
function kg_cos_group_avatar_url($path, $style = null)
|
||||
{
|
||||
$path = $path ?: kg_default_group_avatar_path();
|
||||
|
||||
return kg_cos_img_url($path, $style);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取课程封面URL
|
||||
*
|
||||
@ -442,7 +418,7 @@ function kg_clean_html($content)
|
||||
* @param int $length
|
||||
* @return string
|
||||
*/
|
||||
function kg_parse_summary($content, $length = 100)
|
||||
function kg_parse_summary($content, $length = 150)
|
||||
{
|
||||
$content = trim(strip_tags($content));
|
||||
|
||||
|
@ -95,15 +95,6 @@ class Notification extends Model
|
||||
const TYPE_ANSWER_COMMENTED = 227;
|
||||
const TYPE_ANSWER_LIKED = 228;
|
||||
|
||||
/* -------------- 微聊相关 -------------- */
|
||||
|
||||
const TYPE_FRIEND_REQUEST = 0; // 好友请求
|
||||
const TYPE_FRIEND_ACCEPTED = 0; // 好友被接受
|
||||
const TYPE_FRIEND_REFUSED = 0; // 好友被拒绝
|
||||
const TYPE_GROUP_REQUEST = 0; // 入群请求
|
||||
const TYPE_GROUP_ACCEPTED = 0; // 入群被接受
|
||||
const TYPE_GROUP_REFUSED = 0; // 入群被拒绝
|
||||
|
||||
/* -------------- 评论相关 -------------- */
|
||||
|
||||
const TYPE_COMMENT_CREATED = 500;
|
||||
|
@ -1,38 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2021 深圳市酷瓜软件有限公司
|
||||
* @license https://opensource.org/licenses/GPL-2.0
|
||||
* @link https://www.koogua.com
|
||||
*/
|
||||
|
||||
namespace App\Services\Sync;
|
||||
|
||||
use App\Services\Service;
|
||||
|
||||
class GroupIndex extends Service
|
||||
{
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $lifetime = 86400;
|
||||
|
||||
public function addItem($groupId)
|
||||
{
|
||||
$redis = $this->getRedis();
|
||||
|
||||
$key = $this->getSyncKey();
|
||||
|
||||
$redis->sAdd($key, $groupId);
|
||||
|
||||
if ($redis->sCard($key) == 1) {
|
||||
$redis->expire($key, $this->lifetime);
|
||||
}
|
||||
}
|
||||
|
||||
public function getSyncKey()
|
||||
{
|
||||
return 'sync_group_index';
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user