update hot update

This commit is contained in:
huoyo 2022-09-28 20:05:21 +08:00
parent f02d7d38e8
commit eff92ebcd3
2 changed files with 8 additions and 8 deletions

View File

@ -16,7 +16,6 @@
var globalNeedLogin = globalNeedLoginValue;
var globalToken = sessionStorage.getItem("kotimeToken")
$(document).ready(function () {
document.querySelector("#classForm").action='contextPath/koTime/updateClass?token='+globalToken
let globalIsLogin = false;
$.ajaxSettings.async = false;
$.get('contextPath/koTime/isLogin?token='+globalToken, function (data) {
@ -352,7 +351,7 @@
formData.append('className', className );
$.ajax({
url: document.querySelector("#classForm").action,
url: 'contextPath/koTime/updateClass?token='+globalToken,
type: 'POST',
cache: false,
data: formData,
@ -371,6 +370,7 @@
error: function (XmlHttpRequest, textStatus, errorThrown) {
UIkit.notification.closeAll();
UIkit.notification("<font color='red'>Fail</font>",{});
location.reload();
},
complete: function () {}
})
@ -451,7 +451,7 @@
</li>
<li style="margin-left: 35%;margin-right: 35%;">
<div class="uk-card uk-card-default uk-card-body">
<form id="classForm" method="post" enctype="multipart/form-data" action="">
<div id="classForm" >
<div uk-form-custom="target: true" class="uk-form-controls">
<input id="classFile" name="classFile" type="file" >
<input id="form-file" style="width: 500px;border-radius: 5px" class="uk-input" type="text" placeholder="class file needed to updatecompiled class file" >
@ -462,7 +462,7 @@
<br>
<br>
<button type="button" onclick="updateClass();" style="width: 500px;background-color: #19985d;border-radius: 5px" class="uk-button uk-button-primary uk-width-1-1 uk-margin-small-bottom">OK</button>
</form>
</div>
</div>
</li>
<li style="margin-left: 30%;margin-right: 30%;">

View File

@ -20,7 +20,6 @@
var globalNeedLogin = globalNeedLoginValue;
var globalToken = sessionStorage.getItem("kotimeToken")
$(document).ready(function () {
document.querySelector("#classForm").action='contextPath/koTime/updateClass?token='+globalToken
let globalIsLogin = false;
$.ajaxSettings.async = false;
$.get('contextPath/koTime/isLogin?token='+globalToken, function (data) {
@ -354,7 +353,7 @@
formData.append('className', className );
$.ajax({
url: document.querySelector("#classForm").action,
url: 'contextPath/koTime/updateClass?token='+globalToken,
type: 'POST',
cache: false,
data: formData,
@ -373,6 +372,7 @@
error: function (XmlHttpRequest, textStatus, errorThrown) {
UIkit.notification.closeAll();
UIkit.notification("<font color='red'>更新失败</font>",{});
location.reload();
},
complete: function () {}
})
@ -453,7 +453,7 @@
</li>
<li style="margin-left: 35%;margin-right: 35%;">
<div class="uk-card uk-card-default uk-card-body">
<form id="classForm" method="post" enctype="multipart/form-data" action="">
<div id="classForm" >
<div uk-form-custom="target: true" class="uk-form-controls">
<input id="classFile" name="classFile" type="file" >
<input id="form-file" style="width: 500px;border-radius: 5px" class="uk-input" type="text" placeholder="更新的类文件:编译过的.class文件" >
@ -464,7 +464,7 @@
<br>
<br>
<button type="button" onclick="updateClass();" style="width: 500px;background-color: #19985d;border-radius: 5px" class="uk-button uk-button-primary uk-width-1-1 uk-margin-small-bottom">确定</button>
</form>
</div>
</div>
</li>
<li style="margin-left: 30%;margin-right: 30%;">