dever 3 years ago
parent
commit
ea9e05706a
2 changed files with 23 additions and 1 deletions
  1. 13 1
      database/data.php
  2. 10 0
      database/info.php

+ 13 - 1
database/data.php

@@ -52,9 +52,19 @@ if ($info) {
     $col = Dever::db('push/col')->getAll(array('id' => $info['col']));
 
     if ($col) {
+        $pic_index = 0;
+        if ($info['col_pic']) {
+            $pic = $info['col_pic'];
+            $pic_temp = explode("\r\n", $pic);
+        }
+        
     	foreach ($col as $k => $v) {
 
-    		$place = $v['pic'];
+            $place = $v['pic'];
+            if ($info['col_pic'] && isset($pic_temp[$pic_index]) && $pic_temp[$pic_index]) {
+                $place = $pic_temp[$pic_index];
+            }
+    		
     		if ($v['type'] == 1) {
     			$update_type = 'text';
     		} elseif ($v['type'] == 2) {
@@ -63,8 +73,10 @@ if ($info) {
     			$update_type = 'editor';
     		} elseif ($v['type'] == 4) {
     			$update_type = 'image';
+                $pic_index++;
     		} elseif ($v['type'] == 5) {
     			$update_type = 'images';
+                $pic_index++;
     		} elseif ($v['type'] == 6) {
     			$update_type = 'radio';
     		} elseif ($v['type'] == 7) {

+ 10 - 0
database/info.php

@@ -110,6 +110,16 @@ return array
             'option'    => $col,
             'update'    => 'checkbox',
         ),
+
+        'col_pic'       => array
+        (
+            'type'      => 'varchar-500',
+            'name'      => '图片尺寸提醒-请直接输入提醒的文字即可,如100*100,如果有多个图片字段,请用换行隔开',
+            'default'   => '',
+            'desc'      => '图片尺寸提醒',
+            'match'     => 'option',
+            'update'    => 'textarea',
+        ),
         
         'reorder'       => array
         (