res.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. layui.use([ 'laypage', 'layer', 'table', 'element','form','upload'], function(){
  2. var laypage = layui.laypage //分页
  3. ,$ = layui.jquery
  4. ,layer = layui.layer //弹层
  5. ,table = layui.table //表格
  6. ,form = layui.form
  7. var $ = layui.$, active = {
  8. mobile: function(){ //获取选中数据
  9. layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8}); //数据提交提示
  10. $.post('/cache/staticcacheclear',{'type':1},function (data) {
  11. layer.msg(data.msg);
  12. })
  13. return false;
  14. },
  15. pc:function(){ //获取选中数据
  16. layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8}); //数据提交提示
  17. $.post('/cache/staticcacheclear',{'type':2},function (data) {
  18. layer.msg(data.msg);
  19. })
  20. return false;
  21. },
  22. backend:function(){ //获取选中数据
  23. layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8}); //数据提交提示
  24. $.post('/cache/staticcacheclear',{'type':3},function (data) {
  25. layer.msg(data.msg);
  26. })
  27. return false;
  28. },
  29. };
  30. $('.demoTable .layui-btn').on('click', function(){
  31. var type = $(this).data('type');
  32. active[type] ? active[type].call(this) : '';
  33. });
  34. });