fix
parent
7ab078cf92
commit
663fd786f3
25
system.html
25
system.html
|
@ -210,21 +210,28 @@
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
data: formData,
|
data: postData,
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
type: 'POST',
|
|
||||||
async: false,
|
|
||||||
processData: false, // 使数据不做处理
|
|
||||||
contentType: false, // 不要设置Content-Type请求头
|
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
data = res.content
|
setTimeout(() => {
|
||||||
|
let url = 'http://192.168.0.116/cgi-bin/test.cgi?action=upgrade_get';
|
||||||
window.location.reload(true);
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
url: url,
|
||||||
|
success: function (res) {
|
||||||
|
alert('upgrade success!device reboot!')
|
||||||
|
window.location.reload(true)
|
||||||
|
},
|
||||||
|
error: function () {
|
||||||
|
alert('upgrade failed!upgrade pack invalid!')
|
||||||
|
window.location.reload(true)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 1500);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
console.log(res.message)
|
|
||||||
alert(res.message)
|
alert(res.message)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue