瀏覽代碼

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)
   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',
     });
+    
   }
 });