diff --git a/application/admin/controller/Form.php b/application/admin/controller/Form.php
index 0d72d846..af245feb 100644
--- a/application/admin/controller/Form.php
+++ b/application/admin/controller/Form.php
@@ -14,7 +14,49 @@ class Form extends Admin {
//自定义表单
public function index(){
- $this->assign('meta_title','自定义表单');
+ $list = array();
+
+ $data = array(
+ 'list' => $list,
+ //'page' => $list->render()
+ );
+ $this->setMeta('自定义表单');
+ $this->assign($data);
return $this->fetch();
}
+
+ /**
+ * 添加表单
+ */
+ public function add(){
+ if (IS_POST) {
+ # code...
+ }else{
+ return $this->fetch('public/edit');
+ }
+ }
+
+ /**
+ * 编辑表单
+ */
+ public function edit(){
+ if (IS_POST) {
+ # code...
+ }else{
+ return $this->fetch('public/edit');
+ }
+ }
+
+ /**
+ * 删除表单
+ */
+ public function del(){
+ $id = $this->getArrayParam('id');
+ $result = false;
+ if (false !== $result) {
+ return $this->success('删除成功!');
+ }else{
+ return $this->error('删除失败!');
+ }
+ }
}
\ No newline at end of file
diff --git a/application/admin/view/form/index.html b/application/admin/view/form/index.html
index 6938f023..0e155834 100644
--- a/application/admin/view/form/index.html
+++ b/application/admin/view/form/index.html
@@ -3,4 +3,33 @@
{/block}
{block name="body"}
+
{/block}
\ No newline at end of file
diff --git a/application/admin/view/model/index.html b/application/admin/view/model/index.html
index e589b041..58b242eb 100644
--- a/application/admin/view/model/index.html
+++ b/application/admin/view/model/index.html
@@ -30,33 +30,33 @@
{notempty name="list"}
- {volist name="list" id="vo"}
+ {volist name="list" id="item"}
|
-
+
|
- {$vo.id} |
- {$vo.name} |
+ {$item['id']} |
+ {$item['name']} |
- {$vo.title}
+ {$item.title}
|
- {$vo.create_time|time_format}
+ {$item.create_time|time_format}
|
- {if $vo['status']}
- {$vo['status_text']}
+ {if $item['status']}
+ {$item['status_text']}
{else/}
- {$vo['status_text']}
+ {$item['status_text']}
{/if}
|
- 字段
- {$vo.status|show_status_op}
- 编辑
- 删除
- {if $vo['extend']}
- 数据
+ 字段
+ {$item['status']|show_status_op}
+ 编辑
+ 删除
+ {if $item['extend']}
+ 数据
{/if}
|
diff --git a/application/common/model/Model.php b/application/common/model/Model.php
index 81bb67d0..55e3fca4 100644
--- a/application/common/model/Model.php
+++ b/application/common/model/Model.php
@@ -17,7 +17,9 @@ class Model extends Base{
protected $auto = [ 'update_time', 'field_sort', 'attribute_list'];
protected $insert = ['name', 'create_time', 'status'=>1];
protected $type = array(
- 'id' => 'integer'
+ 'id' => 'integer',
+ 'create_time' => 'integer',
+ 'update_time' => 'integer'
);
public function setFieldSortAttr($value){
diff --git a/application/common/model/User.php b/application/common/model/User.php
index 4b61a837..d803fe7d 100644
--- a/application/common/model/User.php
+++ b/application/common/model/User.php
@@ -20,6 +20,7 @@ class User extends Base{
protected $type = array(
'uid' => 'integer',
+ 'reg_time' => 'integer'
);
protected $insert = array('salt', 'password', 'status', 'reg_time');
protected $update = array();
diff --git a/application/config.php b/application/config.php
index d9c6b947..b3d34b71 100644
--- a/application/config.php
+++ b/application/config.php
@@ -97,7 +97,7 @@ return array(
// 日志保存目录
'path' => LOG_PATH,
),
- 'app_trace' => true,
+ 'app_trace' => false,
// 页面Trace信息
'trace' => array(
//支持Html,Console 设为false则不显示
diff --git a/template/default/content/article/list.html b/template/default/content/article/list.html
index 52c8c0a1..44cb213c 100644
--- a/template/default/content/article/list.html
+++ b/template/default/content/article/list.html
@@ -24,8 +24,8 @@
- {$item['create_time']|date='Y-m-d H:i:s',###}
- {$item['create_time']|date='Y-m-d H:i:s',###}
+ {$item['create_time']|date='m',###}
+ {$item['create_time']|date='d',###}
{$item['title']|msubstr=###,0,80}