dever 6 years ago
parent
commit
3b04a4838a
3 changed files with 16 additions and 16 deletions
  1. 3 3
      database/data.php
  2. 8 8
      database/info.php
  3. 5 5
      src/Api.php

+ 3 - 3
database/data.php

@@ -98,9 +98,9 @@ return array
 		'source_id' 		=> array
 		(
 			'type' 		=> 'int-11',
-			'name' 		=> '文章id',
+			'name' 		=> '数据id',
 			'default' 	=> '',
-			'desc' 		=> '文章id',
+			'desc' 		=> '数据id',
 			'match' 	=> $info['type'] == 3 ? 'is_numeric' : 'option',
 			'update'	=> $info['type'] == 3 ? 'text' : 'hidden',
 			'list'		=> $info['type'] == 3 ? true : false,
@@ -115,7 +115,7 @@ return array
 			'match' 	=> $name_state ? 'option' : 'option',
 			'update'	=> $name_state ? 'text' : 'hidden',
 			'search'	=> $name_state ? 'fulltext' : '',
-			'list'		=> $name_state ? '{source_id} > 0 ? ("{name}" ? "{name}" : Dever::load("content/news-one#name", {source_id})) : "{name}"' : false,
+			'list'		=> $name_state ? '{source_id} > 0 ? ("{name}" ? "{name}" : Dever::load("sad/supply-one#name", {source_id})) : "{name}"' : false,
 			'edit'		=> $name_state ? true : false,
 		),
 

+ 8 - 8
database/info.php

@@ -156,7 +156,7 @@ return array
 			'desc' 		=> '请输入自定义内容',
 			'match' 	=> 'is_string',
 			'update'	=> 'textarea',
-			'show'		=> array('type_4', 'type_5', 'type_6'),
+			'show'		=> 'type=4,5,6',
 		),
 
 		'sql_method'		=> array
@@ -168,7 +168,7 @@ return array
 			'match' 	=> 'is_numeric',
 			'update'	=> 'radio',
 			'option'	=> $sqlMethod,
-			'show'		=> array('type_5'),
+			'show'		=> 'type=5',
 		),
 
 		'define'		=> array
@@ -180,7 +180,7 @@ return array
 			'match' 	=> 'is_string',
 			'update'	=> 'select',
 			'option'	=> $define,
-			'show'		=> array('type_3'),
+			'show'		=> 'type=3'
 		),
 
 		'col'		=> array
@@ -192,7 +192,7 @@ return array
 			'match' 	=> 'is_string',
 			'option' 	=> $col,
 			'update'	=> 'checkbox',
-			'show'		=> array('type_1'),
+			'show'		=> 'type=1',
 			'control'	=> 'col',
 		),
 
@@ -204,7 +204,7 @@ return array
 			'desc' 		=> '图片尺寸提醒',
 			'match' 	=> 'is_string',
 			'update'	=> 'text',
-			'show'		=> array('col_3'),
+			'show'		=> 'col=3',
 		),
 
 		'col_content'		=> array
@@ -215,7 +215,7 @@ return array
 			'desc' 		=> '内容长度限制',
 			'match' 	=> 'is_numeric',
 			'update'	=> 'text',
-			'show'		=> array('col_4'),
+			'show'		=> 'col=4',
 		),
 
 		'relate_id'		=> array
@@ -226,7 +226,7 @@ return array
 			'desc' 		=> '请输入模块id',
 			'match' 	=> 'is_numeric',
 			'update'	=> 'text',
-			'show'		=> array('type_2'),
+			'show'		=> 'type=2',
 		),
 
 		'preview'		=> array
@@ -305,7 +305,7 @@ return array
 		(
 			'add' => array('新增数据', '"data&search_option_info_id={id}&oper_parent=info"', '{type} == 1'),
 
-			'list' => array('数据列表', '"data&search_option_info_id={id}&oper_parent=info"', '{type} == 1'),
+			'list' => array('数据列表', '"data&search_option_info_id={id}&oper_parent=info"'),
 		),
 	),
 

+ 5 - 5
src/Api.php

@@ -159,20 +159,20 @@ class Api
 		$module = Dever::load('module/info-one', $id);
 
 		if ($module) {
-			$data = Dever::load('module/data-all', array('option_info_id' => $id, 'option_type' => $type));
+			$data = Dever::load('module/data-state', array('option_info_id' => $id, 'option_type' => $type));
 
 			if($module['type'] == 3)
 			{
 				foreach($data as $k => $v)
 				{
-					$news = Dever::load('content/news-check', $v['source_id']);
+					$news = Dever::load('sad/supply-one', $v['source_id']);
 
 					if($news)
 					{
 						$data[$k]['name'] = $v['name'] ? $v['name'] : $news['name'];
-						$data[$k]['pic'] = $v['pic'] ? $v['pic'] : $news['pic'];
-						$data[$k]['link'] = $v['link'] ? $v['link'] : Dever::url('news/view?id=' . $news['id'], 'main');
-						$data[$k]['content'] = $v['content'] ? $v['content'] : $news['content'];
+						//$data[$k]['pic'] = isset($v['pic']) && $v['pic'] ? $v['pic'] : $news['pic'];
+						//$data[$k]['link'] = $v['link'] ? $v['link'] : Dever::url('news/view?id=' . $news['id'], 'main');
+						//$data[$k]['content'] = $v['content'] ? $v['content'] : $news['content'];
 					}
 				}
 			}