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

课程购买次数

... ... @@ -34,7 +34,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'teacher_avatar', title: __('Teacher_avatar'), events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'teacher_name', title: __('Teacher_name')},
{field: 'teacher_desc', title: __('Teacher_desc')},
{field: 'is_top', title: __('Is_top'), searchList: {"0":__('Is_top 0'),"1":__('Is_top 1')}, formatter: Table.api.formatter.toggle},
// {field: 'is_top', title: __('Is_top'), searchList: {"0":__('Is_top 0'),"1":__('Is_top 1')}, formatter: Table.api.formatter.toggle},
{field: 'pay_times', title: __('Pay_times')},
//操作栏,默认有编辑、删除或排序按钮,可自定义配置buttons来扩展按钮
{
field: 'operate',
... ... @@ -43,6 +44,39 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
events: Table.api.events.operate,
buttons: [
{
name: 'top',
text: '置顶',
title: '置顶',
classname: 'btn btn-xs btn-danger btn-ajax',
icon: 'fa fa-long-arrow-up',
url: 'mobile/course/course/top?course_id={id}&is_top=1',
visible: function (row) {
if(row.is_top == '0'){
return true;
}
},
success: function (data) {
table.bootstrapTable('refresh');
}
},
{
name: 'top',
text: '取消置顶',
title: '取消置顶',
classname: 'btn btn-xs btn-primary btn-ajax',
icon: 'fa fa-long-arrow-down',
url: 'mobile/course/course/top?course_id={id}&is_top=0',
visible: function (row) {
if(row.is_top == '1'){
return true;
}
},
success: function (data) {
table.bootstrapTable('refresh');
}
},
{
name: 'catalog',
text: '目录管理',
title: '目录管理',
classname: 'btn btn-xs btn-primary btn-dialog',
... ... @@ -50,6 +84,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
url: 'mobile/course/course_catalog?course_id={id}',
},
{
name: 'spec',
text: '规格管理',
title: '规格管理',
classname: 'btn btn-xs btn-primary btn-dialog',
... ...