Merge pull request #107 from Bravoyk/master
🌈 Modify the popup window
Co-authored-by: Bravoyk <11516611+Bravoyk@users.noreply.github.com>
This commit is contained in:
commit
c16d62c2ff
@ -42,12 +42,30 @@
|
|||||||
$('#settingForm').submit(function () {
|
$('#settingForm').submit(function () {
|
||||||
$.post('/api/setting', $('#settingForm').serialize()).then((resp) => {
|
$.post('/api/setting', $('#settingForm').serialize()).then((resp) => {
|
||||||
if (resp.code == 200) {
|
if (resp.code == 200) {
|
||||||
alert("保存成功")
|
$.suiAlert({
|
||||||
|
title: '',
|
||||||
|
description: '修改成功',
|
||||||
|
type: 'success',
|
||||||
|
time: '3',
|
||||||
|
position: 'top-center',
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
alert(resp.message)
|
$.suiAlert({
|
||||||
|
title: '',
|
||||||
|
description:resp.message,
|
||||||
|
type: 'error',
|
||||||
|
time: '3',
|
||||||
|
position: 'top-center',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}).error(err => {
|
}).error(err => {
|
||||||
alert(err)
|
$.suiAlert({
|
||||||
|
title: '',
|
||||||
|
description:err,
|
||||||
|
type: 'error',
|
||||||
|
time: '3',
|
||||||
|
position: 'top-center',
|
||||||
|
});
|
||||||
})
|
})
|
||||||
return false;
|
return false;
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user