ajax layer 加载层结合实现

﹏ヽ暗。殇╰゛Y 2021-09-30 06:28 622阅读 0赞

注:https://blog.csdn.net/weixin_38728273/article/details/88867335

  1. //ajax 提交 批量 事件
  2. var piliang = {
  3. tijiao: function (data) {
  4. $.ajax({
  5. data: JSON.stringify(data),
  6. type: 'post',
  7. dataType: 'JSON',
  8. contentType: 'application/json',
  9. url: '/house/piLiangTne',
  10. layerIndex: -1,
  11. beforeSend: function () {
  12. this.layerIndex = layer.load(0, {shade: [0.5, '#666c7f']});
  13. },
  14. complete: function () {
  15. layer.close(this.layerIndex);
  16. },
  17. success: function (e) {
  18. $("#submitData").attr("disabled", false);
  19. if (e == 200) {
  20. layer.msg("已提交申请");
  21. } else {
  22. layer.msg("失败");
  23. }
  24. }
  25. });
  26. }
  27. };

发表评论

表情:
评论列表 (有 0 条评论,622人围观)

还没有评论,来说两句吧...

相关阅读