浏览代码

check is confirm

ming 3 年之前
父节点
当前提交
57424d0517
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      api/templates/script_index.js

+ 5 - 2
api/templates/script_index.js

@@ -16,7 +16,10 @@ $("#btn_login").click(function () {
           title: "登入成功",
           icon: 'success',
           confirmButtonColor: '#3085d6',
-        });
+        },function(isConfirm){
+          if(isConfirm){window.location.replace("/index");}
+        }
+        );
       }
       else{
         Swal.fire({
@@ -26,7 +29,7 @@ $("#btn_login").click(function () {
           confirmButtonColor: '#3085d6',
         });
       }
-      window.location.replace("/index")
+      
     }
   };
   var data = "grant_type=&username=" + $('#username').val() + "&password="+$('#password').val()+"&scope=&client_id=&client_secret=";