dever 5 years ago
parent
commit
c2dba8b054
3 changed files with 40 additions and 3 deletions
  1. 6 0
      app/collection/lib/Content.php
  2. 33 2
      app/content/database/audio.php
  3. 1 1
      config/base.php

+ 6 - 0
app/collection/lib/Content.php

@@ -138,6 +138,12 @@ class Content
             $data['author'] = Dever::db('store/author')->one($data['author_id']);
         }
 
+        # 歌词
+        if (isset($data['lrc']) && $data['lrc']) {
+            $data['lrc'] = strip_tags($data['lrc']);
+            $data['lrc'] = explode("\r\n", $data['lrc']);
+        }
+
         if (isset($data['content']) && $data['content']) {
             $data = $this->getContent($data);
         }

+ 33 - 2
app/content/database/audio.php

@@ -80,9 +80,9 @@ return array
         'pic'       => array
         (
             'type'      => 'varchar-150',
-            'name'      => '封面图-图片尺寸750*1386px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
+            'name'      => '背景图-图片尺寸750*1386px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
             'default'   => '',
-            'desc'      => '封面图',
+            'desc'      => '背景图',
             'match'     => 'option',
             'update'    => 'image',
             'key'       => '1',
@@ -115,6 +115,37 @@ return array
             'match'     => 'is_string',
         ),
 
+        'color'      => array
+        (
+            'type'      => 'varchar-10',
+            'name'      => '歌词文字颜色-默认为黑色',
+            'default'   => '#000000',
+            'desc'      => '歌词文字颜色',
+            'match'     => 'is_string',
+            'update'    => 'color',
+        ),
+
+        'atcolor'      => array
+        (
+            'type'      => 'varchar-10',
+            'name'      => '当前播放的歌词文字颜色-默认为白色',
+            'default'   => '#ffffff',
+            'desc'      => '背景颜色',
+            'match'     => 'is_string',
+            'update'    => 'color',
+        ),
+
+        'lrc'       => array
+        (
+            'type'      => 'text-255',
+            'name'      => '歌词内容-传入lrc格式的歌词',
+            'default'   => '',
+            'desc'      => '歌词内容',
+            'match'     => 'is_string',
+            'update'    => 'editor',
+            'key'       => '1',
+        ),
+
 		'udate'		=> array
 		(
 			'type' 		=> 'int-11',

+ 1 - 1
config/base.php

@@ -1,7 +1,7 @@
 <?php
 $config['base'] = array
 (
-	'name' => '云店幻境',
+	'name' => '云境',
 	'version' => '1.0.0 Beta',
 
     # 设置分类组件中的栏目下的分类为系统使用的主分类