|
@@ -71,34 +71,34 @@ const app=createApp({
|
|
|
this.number++;
|
|
|
},
|
|
|
|
|
|
- changelang(type){
|
|
|
- console.log("-----------change lang-----------------");
|
|
|
- console.log("this.locale : "+this.locale);
|
|
|
- console.log("locale"+locale);
|
|
|
- locale.value=type;
|
|
|
- },
|
|
|
- interface_web(){
|
|
|
- console.log("---------tomcat server----------");
|
|
|
- const request = new XMLHttpRequest();
|
|
|
- request.onload=function(){
|
|
|
- console.log("parse tomcat server string");
|
|
|
- const res=JSON.parse(request.responseText);
|
|
|
+ changelang(type){
|
|
|
+ console.log("-----------change lang-----------------");
|
|
|
+ console.log("this.locale : "+this.locale);
|
|
|
+ console.log("locale"+locale);
|
|
|
+ locale.value=type;
|
|
|
+ },
|
|
|
+ interface_web(){
|
|
|
+ console.log("---------tomcat server----------");
|
|
|
+ const request = new XMLHttpRequest();
|
|
|
+ request.onload=function(){
|
|
|
+ console.log("parse tomcat server string");
|
|
|
+ const res=JSON.parse(request.responseText);
|
|
|
|
|
|
- this.tomcat_res=res.message;
|
|
|
- console.log("res:"+res);
|
|
|
- console.log("res[0].title :"+res[0].title);
|
|
|
- console.log("res[0].author :"+res[0].author);
|
|
|
- console.log("res[0].publisher :"+res[0].publisher);
|
|
|
- console.log("res[0].pages :"+res[0].pages);
|
|
|
- console.log("res[1][\"title\"] :"+res[1]["title"]);
|
|
|
- console.log("res[1][\"author\"] :"+res[1]["author"]);
|
|
|
- console.log("this.tomcat_res : "+this.tomcat_res);
|
|
|
- console.log("tomcat_res : "+tomcat_res);
|
|
|
- alert("this.tomcat_res : "+this.tomcat_res);
|
|
|
- };
|
|
|
- request.open("POST","http://ancientapes.cc:8080/mineluxuries/book");
|
|
|
- request.send("test tomcat");
|
|
|
- }
|
|
|
+ this.tomcat_res=res[0].title;
|
|
|
+ console.log("res:"+res);
|
|
|
+ console.log("res[0].title :"+res[0].title);
|
|
|
+ console.log("res[0].author :"+res[0].author);
|
|
|
+ console.log("res[0].publisher :"+res[0].publisher);
|
|
|
+ console.log("res[0].pages :"+res[0].pages);
|
|
|
+ console.log("res[1][\"title\"] :"+res[1]["title"]);
|
|
|
+ console.log("res[1][\"author\"] :"+res[1]["author"]);
|
|
|
+ console.log("this.tomcat_res : "+this.tomcat_res);
|
|
|
+ alert("this.tomcat_res : "+this.tomcat_res);
|
|
|
+ console.log("tomcat_res : "+tomcat_res);
|
|
|
+ };
|
|
|
+ request.open("POST","http://ancientapes.cc:8080/mineluxuries/book");
|
|
|
+ request.send("test tomcat");
|
|
|
+ }
|
|
|
|
|
|
},
|
|
|
setup(){
|