فهرست منبع

add result moniter

ming 3 سال پیش
والد
کامیت
7137a16e06
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  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)
   var data = renderXHR_data(dataOBJ)
   console.log(data)
   console.log(data)
   result = xhr.send(objstr);
   result = xhr.send(objstr);
+  console.log(result)
   if  (result !='ok') {
   if  (result !='ok') {
     Swal.fire({
     Swal.fire({
       title: "資料已送出",
       title: "資料已送出",
@@ -174,12 +175,14 @@ $("#sendBTN").click(function () {
     });
     });
   }
   }
   else{
   else{
+    
     Swal.fire({
     Swal.fire({
       title: '發生錯誤',
       title: '發生錯誤',
-      icon: 'success',
+      icon: 'error',
       text: result.msg,
       text: result.msg,
       confirmButtonColor: '#3085d6',
       confirmButtonColor: '#3085d6',
     });
     });
+    
   }
   }
 });
 });