rabin 7 years ago
parent
commit
ef3b32c4e4
2 changed files with 22 additions and 6 deletions
  1. 12 0
      content/database/meeting.php
  2. 10 6
      content/v1/Meeting.php

+ 12 - 0
content/database/meeting.php

@@ -141,6 +141,18 @@ return array
 			'place'		=> '150',
 		),
 
+		'img'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '首页轮播图',
+			'default' 	=> '',
+			'desc' 		=> '首页轮播图',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key' 		=> '1',
+			'place'		=> '150',
+		),
+
 		'sdate'		=> array
 		(
 			'type' 		=> 'int-11',

+ 10 - 6
content/v1/Meeting.php

@@ -71,17 +71,21 @@ class Meeting extends Base
         $i = 0;
         if ($wei) {
             foreach ($wei as $k => $v) {
-                $this->data['focus'][$i] = $this->one($v);
-                array_push($ids, $v['id']);
-                $i++;
+                if ($v['img']) {
+                    $this->data['focus'][$i] = $this->one($v);
+                    array_push($ids, $v['id']);
+                    $i++;
+                }
             }
         }
 
         if ($cur) {
             foreach ($cur as $k => $v) {
-                $this->data['focus'][$i] = $this->one($v);
-                array_push($ids, $v['id']);
-                $i++;
+                if ($v['img']) {
+                    $this->data['focus'][$i] = $this->one($v);
+                    array_push($ids, $v['id']);
+                    $i++;
+                }
             }
         }