dever пре 4 година
родитељ
комит
af85fa6bec

+ 18 - 18
app/collection/database/type.php

@@ -92,34 +92,34 @@ return array
 
     'default' => array
     (
-        'col' => 'name,`table`,reorder,state,cdate',
+        'col' => 'id, name,`table`,reorder,state,cdate',
         'value' => array
         (
-            '"图文内容","content/news",199,1,' . DEVER_TIME,
+            '1, "图文内容","content/news",199,1,' . DEVER_TIME,
 
-            '"普通图片","content/pic",189,1,' . DEVER_TIME,
-            '"四宫格图片","content/pic_grid",188,1,' . DEVER_TIME,
+            '10, "普通图片","content/pic",189,1,' . DEVER_TIME,
+            '11, "多张图片","content/pic-list",188,1,' . DEVER_TIME,
+            '12, "四宫格图片","content/pic_grid",187,1,' . DEVER_TIME,
+            '13, "多张四宫格","content/pic_grid-list",186,1,' . DEVER_TIME,
 
-            '"普通视频","content/video",179,1,' . DEVER_TIME,
-            '"留言视频","content/video_comment",178,1,' . DEVER_TIME,
-            '"短视频","content/video_short-getAll",177,1,' . DEVER_TIME,
+            '20, "普通视频","content/video-getAll",179,1,' . DEVER_TIME,
+            '21, "短视频","content/video_short-getAll",177,1,' . DEVER_TIME,
+            '22, "留言视频","content/video_comment",178,1,' . DEVER_TIME,
 
-            '"普通音频","content/audio",169,1,' . DEVER_TIME,
-            '"留言音频","content/audio_comment",168,1,' . DEVER_TIME,
+            '30, "普通音频","content/audio-getAll",169,1,' . DEVER_TIME,
+            '31, "留言音频","content/audio_comment",168,1,' . DEVER_TIME,
 
-            '"直播","content/live",159,1,' . DEVER_TIME,
+            '40, "直播","content/live",159,1,' . DEVER_TIME,
 
-            '"活动","content/act",149,1,' . DEVER_TIME,
+            '50, "活动","content/act",149,1,' . DEVER_TIME,
 
-            '"对话","content/dialogue",139,1,' . DEVER_TIME,
+            '60, "对话","content/dialogue",139,1,' . DEVER_TIME,
 
-            '"电商产品","content/product",129,1,' . DEVER_TIME,
+            '70, "电商产品","content/product",129,1,' . DEVER_TIME,
 
-            '"直接链接","content/link",119,1,' . DEVER_TIME,
-
-            '"多个链接","content/link-list",118,1,' . DEVER_TIME,
-
-            '"单页面","content/webview",117,1,' . DEVER_TIME,
+            '80, "直接链接","content/link",119,1,' . DEVER_TIME,
+            '81, "多个链接","content/link-list",118,1,' . DEVER_TIME,
+            '82, "单页面","content/webview",117,1,' . DEVER_TIME,
         ),
     ),
 

+ 2 - 1
app/collection/lib/Content.php

@@ -92,7 +92,7 @@ class Content
 	public function getContent($data, $uid = false)
     {
         //embed
-        $data['content_array'] = array();
+        $data['content_array'] = $data['content_pic'] = array();
 
         $data['content'] = Dever::filter($data['content']);
 
@@ -137,6 +137,7 @@ class Content
                     $pic = $v;
 
                     $replace[] = array('type' => 'pic', 'content' => $pic);
+                    $data['content_pic'][] = $pic;
                 }
             }
         }

+ 7 - 8
app/content/database/pic.php

@@ -24,10 +24,8 @@ $text = array
 
 $type = array
 (
-    1 => '全屏图',
-    2 => '长屏图',
-    3 => '横屏图',
-    4 => '无边框图',
+    1 => '长屏图',
+    2 => '横屏图',
 );
 
 $bgcolor_type = array
@@ -55,7 +53,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '',
 			'match' 	=> 'is_numeric',
-			'list'		=> true,
+			//'list'		=> true,
 		),
 
 		'info_id'      => array
@@ -101,6 +99,7 @@ return array
             'update'  => 'image',
             'key'       => '1',
             'place'     => '750*1386',
+            'list'      => 'Dever::load("content/lib/manage.pic", "{pic}")',
         ),
 
         'pic_info'        => array
@@ -229,9 +228,9 @@ return array
 			'match' 	=> 'is_numeric',
 			//'update'	=> 'select',
 			'option'	=> $status,
-			'search'	=> 'select',
-			'list'		=> true,
-			'edit'		=> true,
+			//'search'	=> 'select',
+			//'list'		=> true,
+			//'edit'		=> true,
 		),
 
 		'reorder'		=> array

+ 5 - 4
app/content/database/pic_grid.php

@@ -29,7 +29,7 @@ return array
 			'default' 	=> '',
 			'desc' 		=> '',
 			'match' 	=> 'is_numeric',
-			'list'		=> true,
+			//'list'		=> true,
 		),
 
 		'info_id'      => array
@@ -63,6 +63,7 @@ return array
             'match'     => 'is_string',
             'option'    => $palaces,
             'show'      => 'type=13',
+            'list'      => 'Dever::load("content/lib/manage.picGrid", "{text}")',
             'update'    => array
             (
                 array
@@ -95,9 +96,9 @@ return array
 			'match' 	=> 'is_numeric',
 			//'update'	=> 'select',
 			'option'	=> $status,
-			'search'	=> 'select',
-			'list'		=> true,
-			'edit'		=> true,
+			//'search'	=> 'select',
+			//'list'		=> true,
+			//'edit'		=> true,
 		),
 
 		'reorder'		=> array

+ 22 - 0
app/content/lib/Manage.php

@@ -57,4 +57,26 @@ class Manage
     {
         return $this->search('content/news');
     }
+
+    # 查看图片
+    public function pic($pic)
+    {
+        $table = array();
+        $table[0] = '<img src="'.$pic.'" width=“150”/>';
+
+        return Dever::table($table);
+    }
+
+    public function picGrid($text)
+    {
+        $table = array();
+        $text = Dever::array_decode($text);
+        $table[0] = '';
+        foreach ($text as $k => $v) {
+            if ($v['pic']) {
+                $table[0] .= '<img src="'.$v['pic'].'" width=“150”/>&nbsp;&nbsp;';
+            }
+        }
+        return Dever::table($table);
+    }
 }