Explorar o código

add result moniter

ming %!s(int64=4) %!d(string=hai) anos
pai
achega
7137a16e06
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      api/static/script_util.js

+ 4 - 1
api/static/script_util.js

@@ -165,6 +165,7 @@ $("#sendBTN").click(function () {
   var data = renderXHR_data(dataOBJ)
   console.log(data)
   result = xhr.send(objstr);
+  console.log(result)
   if  (result !='ok') {
     Swal.fire({
       title: "資料已送出",
@@ -174,12 +175,14 @@ $("#sendBTN").click(function () {
     });
   }
   else{
+    
     Swal.fire({
       title: '發生錯誤',
-      icon: 'success',
+      icon: 'error',
       text: result.msg,
       confirmButtonColor: '#3085d6',
     });
+    
   }
 });