Browse Source

edit script_util.js url ..

aaron-1015 3 years ago
parent
commit
724cde06d5
1 changed files with 3 additions and 3 deletions
  1. 3 3
      api/static/script_util.js

+ 3 - 3
api/static/script_util.js

@@ -58,7 +58,7 @@ function prepareUpload(event) {
     processData: false, // important
     processData: false, // important
     contentType: false, // important
     contentType: false, // important
     data: data,
     data: data,
-    url: '192.168.1.106:8887/uploadfile',
+    url: '/uploadfile',
     dataType: 'json',
     dataType: 'json',
     success: function (jsonData) {
     success: function (jsonData) {
       event.target.previousSibling.value = jsonData.msg;
       event.target.previousSibling.value = jsonData.msg;
@@ -105,7 +105,7 @@ $(".next").click(function () {
   console.log(dataOBJ)
   console.log(dataOBJ)
   jwt_token =  get_jwt_token()
   jwt_token =  get_jwt_token()
   var xhr = new XMLHttpRequest();
   var xhr = new XMLHttpRequest();
-  xhr.open("POST", "192.168.1.106:8887/make_anchor_video");
+  xhr.open("POST", "/make_anchor_video");
   xhr.setRequestHeader("accept", "application/json");
   xhr.setRequestHeader("accept", "application/json");
   xhr.setRequestHeader("Authorization","Bearer "+jwt_token)
   xhr.setRequestHeader("Authorization","Bearer "+jwt_token)
   xhr.setRequestHeader("Content-Type", "application/json");
   xhr.setRequestHeader("Content-Type", "application/json");
@@ -130,7 +130,7 @@ $(".gen_avatar").click(function () {
   console.log(dataOBJ)
   console.log(dataOBJ)
   //alert('資料已送出! 請耐心等候')
   //alert('資料已送出! 請耐心等候')
   $.ajax({
   $.ajax({
-    url: '192.168.1.106:8887/swapFace',
+    url: '/swapFace',
     dataType: 'json', // 預期從server接收的資料型態
     dataType: 'json', // 預期從server接收的資料型態
     contentType: 'application/json; charset=utf-8', // 要送到server的資料型態
     contentType: 'application/json; charset=utf-8', // 要送到server的資料型態
     type: 'post',
     type: 'post',