dever 4 years ago
parent
commit
8a042650c3

+ 33 - 23
app/goods/database/info_price.php → app/collection/database/page.php

@@ -1,16 +1,16 @@
 <?php
 
-$config = array
+return array
 (
 	# 表名
-	'name' => 'info_price',
+	'name' => 'page',
 	# 显示给用户看的名称
-	'lang' => '资源价格',
-	'order' => 200,
-	'menu' => false,
-	'auto' => 10000000,
+	'lang' => '章节管理',
+	# 是否显示在后台菜单
+	'order' => 1,
+	'menu'	=> false,
 
-	# 数据结构 不同的字段放这里
+	# 数据结构
 	'struct' => array
 	(
 		'id' 		=> array
@@ -20,57 +20,67 @@ $config = array
 			'default' 	=> '',
 			'desc' 		=> '',
 			'match' 	=> 'is_numeric',
-			//'list'		=> true,
+			'order'		=> 'asc',
+			'list'		=> true,
 		),
 
 		'name'		=> array
 		(
-			'type' 		=> 'varchar-800',
-			'name' 		=> '标题',
+			'type' 		=> 'varchar-150',
+			'name' 		=> '章节名称',
 			'default' 	=> '',
-			'desc' 		=> '标题',
+			'desc' 		=> '章节名称',
 			'match' 	=> 'is_string',
-			'update'	=> 'textarea',
+			'update'	=> 'text',
 			'search'	=> 'fulltext',
-			//'list'		=> true,
-			//'edit'		=> true,
+			'list'		=> true,
+			'edit'		=> true,
 		),
 
 		'reorder'		=> array
 		(
 			'type' 		=> 'int-11',
-			'name' 		=> '排序-数值越大越靠前,相当于置顶',
+			'name' 		=> '排序(数值越大越靠前)',
 			'default' 	=> '1',
 			'desc' 		=> '请输入排序',
 			'match' 	=> 'option',
-			//'update'	=> 'text',
+			'update'	=> 'text',
 			'search'	=> 'order',
+			'list_name' => '排序',
 			'list'		=> true,
 			'order'		=> 'desc',
 			'edit'		=> true,
 		),
-
+		
 		'state'		=> array
 		(
 			'type' 		=> 'tinyint-1',
-			'name' 		=> '数据状态',
+			'name' 		=> '状态',
 			'default' 	=> '1',
 			'desc' 		=> '请选择状态',
 			'match' 	=> 'is_numeric',
 		),
-
+		
 		'cdate'		=> array
 		(
 			'type' 		=> 'int-11',
-			'name' 		=> '发布时间',
+			'name' 		=> '录入时间',
 			'match' 	=> array('is_numeric', time()),
 			'desc' 		=> '',
 			# 只有insert时才生效
 			'insert'	=> true,
 			'search'	=> 'date',
-			//'list'		=> 'date("Y-m-d H:i:s", {cdate})',
+			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 		),
 	),
-);
 
-return $config;
+	'manage' => array
+	(
+
+	),
+
+	'request' => array
+	(
+		
+	)
+);

+ 5 - 0
app/collection/lib/Content.php

@@ -93,6 +93,11 @@ class Content
             $data = $this->getContent($data);
         }
 
+        if (isset($data['goods_id']) && $data['goods_id'] > 0) {
+            $data['goods'] = Dever::load('goods/lib/info')->getInfo($data['goods_id']);
+            $data['goods'] = $this->getContent($data['goods']);
+        }
+
         return $data;
     }
 

+ 6 - 3
app/collection/src/Api.php

