作者 何书鹏
1 个管道 的构建 通过 耗费 3 秒

配置管理

正在显示 21 个修改的文件 包含 509 行增加57 行删除
<?php
namespace app\admin\controller\mobile;
use app\common\controller\Backend;
use fast\Tree;
/**
* 配置管理
*
* @icon fa fa-circle-o
*/
class Config extends Backend
{
/**
* Config模型对象
* @var \app\admin\model\mobile\Config
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\mobile\Config;
}
}
... ...
... ... @@ -5,23 +5,23 @@ namespace app\admin\controller\mobile;
use app\common\controller\Backend;
/**
* 每日一练管理
* 首页轮播图管理
*
* @icon fa fa-circle-o
*/
class Everyday extends Backend
class IndexBanner extends Backend
{
/**
* Everyday模型对象
* @var \app\admin\model\mobile\Everyday
* IndexBanner模型对象
* @var \app\admin\model\mobile\IndexBanner
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\mobile\Everyday;
$this->model = new \app\admin\model\mobile\IndexBanner;
}
... ... @@ -63,7 +63,7 @@ class Everyday extends Backend
->select();
foreach ($list as $row) {
$row->visible(['id','title','uptime','do_num','updatetime']);
$row->visible(['id','image','url','updatetime']);
}
$list = collection($list)->toArray();
... ...
<?php
namespace app\admin\controller\mobile;
use app\common\controller\Backend;
/**
* 首页固定分类管理
*
* @icon fa fa-circle-o
*/
class IndexCategory extends Backend
{
/**
* IndexCategory模型对象
* @var \app\admin\model\mobile\IndexCategory
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\mobile\IndexCategory;
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 查看
*/
public function index()
{
//当前是否为关联查询
$this->relationSearch = false;
//设置过滤方法
$this->request->filter(['strip_tags', 'trim']);
if ($this->request->isAjax())
{
//如果发送的来源是Selectpage,则转发到Selectpage
if ($this->request->request('keyField'))
{
return $this->selectpage();
}
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$total = $this->model
->where($where)
->order($sort, $order)
->count();
$list = $this->model
->where($where)
->order($sort, $order)
->limit($offset, $limit)
->select();
foreach ($list as $row) {
$row->visible(['id','name','image','updatetime']);
}
$list = collection($list)->toArray();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
}
... ...
<?php
return [
'Id' => 'id',
'Title' => '试卷标题',
'Uptime' => '上架时间',
'Do_num' => '做过人数',
'Id' => 'ID',
'Image' => '图片地址',
'Url' => '链接地址',
'Createtime' => '创建时间',
'Updatetime' => '修改时间'
];
... ...
<?php
return [
'Id' => 'ID',
'Name' => '名称',
'Image' => '内容',
'Updatetime' => '修改时间'
];
... ...
<?php
namespace app\admin\model\mobile;
use think\Model;
class Config extends Model
{
// 表名
protected $name = 'mobile_config';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = 'updatetime';
protected $deleteTime = false;
}
... ...
... ... @@ -5,7 +5,7 @@ namespace app\admin\model\mobile;
use think\Model;
class Everyday extends Model
class IndexBanner extends Model
{
... ... @@ -13,7 +13,7 @@ class Everyday extends Model
// 表名
protected $name = 'mobile_everyday';
protected $name = 'mobile_index_banner';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
... ... @@ -25,7 +25,7 @@ class Everyday extends Model
// 追加属性
protected $append = [
'uptime_text'
];
... ... @@ -33,16 +33,8 @@ class Everyday extends Model
public function getUptimeTextAttr($value, $data)
{
$value = $value ? $value : (isset($data['uptime']) ? $data['uptime'] : '');
return is_numeric($value) ? date("Y-m-d H:i:s", $value) : $value;
}
protected function setUptimeAttr($value)
{
return $value === '' ? null : ($value && !is_numeric($value) ? strtotime($value) : $value);
}
}
... ...
<?php
namespace app\admin\model\mobile;
use think\Model;
class IndexCategory extends Model
{
// 表名
protected $name = 'mobile_index_category';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = false;
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
... ... @@ -4,7 +4,7 @@ namespace app\admin\validate\mobile;
use think\Validate;
class Everyday extends Validate
class Config extends Validate
{
/**
* 验证规则
... ...
<?php
namespace app\admin\validate\mobile;
use think\Validate;
class IndexBanner extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate\mobile;
use think\Validate;
class IndexCategory extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">APP启动页:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-startup_page" class="form-control" size="35" name="row[startup_page]" type="text" value="{$row.startup_page}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-startup_page" class="btn btn-danger plupload" data-input-id="c-startup_page" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-startup_page"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-startup_page" class="btn btn-primary fachoose" data-input-id="c-startup_page" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-startup_page"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">用户注册协议:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-user_agreement" class="form-control editor" rows="5" name="row[user_agreement]" cols="50">{$row.user_agreement|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">企业注册协议:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-company_agreement" class="form-control editor" rows="5" name="row[company_agreement]" cols="50">{$row.company_agreement|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">暂不登录提示:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-no_login" class="form-control editor" rows="5" name="row[no_login]" cols="50">{$row.no_login|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">模拟试题广告图:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-simulation_adver" class="form-control" size="35" name="row[simulation_adver]" type="text" value="{$row.simulation_adver}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-simulation_adver" class="btn btn-danger plupload" data-input-id="c-simulation_adver" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-simulation_adver"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-simulation_adver" class="btn btn-primary fachoose" data-input-id="c-simulation_adver" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-simulation_adver"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">历年真题广告图:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-old_adver" class="form-control" size="35" name="row[old_adver]" type="text" value="{$row.old_adver}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-old_adver" class="btn btn-danger plupload" data-input-id="c-old_adver" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-old_adver"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-old_adver" class="btn btn-primary fachoose" data-input-id="c-old_adver" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-old_adver"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">通关密卷套餐说明:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-spec_intro" class="form-control editor" rows="5" name="row[spec_intro]" cols="50">{$row.spec_intro|htmlentities}</textarea>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="">
<div class="input-group">
<input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-image"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-image"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Uptime')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-uptime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[uptime]" type="text" value="{:date('Y-m-d H:i:s')}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Do_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-do_num" data-rule="required" class="form-control" name="row[do_num]" type="number" value="0">
<input id="c-url" data-rule="required" class="form-control" name="row[url]" type="text" value="">
</div>
</div>
<div class="form-group layer-footer">
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text" value="{$row.title|htmlentities}">
<div class="input-group">
<input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-image"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-image"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Uptime')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('Url')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-uptime" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[uptime]" type="text" value="{:$row.uptime?datetime($row.uptime):''}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Do_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-do_num" data-rule="required" class="form-control" name="row[do_num]" type="number" value="{$row.do_num|htmlentities}">
<input id="c-url" data-rule="required" class="form-control" name="row[url]" type="text" value="{$row.url|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
... ...
<div class="panel panel-default panel-intro">
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
<div class="tab-pane fade active in" id="one">
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('mobile/index_banner/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('mobile/index_banner/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('mobile/index_banner/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('mobile/index_banner/edit')}"
data-operate-del="{:$auth->check('mobile/index_banner/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-image"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-image"></ul>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-image"></span>
</div>
<ul class="row list-inline plupload-preview" id="p-image"></ul>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
</div>
</div>
</form>
... ...
... ... @@ -7,15 +7,13 @@
<div class="widget-body no-padding">
<div id="toolbar" class="toolbar">
<a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('mobile/everyday/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('mobile/everyday/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
<a href="javascript:;" class="btn btn-danger btn-del btn-disabled disabled {:$auth->check('mobile/everyday/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-success btn-edit btn-disabled disabled {:$auth->check('mobile/index_category/edit')?'':'hide'}" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
</div>
<table id="table" class="table table-striped table-bordered table-hover table-nowrap"
data-operate-edit="{:$auth->check('mobile/everyday/edit')}"
data-operate-del="{:$auth->check('mobile/everyday/del')}"
data-operate-edit="{:$auth->check('mobile/index_category/edit')}"
data-operate-del="false"
width="100%">
</table>
</div>
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
\ No newline at end of file
... ...
... ... @@ -5,12 +5,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mobile/everyday/index' + location.search,
add_url: 'mobile/everyday/add',
edit_url: 'mobile/everyday/edit',
del_url: 'mobile/everyday/del',
multi_url: 'mobile/everyday/multi',
table: 'mobile_everyday',
index_url: 'mobile/index_banner/index' + location.search,
add_url: 'mobile/index_banner/add',
edit_url: 'mobile/index_banner/edit',
del_url: 'mobile/index_banner/del',
multi_url: 'mobile/index_banner/multi',
table: 'mobile_index_banner',
}
});
... ... @@ -25,9 +25,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'title', title: __('Title')},
{field: 'uptime', title: __('Uptime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'do_num', title: __('Do_num')},
{field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'url', title: __('Url'), formatter: Table.api.formatter.url},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mobile/index_category/index' + location.search,
add_url: 'mobile/index_category/add',
edit_url: 'mobile/index_category/edit',
del_url: 'mobile/index_category/del',
multi_url: 'mobile/index_category/multi',
table: 'mobile_index_category',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'name', title: __('Name')},
{field: 'image', title: __('Image'), events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'updatetime', title: __('Updatetime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
]
]
});
// 为表格绑定事件
Table.api.bindevent(table);
},
add: function () {
Controller.api.bindevent();
},
edit: function () {
Controller.api.bindevent();
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
}
}
};
return Controller;
});
\ No newline at end of file
... ...