|
@@ -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);
|
|
|
});
|
|
|
|
|
|
|