@@ -103,7 +103,7 @@ class Api
 
     public function test()
     {
-        $limit = 0;
+        $limit = Dever::input('start', 0);
         $num = 10000;
         $state = true;
         while($state) {
@@ -130,14 +130,17 @@ class Api
         $result = Dever::curl($url);
         $result = json_decode($result, true);
         if (isset($result['data'][0]['city'])) {
-            $sql = 'update huala_member set citys = "'.$result['data'][0]['city'].'" where id = ' . $id;
+            if (!$result['data'][0]['prov']) {
+                $result['data'][0]['prov'] = $result['data'][0]['city'];
+            }
+            $sql = 'update huala_member set mobile_city = "'.$result['data'][0]['city'].'", mobile_prov = "'.$result['data'][0]['prov'].'" where id = ' . $id;
             Dever::db('collection/info')->query($sql);
         }
     }
 
     public function tdata($limit, $num)
     {
-        $sql = 'select * from huala_member where citys is null order by id asc limit ' . $limit . ',' . $num;
+        $sql = 'select * from huala_member where mobile_prov is null order by id asc limit ' . $limit . ',' . $num;
         $data = Dever::db('collection/info')->fetchAll($sql);
         return $data;
     }

+ 68 - 68
app/content/database/product.php

@@ -2,6 +2,26 @@
 
 $status = Dever::config('base')->status;
 
+$text = array
+(
+    1 => '上左',
+    2 => '上中',
+    3 => '上右',
+    4 => '中左',
+    5 => '正中',
+    6 => '中右',
+    7 => '下左',
+    8 => '下中',
+    9 => '下右',
+    //10 => '自定义',
+);
+
+$bgcolor_type = array
+(
+    1 => '设置背景颜色',
+    2 => '不设置背景颜色',
+);
+
 return array
 (
 	# 表名
@@ -46,99 +66,79 @@ return array
             'value'     => Dever::input('search_option_content_id')
         ),
 
-		'name'		=> array
-		(
-			'type' 		=> 'varchar-80',
-			'name' 		=> '标题',
-			'default' 	=> '',
-			'desc' 		=> '标题',
-			'match' 	=> 'is_string',
-			'update'	=> 'text',
-			'list'		=> true,
-			'search'	=> 'fulltext',
-			//增加预览
-			'preview'	=> true,
-		),
-
-		'desc'		=> array
-		(
-			'type' 		=> 'varchar-500',
-			'name' 		=> '摘要',
-			'default' 	=> '',
-			'desc' 		=> '摘要',
-			'match' 	=> 'is_string',
-			'update'	=> 'textarea',
-		),
-
-		'pic'		=> array
-		(
-			'type' 		=> 'text-255',
-			'name' 		=> '图片-可以上传多张,图片尺寸380*380px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
-			'default' 	=> '',
-			'desc' 		=> '图片',
-			'match' 	=> 'is_string',
-			'update'	=> 'image',
-			'key' 		=> '1',
-			'place'		=> '380',
-		),
-
-		'udate'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '更新时间',
-			'match' 	=> array('is_numeric', time()),
-			'desc' 		=> '',
-		),
+		'goods_id'     => array
+        (
+            'type'      => 'int-11',
+            'name'      => '选择产品',
+            'default'   => '',
+            'desc'      => '选择产品',
+            'match'     => 'option',
+            'update'    => 'select',
+            'show'      => 'type=11',
+            'update_search' => 'goods/lib/manage.search',
+        ),
 
 		'text'       => array
         (
             'type'      => 'text-1000',
-            'name'      => '规格设置',
+            'name'      => '文字设置',
             'default'   => '',
-            'desc'      => '规格设置',
+            'desc'      => '文字设置',
             'match'     => 'is_string',
+            'option'    => $text,
             'update'    => array
             (
                 array
                 (
                     'col'       => 'name',
-                    'name'      => '规格名称',
+                    'name'      => '文字内容',
                     'default'   => '',
-                    'desc'      => '规格名称',
+                    'desc'      => '文字内容',
                     'match'     => 'is_string',
-                    'update'    => 'text',
+                    'update'    => 'textarea',
                 ),
 
                 array
                 (
-                    'col'       => 'price',
-                    'name'      => '价格-请填写价格数字',
-                    'default'   => '',
-                    'desc'      => '价格',
+                    'col'       => 'color',
+                    'name'      => '文字颜色',
+                    'default'   => '#000000',
+                    'desc'      => '文字颜色',
                     'match'     => 'is_string',
-                    'update'    => 'text',
+                    'update'    => 'color',
                 ),
 
                 array
                 (
-                    'col'       => 'pic',
-                    'name'      => '图片-图片尺寸320*320px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式。',
-                    'default'   => '',
-                    'desc'      => '图片',
+                    'col'       => 'bgcolor_type',
+                    'name'      => '是否设置背景颜色',
+                    'default'   => '2',
+                    'desc'      => '是否设置背景颜色',
                     'match'     => 'is_string',
-                    'update'    => 'image',
-                    'key'       => 1,
+                    'update'    => 'radio',
+                    'option'    => $bgcolor_type,
+                    'control'   => 'bgcolor_type',
                 ),
 
                 array
                 (
-                    'col'       => 'content',
-                    'name'      => '描述内容',
-                    'default'   => '',
-                    'desc'      => '描述内容',
-                    'match'     => 'option',
-                    'update'    => 'editor',
-                    'key'      => 1
+                    'col'       => 'bgcolor',
+                    'name'      => '背景颜色',
+                    'default'   => '#000000',
+                    'desc'      => '背景颜色',
+                    'match'     => 'is_string',
+                    'update'    => 'color',
+                    'show'      => 'bgcolor_type=1'
+                ),
+
+                array
+                (
+                    'col'       => 'size',
+                    'name'      => '文字大小-直接输入像素数字',
+                    'default'   => '16',
+                    'desc'      => '结果描述',
+                    'match'     => 'is_numeric',
+                    'update'    => 'text',
                 ),
             ),
         ),
