|
@@ -343,16 +343,19 @@ class Journal extends Core
|
|
|
public function read()
|
|
|
{
|
|
|
if (!$this->data['uid']) {
|
|
|
- //Dever::alert('错误的用户信息');
|
|
|
+ Dever::alert('错误的用户信息');
|
|
|
}
|
|
|
# 验证是否可以阅读
|
|
|
$id = $this->check();
|
|
|
$this->data['info'] = $this->info($this->data['info'], false);
|
|
|
|
|
|
+ # 是否转码
|
|
|
+ //$this->data['info']['bgmusic'] = convert($this->data['info']['bgmusic'], 'mp3', 'journal/info', $this->data['info']['id'], 'bgmusic');
|
|
|
+
|
|
|
$subscribe = Dever::load('act/lib/subscribe')->get($id, $this->data['uid'], 4);
|
|
|
|
|
|
if ($this->data['info']['buy'] == 1 && $subscribe == 2) {
|
|
|
- //Dever::alert('未订阅');
|
|
|
+ Dever::alert('未订阅');
|
|
|
}
|
|
|
|
|
|
if ($this->data['info']['buy'] == 2) {
|
|
@@ -414,6 +417,15 @@ class Journal extends Core
|
|
|
$info['info']['author_id'] = $author_id;
|
|
|
$info['info']['content'] = $content;
|
|
|
$info['info'] = Dever::load('content/lib/article')->getContent($info['info']);
|
|
|
+ } elseif ($info['type'] == 4 || $info['type'] == 5) {
|
|
|
+ $info['video'] = convert($info['video'], 'mp4', 'journal/content', $info['id'], 'video');
|
|
|
+ if ($info['type'] == 5) {
|
|
|
+ $info['name'] = $name;
|
|
|
+ }
|
|
|
+ } elseif ($info['type'] == 6) {
|
|
|
+ $info['name'] = $name;
|
|
|
+ //音频先不转码
|
|
|
+ //$info['music'] = convert($info['music'], 'mp3', 'journal/content', $info['id'], 'music');
|
|
|
} elseif ($info['type'] == 11) {
|
|
|
$info['info'] = Dever::load('content/lib/article')->get($info['article_id']);
|
|
|
} elseif ($info['type'] == 12) {
|