huai-sian il y a 3 ans
Parent
commit
ee68cef559
1 fichiers modifiés avec 28 ajouts et 28 suppressions
  1. 28 28
      html/static/script_util2.js

+ 28 - 28
html/static/script_util2.js

@@ -361,35 +361,35 @@ $(".next").click(function () {
   objstr = JSON.stringify(dataOBJ);
   console.log(dataOBJ)
   jwt_token =  get_jwt_token()
-  // var xhr = new XMLHttpRequest();
-  // xhr.open("POST", "https://www.choozmo.com:8887/make_anchor_video");
-  // xhr.setRequestHeader("accept", "application/json");
-  // xhr.setRequestHeader("Authorization","Bearer "+jwt_token)
-  // xhr.setRequestHeader("Content-Type", "application/json");
-  // xhr.onreadystatechange = function () {
-  //   if (xhr.readyState === 4) {
-  //     responseOBJ = JSON.parse(xhr.responseText)
-  //     console.log(responseOBJ.msg);
-  //       //let title = "資料已送出";
-  //       let text;
-  //       if(lan == 'en') {
-  //         //title = 'Submitted Successfully!';
-  //         text = responseOBJ.msg.eng;
-  //       } else {
-  //         text = responseOBJ.msg.zh;
-  //       }
-  //       Swal.fire({
-  //        // title: title,
-  //         icon: 'info',
-  //         text: text,
-  //         confirmButtonColor: '#3085d6',
-  //       });
+  var xhr = new XMLHttpRequest();
+  xhr.open("POST", "https://www.choozmo.com:8887/make_anchor_video");
+  xhr.setRequestHeader("accept", "application/json");
+  xhr.setRequestHeader("Authorization","Bearer "+jwt_token)
+  xhr.setRequestHeader("Content-Type", "application/json");
+  xhr.onreadystatechange = function () {
+    if (xhr.readyState === 4) {
+      responseOBJ = JSON.parse(xhr.responseText)
+      console.log(responseOBJ.msg);
+        //let title = "資料已送出";
+        let text;
+        if(lan == 'en') {
+          //title = 'Submitted Successfully!';
+          text = responseOBJ.msg.eng;
+        } else {
+          text = responseOBJ.msg.zh;
+        }
+        Swal.fire({
+         // title: title,
+          icon: 'info',
+          text: text,
+          confirmButtonColor: '#3085d6',
+        });
       
-  //   }
-  // };
-  // var data = renderXHR_data(dataOBJ)
-  // console.log(data)
-  // result = xhr.send(objstr);
+    }
+  };
+  var data = renderXHR_data(dataOBJ)
+  console.log(data)
+  result = xhr.send(objstr);
 });