@@ -153,8 +153,8 @@ return array
 			//'update'	=> 'select',
 			'option'	=> $status,
 			'search'	=> 'select',
-			'list'		=> true,
-			'edit'		=> true,
+			//'list'		=> true,
+			//'edit'		=> true,
 		),
 
 		'reorder'		=> array

+ 0 - 357
app/goods/database/info.php

@@ -1,357 +0,0 @@
-<?php
-
-$audit = Dever::config('base')->audit;
-
-$status = Dever::config('base')->status;
-
-$config = array
-(
-	# 表名
-	'name' => 'info',
-	# 显示给用户看的名称
-	'lang' => '商品列表',
-	'order' => 200,
-	'auto' => 10000000,
-
-	'end' => array
-	(
-		'insert' => 'goods/lib/manage.infoUpdate',
-		'update' => 'goods/lib/manage.infoUpdate',
-	),
-
-	# 同步更新另外一个或多个表的数据,将数据同步到关联表中
-	'sync' => array
-	(
-		'goods/info_category' => array
-		(
-			# 更新另外一个表的字段 => 本表的字段
-			'where' => array('info_id', 'id'),
-			# 要更新的数据
-			'update' => array('category_id' => 'category'),
-			# 同步更新的类型,delete为先删再插入,update为直接更新
-			'type' => 'delete',
-		)
-	),
-
-	# 数据结构 不同的字段放这里
-	'struct' => array
-	(
-		'id' 		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> 'ID',
-			'default' 	=> '',
-			'desc' 		=> '',
-			'match' 	=> 'is_numeric',
-			//'list'		=> true,
-		),
-
-		'name'		=> array
-		(
-			'type' 		=> 'varchar-800',
-			'name' 		=> '标题',
-			'default' 	=> '',
-			'desc' 		=> '标题',
-			'match' 	=> 'is_string',
-			'update'	=> 'textarea',
-			'search'	=> 'fulltext',
-			//'list'		=> true,
-			//'edit'		=> true,
-		),
-
-		'category'		=> array
-		(
-			'type' 		=> 'varchar-500',
-			'name' 		=> '分类',
-			'default' 	=> '',
-			'desc' 		=> '分类',
-			'match' 	=> 'is_string',
-			'search'	=> 'linkage',
-			'update'	=> 'linkage',
-			'option'	=> Dever::url('api.get', 'category'),
-			//'list'		=> 'Dever::load("category/api.string", "{category}")',
-		),
-
-		# 以下几个分类其实在关联表中已经有了,放到这里是为了查询方便,一般只有三级分类,多了就从关联表查询吧
-		'top_category_id'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '顶级分类ID-顶级分类,用于分类查询',
-			'default' 	=> '-1',
-			'desc' 		=> '顶级分类ID',
-			'match' 	=> 'is_numeric',
-		),
-
-		'second_category_id'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '二级分类ID-二级分类,用于分类查询',
-			'default' 	=> '-1',
-			'desc' 		=> '二级分类ID',
-			'match' 	=> 'is_numeric',
-		),
-
-		'category_id'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '子分类ID-最后一个级别的分类,用于分类查询',
-			'default' 	=> '-1',
-			'desc' 		=> '子分类ID',
-			'match' 	=> 'is_numeric',
-		),
-
-		'pic_cover'		=> array
-		(
-			'type' 		=> 'varchar-150',
-			'name' 		=> '封面图-图片尺寸300*300px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式,用户上传图片之后会自动进行居中裁剪',
-			'default' 	=> '',
-			'desc' 		=> '封面图',
-			'match' 	=> 'option',
-			'update'	=> 'image',
-			'key' 		=> '1',
-			'place'		=> '150',
-			'list_name'	=> '资源详情',
-			'list'		=> 'Dever::load("res/lib/manage.info", "{id}")',
-		),
-
-		'pic'		=> array
-		(
-			'type' 		=> 'text-255',
-			'name' 		=> '多张图片-图片尺寸随意,一般为用户上传,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
-			'default' 	=> '',
-			'desc' 		=> '多张图片',
-			'match' 	=> 'option',
-			'update'	=> 'images',
-			'key' 		=> '1',
-		),
-
-		'num_view'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '阅读数',
-			'default' 	=> '0',
-			'desc' 		=> '请填写阅读数',
-			'match' 	=> 'option',
-			'search'	=> 'order',
-			'list'		=> '{num_view}+{num_add_view}',
-		),
-
-		'num_add_view'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '阅读数基数',
-			'default' 	=> '0',
-			'desc' 		=> '阅读数基数',
-			'match' 	=> 'option',
-			//'update'	=> 'text',
-		),
-
-		'audit'		=> array
-		(
-			'type' 		=> 'tinyint-1',
-			'name' 		=> '审核',
-			'default' 	=> '2',
-			'desc' 		=> '审核',
-			'match' 	=> 'is_numeric',
-			//'update'	=> 'select',
-			'option'	=> $audit,
-			'search'	=> 'select',
-			'list'		=> true,
-			'edit'		=> true,
-		),
-
-		'status'		=> array
-		(
-			'type' 		=> 'tinyint-1',
-			'name' 		=> '状态',
-			'default' 	=> '1',
-			'desc' 		=> '状态',
-			'match' 	=> 'is_numeric',
-			//'update'	=> 'select',
-			'option'	=> $status,
-			'search'	=> 'select',
-			'list'		=> true,
-			'edit'		=> true,
-		),
-
-		'reorder'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '排序-数值越大越靠前,相当于置顶',
-			'default' 	=> '1',
-			'desc' 		=> '请输入排序',
-			'match' 	=> 'option',
-			//'update'	=> 'text',
-			'search'	=> 'order',
-			'list'		=> true,
-			'order'		=> 'desc',
-			'edit'		=> true,
-		),
-
-		'udate'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '更新时间',
-			'match' 	=> array('is_numeric', time()),
-			'desc' 		=> '',
-		),
-
-		'content'		=> array
-		(
-			'type' 		=> 'text-800',
-			'name' 		=> '内容',
-			'default' 	=> '',
-			'desc' 		=> '内容',
-			'match' 	=> 'is_string',
-			//'update'	=> 'editor',
-			'key'		=> '1',
-		),
-
-		'state'		=> array
-		(
-			'type' 		=> 'tinyint-1',
-			'name' 		=> '数据状态',
-			'default' 	=> '1',
-			'desc' 		=> '请选择状态',
-			'match' 	=> 'is_numeric',
-		),
-
-		'cdate'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '发布时间',
-			'match' 	=> array('is_numeric', time()),
-			'desc' 		=> '',
-			# 只有insert时才生效
-			'insert'	=> true,
-			'search'	=> 'date',
-			//'list'		=> 'date("Y-m-d H:i:s", {cdate})',
-		),
-	),
-
-	# 索引
-	'index' => array
-	(
-		1 => array
-		(
-			'search' => 'uid,category,top_category_id,second_category_id,category_id',
-		),
-		
-		# 版本号 更改版本号会更新当前表的索引
-		'version' => 1,
-	),
-	
-	# 管理功能
-	'manage' => array
-	(
-		// 载入自定义资源 路径可以配置在config里。这里没有写路径。demo.css
-		'res' => array
-		(
-			//'css' => 'demo',
-		),
-		//'insert' => false,
-		//'delete' => false,
-		'mul' => true,
-		# 自定义快捷新增和编辑
-        'button' => array
-        (
-        	//'类别管理' => array('list', 'cate&project=demand&search_option_key=cate&search_option_tablename=类别&oper_parent=info&oper_project=demand'),
-        ),
-
-		# 列表里的按钮
-		'list_button' => array
-		(
-			'add' => array('属性设置', '"info_attr
-				&project=res
-				&search_option_info_id={id}
-				&search_option_category={category}
-				&oper_parent=info&oper_project=res
-				&oper_save_jump=info
-				&where_id={id}"'),
-			'br1' => array('<br />'),
-			'delete' => '删除',
-		),
-	),
-
-	# request 请求接口定义
-	'request' => array
-	(
-		# 后台搜索用到
-		'search' => array
-		(
-			# 匹配的正则或函数 选填项
-			'option' => array
-			(
-				'ids' => array('yes-id', 'in'),
-				'name' => array('yes', 'like'),
-				'id' => 'yes',
-				'state' => 1,
-			),
-			'type' => 'all',
-			'order' => array('reorder' => 'desc', 'id' => 'desc'),
-			'limit' => '0,1000',
-			'col' => 'name as name, id, id as value, "" as selected, "" as disabled|id',
-		),
-
-		# 列表
-		'getAll' => array
-		(
-			# 匹配的正则或函数 选填项
-			'option' => array
-			(
-				'audit' => 2,
-				'category' => array('yes', 'like'),
-				'top_category_id' => 'yes',
-				'second_category_id' => 'yes',
-				'category_id' => 'yes',
-				//'status' => 1,
-				//'poster_pay_type' => 2,
-				'state' => 1,
-			),
-			'type' => 'all',
-			'order' => array('reorder' => 'desc', 'id' => 'desc'),
-			'limit' => '0,10',
-			//'page' => array(10, 'list'),
-			'col' => '*',
-		),
-
-		# 分页
-		'getPageAll' => array
-		(
-			# 匹配的正则或函数 选填项
-			'option' => array
-			(
-				'uid' => 'yes',
-				'name' => array('yes', 'like'),
-				'audit' => 2,
-				'category' => array('yes', 'like'),
-				'top_category_id' => 'yes',
-				'second_category_id' => 'yes',
-				'category_id' => 'yes',
-				//'status' => 1,
-				//'poster_pay_type' => 2,
-				'state' => 1,
-			),
-			'type' => 'all',
-			'order' => array('reorder' => 'desc', 'id' => 'desc'),
-			'page' => array(10, 'list'),
-			'col' => '*',
-		),
-		
-		# 更新浏览量
-		'addView' => array
-		(
-			'type' => 'update',
-			'where' => array
-			(
-				'id' => 'yes',
-			),
-			'set' => array
-			(
-				'num_view' => array('1', '+='),
-			),
-		),
-	),
-);
-
-return $config;

