切换导航条
此项目
正在载入...
登录
郭盛
/
enterprise
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
何书鹏
4 years ago
提交
2179991ff4846eb111a9d9fa53a2fa785ee570a9
1 个父辈
74656f5f
1 个管道 的构建
通过
耗费 1 秒
企业套餐
变更
26
构建
1
显示空白字符变更
内嵌
并排对比
正在显示
26 个修改的文件
包含
477 行增加
和
52 行删除
application/admin/controller/mobile/Statistic.php
application/admin/controller/mobile/package/Package.php
application/admin/controller/mobile/Secret.php → application/admin/controller/mobile/secret/Secret.php
application/admin/controller/mobile/SecretSpec.php → application/admin/controller/mobile/secret/SecretSpec.php
application/admin/lang/zh-cn/mobile/package/package.php
application/admin/lang/zh-cn/mobile/secret.php
application/admin/lang/zh-cn/mobile/secret/secret.php
application/admin/lang/zh-cn/mobile/secret_spec.php → application/admin/lang/zh-cn/mobile/secret/secret_spec.php
application/admin/model/mobile/package/Package.php
application/admin/model/mobile/Secret.php → application/admin/model/mobile/secret/Secret.php
application/admin/model/mobile/SecretSpec.php → application/admin/model/mobile/secret/SecretSpec.php
application/admin/validate/mobile/package/Package.php
application/admin/validate/mobile/Secret.php → application/admin/validate/mobile/secret/Secret.php
application/admin/validate/mobile/SecretSpec.php → application/admin/validate/mobile/secret/SecretSpec.php
application/admin/view/mobile/package/package/add.html
application/admin/view/mobile/package/package/edit.html
application/admin/view/mobile/package/package/index.html
application/admin/view/mobile/secret/add.html → application/admin/view/mobile/secret/secret/add.html
application/admin/view/mobile/secret/edit.html → application/admin/view/mobile/secret/secret/edit.html
application/admin/view/mobile/secret/index.html → application/admin/view/mobile/secret/secret/index.html
application/admin/view/mobile/secret_spec/add.html → application/admin/view/mobile/secret/secret_spec/add.html
application/admin/view/mobile/secret_spec/edit.html → application/admin/view/mobile/secret/secret_spec/edit.html
application/admin/view/mobile/secret_spec/index.html → application/admin/view/mobile/secret/secret_spec/index.html
public/assets/js/backend/mobile/package/package.js
public/assets/js/backend/mobile/secret.js → public/assets/js/backend/mobile/secret/secret.js
public/assets/js/backend/mobile/secret_spec.js → public/assets/js/backend/mobile/secret/secret_spec.js
application/admin/controller/mobile/Statistic.php
0 → 100644
查看文件 @
2179991
<?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
();
}
}
...
...
application/admin/controller/mobile/package/Package.php
0 → 100644
查看文件 @
2179991
<?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
();
}
}
...
...
application/admin/controller/mobile/Secret.php → application/admin/controller/mobile/
secret/
Secret.php
查看文件 @
2179991
<?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
();
...
...
application/admin/controller/mobile/SecretSpec.php → application/admin/controller/mobile/
secret/
SecretSpec.php
查看文件 @
2179991
<?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
();
...
...
application/admin/lang/zh-cn/mobile/package/package.php
0 → 100644
查看文件 @
2179991
<?php
return
[
'Id'
=>
'ID'
,
'Title'
=>
'标题'
,
'Current_price'
=>
'当前价格'
,
'Secret_ids'
=>
'包含密卷'
,
'Course_ids'
=>
'包含课程'
,
'Buy_num_virtual'
=>
'虚拟购买量'
,
'Buy_num_real'
=>
'真实购买量'
,
'Createtime'
=>
'创建时间'
,
'Updatetime'
=>
'更新时间'
];
...
...
application/admin/lang/zh-cn/mobile/secret.php
已删除
100644 → 0
查看文件 @
74656f5
<?php
return
[
'Id'
=>
'id'
,
'Title'
=>
'试卷标题'
,
'Current_price'
=>
'当前价格'
,
'Original_price'
=>
'原始价格'
,
'Do_num_virtual'
=>
'虚拟答题人数'
,
'Do_num_real'
=>
'真实答题人数'
,
'Description'
=>
'试卷介绍'
,
'Createtime'
=>
'创建时间'
,
'Updatetime'
=>
'修改时间'
,
'Buy_num_virtual'
=>
'虚拟购买量'
,
'Buy_num_real'
=>
'真实购买量'
,
];
application/admin/lang/zh-cn/mobile/secret/secret.php
0 → 100644
查看文件 @
2179991
<?php
return
[
'Id'
=>
'id'
,
'Title'
=>
'试卷标题'
,
'Current_price'
=>
'当前价格'
,
'Original_price'
=>
'原始价格'
,
'Do_num_virtual'
=>
'虚拟答题人数'
,
'Do_num_real'
=>
'真实答题人数'
,
'Description'
=>
'试卷介绍'
,
'Buy_num_virtual'
=>
'虚拟购买量'
,
'Buy_num_real'
=>
'真实购买量'
,
'Createtime'
=>
'创建时间'
,
'Updatetime'
=>
'修改时间'
];
...
...
application/admin/lang/zh-cn/mobile/secret_spec.php → application/admin/lang/zh-cn/mobile/secret
/secret
_spec.php
查看文件 @
2179991
application/admin/model/mobile/package/Package.php
0 → 100644
查看文件 @
2179991
<?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
=
[
];
}
...
...
application/admin/model/mobile/Secret.php → application/admin/model/mobile/
secret/
Secret.php
查看文件 @
2179991
<?php
namespace
app\admin\model\mobile
;
namespace
app\admin\model\mobile
\secret
;
use
think\Model
;
...
...
application/admin/model/mobile/SecretSpec.php → application/admin/model/mobile/
secret/
SecretSpec.php
查看文件 @
2179991
<?php
namespace
app\admin\model\mobile
;
namespace
app\admin\model\mobile
\secret
;
use
think\Model
;
...
...
application/admin/validate/mobile/package/Package.php
0 → 100644
查看文件 @
2179991
<?php
namespace
app\admin\validate\mobile\package
;
use
think\Validate
;
class
Package
extends
Validate
{
/**
* 验证规则
*/
protected
$rule
=
[
];
/**
* 提示消息
*/
protected
$message
=
[
];
/**
* 验证场景
*/
protected
$scene
=
[
'add'
=>
[],
'edit'
=>
[],
];
}
...
...
application/admin/validate/mobile/Secret.php → application/admin/validate/mobile/
secret/
Secret.php
查看文件 @
2179991
<?php
namespace
app\admin\validate\mobile
;
namespace
app\admin\validate\mobile
\secret
;
use
think\Validate
;
...
...
application/admin/validate/mobile/SecretSpec.php → application/admin/validate/mobile/
secret/
SecretSpec.php
查看文件 @
2179991
<?php
namespace
app\admin\validate\mobile
;
namespace
app\admin\validate\mobile
\secret
;
use
think\Validate
;
...
...
application/admin/view/mobile/package/package/add.html
0 → 100644
查看文件 @
2179991
<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>
...
...
application/admin/view/mobile/package/package/edit.html
0 → 100644
查看文件 @
2179991
<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>
...
...
application/admin/view/mobile/package/package/index.html
0 → 100644
查看文件 @
2179991
<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>
...
...
application/admin/view/mobile/secret/add.html → application/admin/view/mobile/secret/
secret/
add.html
查看文件 @
2179991
...
...
@@ -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"
>
...
...
application/admin/view/mobile/secret/edit.html → application/admin/view/mobile/secret/
secret/
edit.html
查看文件 @
2179991
...
...
@@ -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"
>
...
...
application/admin/view/mobile/secret/index.html → application/admin/view/mobile/secret/
secret/
index.html
查看文件 @
2179991
...
...
@@ -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>
...
...
application/admin/view/mobile/secret_spec/add.html → application/admin/view/mobile/secret
/secret
_spec/add.html
查看文件 @
2179991
<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"
>
...
...
application/admin/view/mobile/secret_spec/edit.html → application/admin/view/mobile/secret
/secret
_spec/edit.html
查看文件 @
2179991
<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"
>
...
...
application/admin/view/mobile/secret_spec/index.html → application/admin/view/mobile/secret
/secret
_spec/index.html
查看文件 @
2179991
...
...
@@ -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>
...
...
public/assets/js/backend/mobile/package/package.js
0 → 100644
查看文件 @
2179991
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
...
...
public/assets/js/backend/mobile/secret.js → public/assets/js/backend/mobile/secret
/secret
.js
查看文件 @
2179991
...
...
@@ -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'
,
}
});
...
...
@@ -51,7 +51,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
title
:
'规格管理'
,
classname
:
'btn btn-xs btn-primary btn-dialog'
,
icon
:
'fa fa-list'
,
url
:
'mobile
/secret_spec?secret_id={id}'
,
url
:
'mobile/secret
/secret_spec?secret_id={id}'
,
}
],
formatter
:
Table
.
api
.
formatter
.
operate
...
...
public/assets/js/backend/mobile/secret_spec.js → public/assets/js/backend/mobile/secret
/secret
_spec.js
查看文件 @
2179991
...
...
@@ -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
}
]
]
...
...
请
注册
或
登录
后发表评论