diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/home.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/home.ftl index 590ad899..07749a60 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/home.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/home.ftl @@ -130,6 +130,16 @@ 调用AJAX + + +

ajax.example({}).then(function (response) {

+

if (response.errors.length > 0) {

+

nav.e(response.errors[0].message);

+

} else {

+

nav.i("Ajax调用成功!");

+

}

+

})

+ @@ -145,6 +155,18 @@ 点击上传
只能上传jpg/png文件,且不超过500kb
+ + + +

ajax.fileUpload(req.file).then(function (response) {

+

if (response.errors.length > 0) {

+

req.onError();

+

nav.e(response.errors[0].message);

+

} else {

+

req.onSuccess();

+

nav.i("文件上传成功!");

+

}

+

})

diff --git a/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl b/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl index 2bc7627f..4f7f0ee8 100644 --- a/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl +++ b/src/main/resources/modules/SpringBoot/resources/templates/screen/index.ftl @@ -1,13 +1,14 @@
@@ -22,7 +23,7 @@ 登录日志 @@ -33,7 +34,7 @@
@@ -40,8 +40,8 @@ } .frame { - width: 50%; - height: 50%; + width: 600px; + height: 500px; background: #42424263; border-radius: 10px; display: flex;