+ 0 - 132
app/goods/database/info_attr.php

@@ -1,132 +0,0 @@
-<?php
-list($category, $attr, $table, $create) = getInfoAttr();
-
-//print_r($attr);die;
-$config = array
-(
-	# 表名
-	'name' => 'info_attr' . $table,
-	# 显示给用户看的名称
-	'lang' => '属性规格',
-	'order' => 100,
-	'menu' => false,
-	'create' => $create,
-	'attr' => $attr,
-	'auto' => 10000000,
-
-	'end' => array
-	(
-		'insert' => 'attr/lib/manage.update',
-		'update' => 'attr/lib/manage.update',
-	),
-
-	# 数据结构 不同的字段放这里
-	'struct' => array
-	(
-		'id' 		=> array
-		(
-			'type'      => 'int-11',
-            'name'      => 'ID',
-            'default'   => '',
-            'desc'      => '',
-            'match'     => 'is_numeric',
-            'search'    => 'order',
-            'update'    => 'hidden',
-            'value'     => Dever::input('where_id')
-            //'list'        => true,
-		),
-
-		'info_id'      => array
-        (
-            'type'      => 'int-11',
-            'name'      => '资源',
-            'default'   => '',
-            'desc'      => '资源',
-            'match'     => 'is_numeric',
-            'update'    => 'hidden',
-            'value'     => Dever::input('search_option_info_id')
-        ),
-
-        'category'		=> array
-		(
-			'type' 		=> 'varchar-500',
-			'name' 		=> '分类-直接继承主表的分类',
-			'default' 	=> '',
-			'desc' 		=> '分类',
-			'match' 	=> 'is_string',
-			'update'    => 'hidden',
-            'value'     => $category
-		),
-
-		'cdate'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '发布时间',
-			'match' 	=> array('is_numeric', time()),
-			'desc' 		=> '',
-			# 只有insert时才生效
-			'insert'	=> true,
-			//'list'		=> 'date("Y-m-d H:i:s", {cdate})',
-		),
-	),
-
-	# 索引
-	'index' => array
-	(
-		1 => array
-		(
-			'search' => 'info_id',
-		),
-		
-		# 版本号 更改版本号会更新当前表的索引
-		'version' => 1,
-	),
-	
-	# 管理功能
-	'manage' => array
-	(
-
-	),
-
-	# request 请求接口定义
-	'request' => array
-	(
-		# 分页
-		'getPageAll' => array
-		(
-			# 匹配的正则或函数 选填项
-			'option' => array
-			(
-				'audit' => array('yes-t_2.audit', 2),
-				'category' => array('yes-t_2.category', 'like'),
-				'top_category_id' => array('yes-t_2.top_category_id'),
-				'second_category_id' => array('yes-t_2.second_category_id'),
-				'category_id' => array('yes-t_2.category_id'),
-				//'status' => 1,
-				//'poster_pay_type' => array('yes-t_2.poster_pay_type', 2),
-				'state' => array('yes-t_2.state', 1),
-			),
-			# 联表
-			'join' => array
-			(
-				array
-				(
-					'table' => 'res/info',
-					'type' => 'left join',
-					'on' => array('info_id','id'),
-					'col' => 'info_id',
-				),
-			),
-			'type' => 'all',
-			'order' => array('reorder' => 'desc', 't_1.id' => 'desc'),
-			'page' => array(10, 'list'),
-			'col' => '*',
-		),
-	),
-);
-
-
-# 属性完全自定义吧。这种情况用dever就是方便了。其他框架都需要自己实现
-Dever::load('attr/api')->setDatabaseConfig($attr, $config);
-
-return $config;

