js 代码
$(document).on("click", ".btn-start", function () {
var that = this;
var ids = Table.api.selectedids(table);
Layer.confirm(
__('确定启动选择的 %s项?', ids.length),
{icon: 3, title: __('Warning'), offset: 0, shadeClose: true},
function (index) {
Fast.api.ajax({
url: "user/start",
type: "post",
data: {ids: ids},
}, function () {
});
Layer.close(index);
table.bootstrapTable('refresh', {});
}
);
});
上面这个函数放在Table.api.bindevent(table); 之上
index.html代码
<a href="javascript:;" class="btn btn-success btn-start btn-disabled disabled {:$auth->check('user/start')?'':'hide'}" > 批量启动</a>