rabin 6 år sedan
förälder
incheckning
767a226227
2 ändrade filer med 38 tillägg och 2 borttagningar
  1. 31 0
      database/info.php
  2. 7 2
      src/Api.php

+ 31 - 0
database/info.php

@@ -133,6 +133,37 @@ return array
 			//'edit'		=> true,
 		),
 
+		'icon'		=> array
+		(
+			'type' 		=> 'varchar-150',
+			'name' 		=> '图标',
+			'default' 	=> '',
+			'desc' 		=> '图标',
+			'match' 	=> 'option',
+			'update'	=> 'image',
+			'key'		=> 1,
+		),
+
+		'color'		=> array
+		(
+			'type' 		=> 'varchar-10',
+			'name' 		=> '字体颜色-请填写颜色代码',
+			'default' 	=> '',
+			'desc' 		=> '字体颜色',
+			'match' 	=> 'option',
+			'update'	=> 'color',
+		),
+
+		'bgcolor'		=> array
+		(
+			'type' 		=> 'varchar-10',
+			'name' 		=> '背景颜色-请填写颜色代码',
+			'default' 	=> '',
+			'desc' 		=> '背景颜色',
+			'match' 	=> 'option',
+			'update'	=> 'color',
+		),
+
 		'cate_id'		=> array
 		(
 			'type' 		=> 'int-11',

+ 7 - 2
src/Api.php

@@ -275,7 +275,13 @@ class Api
 		# 地区
 		if ($info['type'] == 7) {
 			$info['value'] = Dever::load("area/api.string", $info['value']);
-		} elseif ($info['type'] >= 10 && $info['value']) {
+			$info['value'] = explode(',', $info['value']);
+			$temp = end($info['value']);
+			$info['value'] = $temp;
+		} elseif ($info['type'] == 9 && $info['value']) {
+			$info['value'] = explode(',', $info['value']);
+			$info['value'] = $info['value'][0];
+		} elseif ($info['type'] >= 9 && $info['value']) {
 			$temp = explode("\n", $info['type_option']);
 			if ($temp) {
 				$info['value'] = $info['value'] - 1;
@@ -287,7 +293,6 @@ class Api
 					}
 				}
 			}
-			
 		}
 
 		if ($info['unit']) {