+ 0 - 65
app/goods/database/info_category.php

@@ -1,65 +0,0 @@
-<?php
-
-return array
-(
-	# 表名
-	'name' => 'info_category',
-	# 显示给用户看的名称
-	'lang' => '资源分类关联表',
-	'menu' => false,
-
-	# 数据结构
-	'struct' => array
-	(
-		'id' 		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> 'ID',
-			'default' 	=> '',
-			'desc' 		=> '',
-			'match' 	=> 'is_numeric',
-			'search'	=> 'order',
-			//'list'		=> true,
-		),
-		
-		'info_id'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '资源ID',
-			'default' 	=> '',
-			'desc' 		=> '资源ID',
-			'match' 	=> 'is_numeric',
-			'update'	=> 'text',
-			'list'		=> true,
-		),
-
-		'category_id'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '分类ID',
-			'default' 	=> '',
-			'desc' 		=> '分类ID',
-			'match' 	=> 'is_numeric',
-			'update'	=> 'text',
-			'list'		=> true,
-		),
-		
-		'cdate'		=> array
-		(
-			'type' 		=> 'int-11',
-			'name' 		=> '录入时间',
-			'match' 	=> array('is_numeric', DEVER_TIME),
-			'desc' 		=> '',
-			# 只有insert时才生效
-			'insert'	=> true,
-			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
-		),
-	),
-
-	'manage' => array
-	(
-		'delete' => false,
-		'edit' => false,
-		'insert' => false,
-	),
-);

