+
diff --git a/app/Http/Home/Views/macros/course.volt b/app/Http/Home/Views/macros/course.volt
index f25643db..e6f7dfa9 100644
--- a/app/Http/Home/Views/macros/course.volt
+++ b/app/Http/Home/Views/macros/course.volt
@@ -4,7 +4,7 @@
{% elseif value == '2' %}
直播
{% elseif value == '3' %}
-
图文
+
专栏
{% endif %}
{%- endmacro %}
diff --git a/app/Models/ChapterLive.php b/app/Models/ChapterLive.php
index d7c587d1..b31a2203 100644
--- a/app/Models/ChapterLive.php
+++ b/app/Models/ChapterLive.php
@@ -92,4 +92,14 @@ class ChapterLive extends Model
$this->update_time = time();
}
+ public static function generateStreamName($id)
+ {
+ return "chapter_{$id}";
+ }
+
+ public static function parseFromStreamName($streamName)
+ {
+ return str_replace('chapter_', '', $streamName);
+ }
+
}
diff --git a/app/Services/LiveNotify.php b/app/Services/LiveNotify.php
index 051172d4..ef1fd11d 100644
--- a/app/Services/LiveNotify.php
+++ b/app/Services/LiveNotify.php
@@ -137,9 +137,9 @@ class LiveNotify extends Service
$redis->expire($key, 86400);
}
- protected function getChapter($streamId)
+ protected function getChapter($streamName)
{
- $id = str_replace('chapter_', '', $streamId);
+ $id = ChapterLiveModel::parseFromStreamName($streamName);
$chapterRepo = new ChapterRepo();
diff --git a/app/Services/Logic/Chapter/BasicInfo.php b/app/Services/Logic/Chapter/BasicInfo.php
index e5f66dab..f86ddc86 100644
--- a/app/Services/Logic/Chapter/BasicInfo.php
+++ b/app/Services/Logic/Chapter/BasicInfo.php
@@ -3,6 +3,7 @@
namespace App\Services\Logic\Chapter;
use App\Models\Chapter as ChapterModel;
+use App\Models\ChapterLive as ChapterLiveModel;
use App\Models\Course as CourseModel;
use App\Repos\Chapter as ChapterRepo;
use App\Services\ChapterVod as ChapterVodService;
@@ -79,9 +80,9 @@ class BasicInfo extends Service
{
$liveService = new LiveService();
- $stream = $this->getStreamName($chapter->id);
+ $streamName = ChapterLiveModel::generateStreamName($chapter->id);
- $playUrls = $liveService->getPullUrls($stream);
+ $playUrls = $liveService->getPullUrls($streamName);
$chapterRepo = new ChapterRepo();
diff --git a/app/Services/Logic/ChapterTrait.php b/app/Services/Logic/ChapterTrait.php
index bb2b7aa3..8323437e 100644
--- a/app/Services/Logic/ChapterTrait.php
+++ b/app/Services/Logic/ChapterTrait.php
@@ -26,11 +26,6 @@ trait ChapterTrait
*/
protected $chapterUser;
- public function getStreamName($id)
- {
- return "chapter_{$id}";
- }
-
public function checkChapterVod($id)
{
$validator = new ChapterValidator();
diff --git a/app/Services/Logic/Teacher/Console/LivePushUrl.php b/app/Services/Logic/Teacher/Console/LivePushUrl.php
index 71406879..210d3a15 100644
--- a/app/Services/Logic/Teacher/Console/LivePushUrl.php
+++ b/app/Services/Logic/Teacher/Console/LivePushUrl.php
@@ -2,6 +2,7 @@
namespace App\Services\Logic\Teacher\Console;
+use App\Models\ChapterLive as ChapterLiveModel;
use App\Services\Live as LiveService;
use App\Services\Logic\ChapterTrait;
use App\Services\Logic\Service;
@@ -17,7 +18,7 @@ class LivePushUrl extends Service
$service = new LiveService();
- $steamName = $this->getStreamName($chapter->id);
+ $steamName = ChapterLiveModel::generateStreamName($chapter->id);
return $service->getPushUrl($steamName);
}
diff --git a/config/config.default.php b/config/config.default.php
index 8fd72d5e..c813a552 100644
--- a/config/config.default.php
+++ b/config/config.default.php
@@ -115,7 +115,7 @@ $config['metadata']['lifetime'] = 7 * 86400;
/**
* statsKey
*/
-$config['metadata']['statsKey'] = '_PH_METADATA_';
+$config['metadata']['statsKey'] = '_METADATA_';
/**
* redis库编号
@@ -130,7 +130,7 @@ $config['annotation']['lifetime'] = 7 * 86400;
/**
* statsKey
*/
-$config['annotation']['statsKey'] = '_PH_ANNOTATION_';
+$config['annotation']['statsKey'] = '_ANNOTATION_';
/**
* 密钥
diff --git a/public/static/home/css/common.css b/public/static/home/css/common.css
index 967e023f..45961c94 100644
--- a/public/static/home/css/common.css
+++ b/public/static/home/css/common.css
@@ -30,10 +30,6 @@
margin-bottom: 0;
}
-.padding20 {
- padding: 20px;
-}
-
.center {
text-align: center;
}
@@ -77,6 +73,10 @@
text-align: center;
}
+.layer .pager {
+ margin-top: 0;
+}
+
.loading {
padding: 30px;
text-align: center;
@@ -127,10 +127,6 @@
font-size: 12px;
}
-.logo {
-
-}
-
.top-nav {
margin-left: 100px;
}
@@ -897,21 +893,21 @@
color: #666;
}
-.countdown {
+.preview {
color: #666;
margin-top: 30px;
text-align: center;
}
-.countdown .icon {
+.preview .icon {
margin-bottom: 10px;
}
-.countdown .icon .layui-icon {
+.preview .icon .layui-icon {
font-size: 150px;
}
-.countdown .tips {
+.preview .tips {
font-size: 16px;
margin: 20px 0;
}