inspinia前端模板怎样编写消息提示框点击确定后的回调方法

比眉伴天荒 2023-10-18 16:17 35阅读 0赞

场景

inspinia 前端模板在提示框点击确定后执行回调方法。

![Image 1][]watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0JBREFPX0xJVU1BTkdfUUlaSEk_size_16_color_FFFFFF_t_70

实现

  1. //提交后的方法
  2. function submitPrint(id){
  3. debugger
  4. $.ajax({
  5. type: 'POST',
  6. url: "/wmsReceiveOrder/doSubmit",
  7. cache: false, //禁用缓存
  8. data:JSON.stringify({"id":""+id+""}),
  9. contentType: "application/json",
  10. dataType: "json",
  11. success: function (result) {
  12. debugger
  13. //alert(result.message)
  14. swal({
  15. type: 'warning',
  16. title: '提示:',
  17. text: result.message,
  18. confirmButtonColor: "#1ab394",
  19. }).then(function (isConfirm) {
  20. if (isConfirm.value === true) {
  21. //window.location.reload();
  22. debugger
  23. t.ajax.reload( null, false );
  24. }
  25. })
  26. }
  27. })
  28. return false;
  29. }

通过:

  1. }).then(function (isConfirm) {
  2. if (isConfirm.value === true) {
  3. //window.location.reload();
  4. debugger
  5. t.ajax.reload( null, false );
  6. }
  7. })

实现点击OK按钮后刷新页面。

[Image 1]:

发表评论

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

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

相关阅读