dever 6 سال پیش
والد
کامیت
62debe9ea6
4فایلهای تغییر یافته به همراه21 افزوده شده و 2 حذف شده
  1. 18 0
      database/file.php
  2. 1 1
      database/upload.php
  3. 1 0
      src/Store/Core.php
  4. 1 1
      src/View.php

+ 18 - 0
database/file.php

@@ -15,6 +15,10 @@ $cate = function()
 {
 	return Dever::db('upload/cate')->state();
 };
+$upload = function()
+{
+	return Dever::db('upload/upload')->state();
+};
 
 return array
 (
@@ -79,6 +83,20 @@ return array
 			'list'		=> true,
 		),
 
+		'upload'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '所属资源配置',
+			'default' 	=> '1',
+			'desc' 		=> '分类',
+			'match' 	=> 'is_numeric',
+			'option' 	=> $upload,
+			'update'	=> 'select',
+			'search'	=> 'select',
+			//'control'	=> 'type',
+			//'list'		=> true,
+		),
+
 		'cate'		=> array
 		(
 			'type' 		=> 'int-11',

+ 1 - 1
database/upload.php

@@ -22,7 +22,7 @@ return array
 	# 表名
 	'name' => 'upload',
 	# 显示给用户看的名称
-	'lang' => '资源文件类型',
+	'lang' => '资源配置',
 	'order'	=> 100,
 	# 数据结构
 	'struct' => array

+ 1 - 0
src/Store/Core.php

@@ -272,6 +272,7 @@ class Core
 		$param['add_file'] = $this->file;
 		$param['add_key'] = md5($this->output['url']);
 		$param['add_ext'] = $this->ext;
+		$param['add_upload'] = $this->data['key'];
 
 		if ($this->limit) {
 			$param['add_width'] = $this->limit[0];

+ 1 - 1
src/View.php

@@ -15,7 +15,7 @@ class View
     public function kindeditorFile()
     {
         $key = Dever::input('key');
-        $param['key'] = $key;
+        $param['upload'] = $key;
         $file = Dever::db('upload/file')->state();
         print_r($file);die;
         $result = array();