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

企业套餐

正在显示 26 个修改的文件 包含 489 行增加64 行删除
<?php
namespace app\admin\controller\mobile;
use app\common\controller\Backend;
use app\admin\model\User;
use think\Db;
/**
* 统计
*
* @icon fa fa-circle-o
*/
class Statistic extends Backend
{
/**
* Statistic模型对象
* @var \app\mobile\model\Statistic
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\mobile\model\Statistic;
$this->view->assign("typeList", $this->model->getTypeList());
}
/**
* 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
* 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
* 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
*/
/**
* 查看
*/
public function index()
{
//当前是否为关联查询
$this->relationSearch = true;
//设置过滤方法
$this->request->filter(['strip_tags', 'trim']);
if ($this->request->isAjax())
{
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
$type = $this->request->param('type','day');
switch ($type){
case 'day':
$date = "DATE_FORMAT(today,'%y年%m月%d日')";
$order = "DATE_FORMAT(today,'%y%m%d')";
break;
case 'week':
$date = "DATE_FORMAT(today,'%y年%u周')";
$order = "DATE_FORMAT(today,'%y%u')";
break;
case 'month':
$date = "DATE_FORMAT(today,'%y年%m月')";
$order = "DATE_FORMAT(today,'%y%m')";
break;
}
$total = $this->model
->field("*,{$date} date")
->group('date')
->count();
$list = $this->model
->field("*,{$date} date")
->order($order)
->group('date')
->select();
foreach ($list as $row) {
$row->visible(['id','register_times','active_times','startup_times','today','date']);
}
$list = collection($list)->toArray();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
}
... ...
<?php
namespace app\admin\controller\mobile\package;
use app\common\controller\Backend;
use think\Db;
/**
* 企业套餐管理
*
* @icon fa fa-circle-o
*/
class Package extends Backend
{
/**
* Package模型对象
* @var \app\admin\model\mobile\package\Package
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\mobile\package\Package;
}
/**
* 默认生成的控制器所继承的父类中有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['secret_name'] = Db::name('mobile_secret')->whereIn('id',$row['secret_ids'])->column('title');
$row['course_name'] = Db::name('mobile_course')->whereIn('id',$row['course_ids'])->column('title');
$row->visible(['id','title','current_price','buy_num_virtual','buy_num_real'])->append(['secret_name','course_name']);
}
$list = collection($list)->toArray();
$result = array("total" => $total, "rows" => $list);
return json($result);
}
return $this->view->fetch();
}
}
... ...
<?php
namespace app\admin\controller\mobile;
namespace app\admin\controller\mobile\secret;
use app\common\controller\Backend;
... ... @@ -14,14 +14,14 @@ class Secret extends Backend
/**
* Secret模型对象
* @var \app\admin\model\mobile\Secret
* @var \app\admin\model\mobile\secret\Secret
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\mobile\Secret;
$this->model = new \app\admin\model\mobile\secret\Secret;
}
... ... @@ -63,7 +63,7 @@ class Secret extends Backend
->select();
foreach ($list as $row) {
$row->visible(['id','title','current_price','original_price','do_num_virtual','do_num_real','buy_num_virtual','buy_num_real','updatetime']);
$row->visible(['id','title','current_price','original_price','do_num_virtual','do_num_real','buy_num_virtual','buy_num_real']);
}
$list = collection($list)->toArray();
... ...
<?php
namespace app\admin\controller\mobile;
namespace app\admin\controller\mobile\secret;
use app\common\controller\Backend;
use think\Db;
/**
* 密卷规格管理
... ... @@ -15,14 +14,14 @@ class SecretSpec extends Backend
/**
* SecretSpec模型对象
* @var \app\admin\model\mobile\SecretSpec
* @var \app\admin\model\mobile\secret\SecretSpec
*/
protected $model = null;
public function _initialize()
{
parent::_initialize();
$this->model = new \app\admin\model\mobile\SecretSpec;
$this->model = new \app\admin\model\mobile\secret\SecretSpec;
$this->view->assign("isTopList", $this->model->getIsTopList());
}
... ... @@ -64,7 +63,7 @@ class SecretSpec extends Backend
->select();
foreach ($list as $row) {
$row->visible(['id','name','current_price','original_price','people_num','is_top','updatetime']);
$row->visible(['id','name','current_price','original_price','people_num','is_top']);
}
$list = collection($list)->toArray();
... ... @@ -89,7 +88,7 @@ class SecretSpec extends Backend
if ($this->dataLimit && $this->dataLimitFieldAutoFill) {
$params[$this->dataLimitField] = $this->auth->id;
}
$params['secret_id'] = $secret_id;
$result = false;
Db::startTrans();
... ...
<?php
return [
'Id' => 'ID',
'Title' => '标题',
'Current_price' => '当前价格',
'Secret_ids' => '包含密卷',
'Course_ids' => '包含课程',
'Buy_num_virtual' => '虚拟购买量',
'Buy_num_real' => '真实购买量',
'Createtime' => '创建时间',
'Updatetime' => '更新时间'
];
... ...
<?php
return [
'Id' => 'id',
'Title' => '试卷标题',
'Current_price' => '当前价格',
'Original_price' => '原始价格',
'Do_num_virtual' => '虚拟答题人数',
'Do_num_real' => '真实答题人数',
'Description' => '试卷介绍',
'Createtime' => '创建时间',
'Updatetime' => '修改时间',
'Buy_num_virtual' => '虚拟购买量',
'Buy_num_real' => '真实购买量',
];
<?php
return [
'Id' => 'id',
'Title' => '试卷标题',
'Current_price' => '当前价格',
'Original_price' => '原始价格',
'Do_num_virtual' => '虚拟答题人数',
'Do_num_real' => '真实答题人数',
'Description' => '试卷介绍',
'Buy_num_virtual' => '虚拟购买量',
'Buy_num_real' => '真实购买量',
'Createtime' => '创建时间',
'Updatetime' => '修改时间'
];
... ...
<?php
namespace app\admin\model\mobile\package;
use think\Model;
class Package extends Model
{
// 表名
protected $name = 'mobile_package';
// 自动写入时间戳字段
protected $autoWriteTimestamp = 'int';
// 定义时间戳字段名
protected $createTime = 'createtime';
protected $updateTime = 'updatetime';
protected $deleteTime = false;
// 追加属性
protected $append = [
];
}
... ...
<?php
namespace app\admin\model\mobile;
namespace app\admin\model\mobile\secret;
use think\Model;
... ...
<?php
namespace app\admin\model\mobile;
namespace app\admin\model\mobile\secret;
use think\Model;
... ...
<?php
namespace app\admin\validate\mobile\package;
use think\Validate;
class Package extends Validate
{
/**
* 验证规则
*/
protected $rule = [
];
/**
* 提示消息
*/
protected $message = [
];
/**
* 验证场景
*/
protected $scene = [
'add' => [],
'edit' => [],
];
}
... ...
<?php
namespace app\admin\validate\mobile;
namespace app\admin\validate\mobile\secret;
use think\Validate;
... ...
<?php
namespace app\admin\validate\mobile;
namespace app\admin\validate\mobile\secret;
use think\Validate;
... ...
<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>
<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>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Current_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-current_price" data-rule="required" class="form-control" step="0.01" name="row[current_price]" type="number" value="0.00">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Secret_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-secret_ids" data-rule="required" data-field="title" data-source="mobile/secret/index" data-multiple="true" class="form-control selectpage" name="row[secret_ids]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Course_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-course_ids" data-rule="required" data-field="title" data-source="mobile/course/course/index" data-multiple="true" class="form-control selectpage" name="row[course_ids]" type="text" value="">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Buy_num_virtual')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-buy_num_virtual" data-rule="required" class="form-control" name="row[buy_num_virtual]" type="number" value="0">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Buy_num_real')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-buy_num_real" data-rule="required" class="form-control" name="row[buy_num_real]" type="number" value="0" readonly>
</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">{:__('Title')}:</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>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Current_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-current_price" data-rule="required" class="form-control" step="0.01" name="row[current_price]" type="number" value="{$row.current_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Secret_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-secret_ids" data-rule="required" data-field="title" data-source="mobile/secret/index" data-multiple="true" class="form-control selectpage" name="row[secret_ids]" type="text" value="{$row.secret_ids|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Course_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-course_ids" data-rule="required" data-field="title" data-source="mobile/course/course/index" data-multiple="true" class="form-control selectpage" name="row[course_ids]" type="text" value="{$row.course_ids|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Buy_num_virtual')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-buy_num_virtual" data-rule="required" class="form-control" name="row[buy_num_virtual]" type="number" value="{$row.buy_num_virtual|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Buy_num_real')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-buy_num_real" data-rule="required" class="form-control" name="row[buy_num_real]" type="number" value="{$row.buy_num_real|htmlentities}" readonly>
</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>
... ...
<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/package/package/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/package/package/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/package/package/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/package/package/edit')}"
data-operate-del="{:$auth->check('mobile/package/package/del')}"
width="100%">
</table>
</div>
</div>
</div>
</div>
</div>
... ...
... ... @@ -33,7 +33,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-description" class="form-control " rows="5" name="row[description]" cols="50"></textarea>
<textarea id="c-description" class="form-control editor" rows="5" name="row[description]" cols="50"></textarea>
</div>
</div>
<div class="form-group">
... ...
... ... @@ -33,7 +33,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Description')}:</label>
<div class="col-xs-12 col-sm-8">
<textarea id="c-description" class="form-control " rows="5" name="row[description]" cols="50">{$row.description|htmlentities}</textarea>
<textarea id="c-description" class="form-control editor" rows="5" name="row[description]" cols="50">{$row.description|htmlentities}</textarea>
</div>
</div>
<div class="form-group">
... ...
... ... @@ -7,15 +7,15 @@
<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/secret/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/secret/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/secret/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('mobile/secret/secret/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/secret/secret/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/secret/secret/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/secret/edit')}"
data-operate-del="{:$auth->check('mobile/secret/del')}"
data-operate-edit="{:$auth->check('mobile/secret/secret/edit')}"
data-operate-del="{:$auth->check('mobile/secret/secret/del')}"
width="100%">
</table>
</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">{:__('Secret_id')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-secret_id" data-rule="required" data-source="secret/index" class="form-control selectpage" name="row[secret_id]" type="text" value="">-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
... ...
<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">{:__('Secret_id')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-secret_id" data-rule="required" data-source="secret/index" class="form-control selectpage" name="row[secret_id]" type="text" value="{$row.secret_id|htmlentities}">-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -7,15 +7,15 @@
<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/secret_spec/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/secret_spec/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/secret_spec/del')?'':'hide'}" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
<a href="javascript:;" class="btn btn-success btn-add {:$auth->check('mobile/secret/secret_spec/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/secret/secret_spec/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/secret/secret_spec/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/secret_spec/edit')}"
data-operate-del="{:$auth->check('mobile/secret_spec/del')}"
data-operate-edit="{:$auth->check('mobile/secret/secret_spec/edit')}"
data-operate-del="{:$auth->check('mobile/secret/secret_spec/del')}"
width="100%">
</table>
</div>
... ...
define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
var Controller = {
index: function () {
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mobile/package/package/index' + location.search,
add_url: 'mobile/package/package/add',
edit_url: 'mobile/package/package/edit',
del_url: 'mobile/package/package/del',
multi_url: 'mobile/package/package/multi',
table: 'mobile_package',
}
});
var table = $("#table");
// 初始化表格
table.bootstrapTable({
url: $.fn.bootstrapTable.defaults.extend.index_url,
pk: 'id',
sortName: 'id',
columns: [
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'title', title: __('Title')},
{field: 'secret_name', title: __('Secret_ids'),operate:false,formatter:Table.api.formatter.label},
{field: 'course_name', title: __('Course_ids'),operate:false,formatter:Table.api.formatter.label},
{field: 'current_price', title: __('Current_price'), operate:'BETWEEN'},
{field: 'buy_num_virtual', title: __('Buy_num_virtual')},
{field: 'buy_num_real', title: __('Buy_num_real')},
{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
... ...
... ... @@ -5,11 +5,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mobile/secret/index' + location.search,
add_url: 'mobile/secret/add',
edit_url: 'mobile/secret/edit',
del_url: 'mobile/secret/del',
multi_url: 'mobile/secret/multi',
index_url: 'mobile/secret/secret/index' + location.search,
add_url: 'mobile/secret/secret/add',
edit_url: 'mobile/secret/secret/edit',
del_url: 'mobile/secret/secret/del',
multi_url: 'mobile/secret/secret/multi',
table: 'mobile_secret',
}
});
... ... @@ -46,13 +46,13 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
icon: 'fa fa-list',
url: 'mobile/simulation_question?target_id={id}&target_type=5',
},
{
text: '规格管理',
title: '规格管理',
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: 'mobile/secret_spec?secret_id={id}',
}
{
text: '规格管理',
title: '规格管理',
classname: 'btn btn-xs btn-primary btn-dialog',
icon: 'fa fa-list',
url: 'mobile/secret/secret_spec?secret_id={id}',
}
],
formatter: Table.api.formatter.operate
}
... ...
... ... @@ -5,11 +5,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
// 初始化表格参数配置
Table.api.init({
extend: {
index_url: 'mobile/secret_spec/index' + location.search,
add_url: 'mobile/secret_spec/add' + location.search,
edit_url: 'mobile/secret_spec/edit',
del_url: 'mobile/secret_spec/del',
multi_url: 'mobile/secret_spec/multi',
index_url: 'mobile/secret/secret_spec/index' + location.search,
add_url: 'mobile/secret/secret_spec/add' + location.search,
edit_url: 'mobile/secret/secret_spec/edit',
del_url: 'mobile/secret/secret_spec/del',
multi_url: 'mobile/secret/secret_spec/multi',
table: 'mobile_secret_spec',
}
});
... ... @@ -30,7 +30,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'original_price', title: __('Original_price'), operate:'BETWEEN'},
{field: 'people_num', title: __('People_num')},
{field: 'is_top', title: __('Is_top'), searchList: {"0":__('Is_top 0'),"1":__('Is_top 1')}, formatter: Table.api.formatter.normal},
{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}
]
]
... ... @@ -47,11 +46,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
},
api: {
bindevent: function () {
$(document).on("change", "#c-is_top", function () {
if($(this).val() == '1'){
$('#c-people_num').val(999999);
}
});
$(document).on("change", "#c-is_top", function () {
if($(this).val() == '1'){
$('#c-people_num').val(999999);
}
});
Form.api.bindevent($("form[role=form]"));
}
}
... ...