+ 0 - 8
app/goods/index.php

@@ -1,8 +0,0 @@
-<?php
-
-define('DEVER_APP_NAME', 'goods');
-define('DEVER_APP_LANG', '商品管理');
-define('DEVER_APP_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR);
-define('DEVER_MANAGE_ORDER', 200);
-define('DEVER_MANAGE_ICON', 'glyphicon glyphicon-tower layui-icon-tree');
-include(DEVER_APP_PATH . '../boot.php');

+ 0 - 76
app/goods/lib/Author.php

@@ -1,76 +0,0 @@
-<?php
-
-namespace Store\Lib;
-
-use Dever;
-
-class Author
-{
-    # 更新数据
-    public function data($id, $name, $data)
-    {
-        $source_table = Dever::input('source_table');
-
-        $author = Dever::param('author_id', $data);
-
-        if ($author && $id > 0 && $source_table) {
-            $info = Dever::db('store/author')->one($author);
-            if (!$info) {
-                $insert['name'] = $author;
-                $author = Dever::db('store/author')->insert($insert);
-            }
-
-            Dever::db($source_table)->update(array('where_id' => $id, 'author_id' => $author));
-        }
-    }
-
-    # 搜索
-    public function search_api()
-    {
-        $keyword = Dever::input('keyword');
-
-        $yes = Dever::input('yes');
-
-        $where = array();
-
-        if ($yes) {
-            $yes = Dever::db('store/author')->getAll(array('ids' => $yes));
-        }
-        if (!$keyword) {
-            $where['limit'] = '0,50';
-            $data = Dever::db('store/author')->getAll($where);
-        } else {
-            $where['name'] = $keyword;
-            $data = Dever::db('store/author')->getAll($where);
-        }
-
-        $insert = array();
-        if (!$data && $keyword) {
-            $insert[0]['name'] = $keyword . '[新增]';
-            $insert[0]['value'] = $keyword;
-        }
-
-        $result = array();
-        if ($yes) {
-            foreach ($yes as $k => $v) {
-                if (isset($data[$k])) {
-                    unset($data[$k]);
-                }
-                $yes[$k]['selected'] = 'selected';
-            }
-            $data = $insert + $yes + $data;
-
-            $data = array_merge($data, array());
-        } else {
-            $data = $insert + $data;
-
-            $data = array_merge($data, array());
-        }
-
-        if (!$data) {
-            Dever::alert('暂无数据');
-        }
-
-        return $data;
-    }
-}

+ 1 - 4
common.php

@@ -1,10 +1,7 @@
 <?php
 
-
-/*
 function getInfoAttr()
 {
     $category = Dever::input('search_option_category', Dever::input('update_category'));
     return Dever::load('attr/api')->getInfoAttr($category);
-}
-*/
+}

+ 6 - 1
main/assets/sku/admin.html

@@ -105,11 +105,16 @@
                 }
                 rowsArr.push(tmpnum);
             }
-             
+            console.info(len);
+             console.info(rowsArr);
+             console.info(numsArr);
+             console.info(idxArr);
+              console.info(lv1Arr);
             for (var i = 0; i < len; i++) {
                 tableHTML += '        <tr data-row="' + (i+1) + '">';
                  
                 var name = '';
+
                 for (var j = 0; j < lv1Arr.length; j++) {
                     var n = parseInt(i / rowsArr[j]);
                     if (j == 0) {