diff --git a/CHANGELOG.md b/CHANGELOG.md index 729de666..3e4e1fb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +### [v1.5.3](https://gitee.com/koogua/course-tencent-cloud/releases/v1.5.3)(2022-05-30) + +- 优化章节排序初始值和步长 +- 修复删除群组前台列表仍然显示问题 +- 设置360浏览器的默认模式为webkit +- 修复首页简单模式课程项顶部缺少空白 +- vditor本地化,彻底弃用cdn.jsdelivr.net +- 调整markdown样式 + ### [v1.5.2](https://gitee.com/koogua/course-tencent-cloud/releases/v1.5.2)(2022-04-17) - 补充话题列表课程数据结构 diff --git a/app/Http/Admin/Services/Chapter.php b/app/Http/Admin/Services/Chapter.php index 8af518a0..93c19241 100644 --- a/app/Http/Admin/Services/Chapter.php +++ b/app/Http/Admin/Services/Chapter.php @@ -81,7 +81,14 @@ class Chapter extends Service $data['parent_id'] = 0; } - $data['priority'] += 1; + /** + * 排序从10开始递增,步长为5 + */ + if ($data['priority'] < 10) { + $data['priority'] = 10; + } else { + $data['priority'] += 5; + } try { diff --git a/app/Http/Admin/Views/answer/add.volt b/app/Http/Admin/Views/answer/add.volt index f7c65072..a079013f 100644 --- a/app/Http/Admin/Views/answer/add.volt +++ b/app/Http/Admin/Views/answer/add.volt @@ -29,13 +29,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('admin/js/vditor.js') }} {% endblock %} \ No newline at end of file diff --git a/app/Http/Admin/Views/answer/edit.volt b/app/Http/Admin/Views/answer/edit.volt index 8469dd47..a1ffb0d7 100644 --- a/app/Http/Admin/Views/answer/edit.volt +++ b/app/Http/Admin/Views/answer/edit.volt @@ -28,13 +28,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('admin/js/vditor.js') }} {% endblock %} \ No newline at end of file diff --git a/app/Http/Admin/Views/article/edit.volt b/app/Http/Admin/Views/article/edit.volt index dc9fa67f..fa9a2ed2 100644 --- a/app/Http/Admin/Views/article/edit.volt +++ b/app/Http/Admin/Views/article/edit.volt @@ -25,13 +25,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('lib/xm-select.js') }} {{ js_include('admin/js/vditor.js') }} diff --git a/app/Http/Admin/Views/chapter/edit_lesson.volt b/app/Http/Admin/Views/chapter/edit_lesson.volt index b42b75d6..95e105fe 100644 --- a/app/Http/Admin/Views/chapter/edit_lesson.volt +++ b/app/Http/Admin/Views/chapter/edit_lesson.volt @@ -50,7 +50,7 @@ {% block link_css %} {% if chapter.model == 3 %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endif %} {% endblock %} @@ -59,7 +59,7 @@ {% if chapter.model == 3 %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('admin/js/vditor.js') }} {% elseif chapter.model == 1 %} diff --git a/app/Http/Admin/Views/course/edit.volt b/app/Http/Admin/Views/course/edit.volt index a8dc5e15..0e69eb69 100644 --- a/app/Http/Admin/Views/course/edit.volt +++ b/app/Http/Admin/Views/course/edit.volt @@ -41,13 +41,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('lib/xm-select.js') }} {{ js_include('admin/js/cover.upload.js') }} {{ js_include('admin/js/vditor.js') }} diff --git a/app/Http/Admin/Views/help/add.volt b/app/Http/Admin/Views/help/add.volt index 947a986d..97a2ffb8 100644 --- a/app/Http/Admin/Views/help/add.volt +++ b/app/Http/Admin/Views/help/add.volt @@ -49,13 +49,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('admin/js/vditor.js') }} {% endblock %} \ No newline at end of file diff --git a/app/Http/Admin/Views/help/edit.volt b/app/Http/Admin/Views/help/edit.volt index f084dc67..0814280e 100644 --- a/app/Http/Admin/Views/help/edit.volt +++ b/app/Http/Admin/Views/help/edit.volt @@ -56,13 +56,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('admin/js/vditor.js') }} {% endblock %} \ No newline at end of file diff --git a/app/Http/Admin/Views/page/add.volt b/app/Http/Admin/Views/page/add.volt index 1447d34f..2cdde8ec 100644 --- a/app/Http/Admin/Views/page/add.volt +++ b/app/Http/Admin/Views/page/add.volt @@ -32,13 +32,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('admin/js/vditor.js') }} {% endblock %} \ No newline at end of file diff --git a/app/Http/Admin/Views/page/edit.volt b/app/Http/Admin/Views/page/edit.volt index 9b3b6c26..89033574 100644 --- a/app/Http/Admin/Views/page/edit.volt +++ b/app/Http/Admin/Views/page/edit.volt @@ -45,13 +45,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('admin/js/vditor.js') }} {% endblock %} \ No newline at end of file diff --git a/app/Http/Admin/Views/point_gift/edit.volt b/app/Http/Admin/Views/point_gift/edit.volt index 6d0494e6..3ad9cc69 100644 --- a/app/Http/Admin/Views/point_gift/edit.volt +++ b/app/Http/Admin/Views/point_gift/edit.volt @@ -15,7 +15,7 @@ {% block link_css %} {% if gift.type == 2 %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endif %} {% endblock %} @@ -23,7 +23,7 @@ {% block include_js %} {% if gift.type == 2 %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('admin/js/cover.upload.js') }} {{ js_include('admin/js/vditor.js') }} {% endif %} diff --git a/app/Http/Admin/Views/question/edit.volt b/app/Http/Admin/Views/question/edit.volt index 9158bf95..e779efe2 100644 --- a/app/Http/Admin/Views/question/edit.volt +++ b/app/Http/Admin/Views/question/edit.volt @@ -25,13 +25,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('lib/xm-select.js') }} {{ js_include('admin/js/vditor.js') }} diff --git a/app/Http/Admin/Views/templates/layer.volt b/app/Http/Admin/Views/templates/layer.volt index 529288fe..94df5bae 100644 --- a/app/Http/Admin/Views/templates/layer.volt +++ b/app/Http/Admin/Views/templates/layer.volt @@ -4,6 +4,7 @@ + 管理后台 {{ icon_link('favicon.ico') }} diff --git a/app/Http/Admin/Views/templates/main.volt b/app/Http/Admin/Views/templates/main.volt index e3731f2a..a4a8a8ea 100644 --- a/app/Http/Admin/Views/templates/main.volt +++ b/app/Http/Admin/Views/templates/main.volt @@ -4,6 +4,7 @@ + 管理后台 {{ icon_link('favicon.ico') }} diff --git a/app/Http/Home/Services/ImGroup.php b/app/Http/Home/Services/ImGroup.php index 430f76ff..2598a727 100644 --- a/app/Http/Home/Services/ImGroup.php +++ b/app/Http/Home/Services/ImGroup.php @@ -27,6 +27,7 @@ class ImGroup extends Service $params = $pagerQuery->getParams(); $params['published'] = 1; + $params['deleted'] = 0; $sort = $pagerQuery->getSort(); $page = $pagerQuery->getPage(); diff --git a/app/Http/Home/Views/answer/add.volt b/app/Http/Home/Views/answer/add.volt index 67bc707e..0e48c824 100644 --- a/app/Http/Home/Views/answer/add.volt +++ b/app/Http/Home/Views/answer/add.volt @@ -41,13 +41,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('home/js/answer.edit.js') }} {{ js_include('home/js/vditor.js') }} diff --git a/app/Http/Home/Views/answer/edit.volt b/app/Http/Home/Views/answer/edit.volt index 8bab1356..db5354da 100644 --- a/app/Http/Home/Views/answer/edit.volt +++ b/app/Http/Home/Views/answer/edit.volt @@ -36,13 +36,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('home/js/answer.edit.js') }} {{ js_include('home/js/vditor.js') }} diff --git a/app/Http/Home/Views/article/edit.volt b/app/Http/Home/Views/article/edit.volt index 4e13cee7..809ade16 100644 --- a/app/Http/Home/Views/article/edit.volt +++ b/app/Http/Home/Views/article/edit.volt @@ -76,13 +76,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('lib/xm-select.js') }} {{ js_include('home/js/article.edit.js') }} {{ js_include('home/js/vditor.js') }} diff --git a/app/Http/Home/Views/index/simple.volt b/app/Http/Home/Views/index/simple.volt index b788a2a5..ac0c578d 100644 --- a/app/Http/Home/Views/index/simple.volt +++ b/app/Http/Home/Views/index/simple.volt @@ -35,7 +35,7 @@ {% if featured_courses|length > 0 %}
推荐课程
-
+
{{ show_courses(featured_courses) }}
@@ -44,7 +44,7 @@ {% if new_courses|length > 0 %}
新上课程
-
+
{{ show_courses(new_courses) }}
@@ -62,7 +62,7 @@ {% if vip_courses|length > 0 %}
会员课程
-
+
{{ show_courses(vip_courses) }}
diff --git a/app/Http/Home/Views/question/edit.volt b/app/Http/Home/Views/question/edit.volt index 9937e879..025188b2 100644 --- a/app/Http/Home/Views/question/edit.volt +++ b/app/Http/Home/Views/question/edit.volt @@ -56,13 +56,13 @@ {% block link_css %} - {{ css_link('https://cdn.staticfile.org/vditor/3.8.13/index.css', false) }} + {{ css_link('lib/vditor/dist/index.css') }} {% endblock %} {% block include_js %} - {{ js_include('https://cdn.staticfile.org/vditor/3.8.13/index.min.js', false) }} + {{ js_include('lib/vditor/dist/index.min.js') }} {{ js_include('lib/xm-select.js') }} {{ js_include('home/js/question.edit.js') }} {{ js_include('home/js/vditor.js') }} diff --git a/app/Http/Home/Views/templates/error.volt b/app/Http/Home/Views/templates/error.volt index 97bc86a7..89b7d25e 100644 --- a/app/Http/Home/Views/templates/error.volt +++ b/app/Http/Home/Views/templates/error.volt @@ -4,6 +4,7 @@ + 出错啦 - {{ site_info.title }} {% if site_info.favicon %} {{ icon_link(site_info.favicon,false) }} diff --git a/app/Http/Home/Views/templates/layer.volt b/app/Http/Home/Views/templates/layer.volt index 2ab29e47..0669b1a7 100644 --- a/app/Http/Home/Views/templates/layer.volt +++ b/app/Http/Home/Views/templates/layer.volt @@ -4,6 +4,7 @@ + {{ site_info.title }} {% if site_info.favicon %} diff --git a/app/Http/Home/Views/templates/main.volt b/app/Http/Home/Views/templates/main.volt index 0eb3c2e7..704172a6 100644 --- a/app/Http/Home/Views/templates/main.volt +++ b/app/Http/Home/Views/templates/main.volt @@ -4,6 +4,7 @@ + diff --git a/app/Models/Category.php b/app/Models/Category.php index 8b182ef5..29397dd1 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -83,7 +83,7 @@ class Category extends Model * * @var int */ - public $priority = 100; + public $priority = 10; /** * 发布标识 diff --git a/app/Models/Chapter.php b/app/Models/Chapter.php index 07a19a2c..ac4d1189 100644 --- a/app/Models/Chapter.php +++ b/app/Models/Chapter.php @@ -110,7 +110,7 @@ class Chapter extends Model * * @var int */ - public $priority = 100; + public $priority = 10; /** * 免费标识 diff --git a/app/Models/FlashSale.php b/app/Models/FlashSale.php index e82eeab0..f8316c5d 100644 --- a/app/Models/FlashSale.php +++ b/app/Models/FlashSale.php @@ -180,7 +180,7 @@ class FlashSale extends Model { $result = []; - foreach (range(8, 20, 2) as $hour) { + foreach (range(10, 20, 2) as $hour) { $result[] = [ 'name' => sprintf('%02d点', $hour), 'hour' => sprintf('%02d', $hour), diff --git a/app/Models/Help.php b/app/Models/Help.php index 75226fde..7886e2dd 100644 --- a/app/Models/Help.php +++ b/app/Models/Help.php @@ -46,7 +46,7 @@ class Help extends Model * * @var int */ - public $priority = 100; + public $priority = 10; /** * 发布标识 diff --git a/app/Repos/Chapter.php b/app/Repos/Chapter.php index 57b652cd..e98fcc62 100644 --- a/app/Repos/Chapter.php +++ b/app/Repos/Chapter.php @@ -50,6 +50,8 @@ class Chapter extends Repository $query->andWhere('deleted = :deleted:', ['deleted' => $where['deleted']]); } + $query->orderBy('priority ASC'); + return $query->execute(); } @@ -87,6 +89,7 @@ class Chapter extends Repository return ChapterModel::query() ->where('parent_id = :parent_id:', ['parent_id' => $id]) ->andWhere('deleted = 0') + ->orderBy('priority ASC') ->execute(); } diff --git a/app/Services/Logic/Im/GroupList.php b/app/Services/Logic/Im/GroupList.php index 3246092a..34f70169 100644 --- a/app/Services/Logic/Im/GroupList.php +++ b/app/Services/Logic/Im/GroupList.php @@ -22,6 +22,7 @@ class GroupList extends LogicService $params = $pagerQuery->getParams(); $params['published'] = 1; + $params['deleted'] = 0; $sort = $pagerQuery->getSort(); $page = $pagerQuery->getPage(); diff --git a/public/static/home/css/common.css b/public/static/home/css/common.css index 8c93a398..8e93579c 100644 --- a/public/static/home/css/common.css +++ b/public/static/home/css/common.css @@ -302,7 +302,7 @@ } .index-wrap .layui-tab-content { - padding: 20px 0 0 0; + padding-top: 20px; } .index-wrap .header { @@ -312,6 +312,10 @@ border-bottom: 1px solid #f6f6f6; } +.index-wrap .simple { + padding-top: 20px; +} + .index-course-list .course-card { box-shadow: none; } diff --git a/public/static/home/css/markdown.css b/public/static/home/css/markdown.css index 706bf95d..a42279f2 100644 --- a/public/static/home/css/markdown.css +++ b/public/static/home/css/markdown.css @@ -60,7 +60,7 @@ .markdown-body { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; - line-height: 1.5; + line-height: 1.8; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji; font-size: 14px;