mirror of
https://github.com/nezhahq/nezha.git
synced 2025-02-02 01:28:13 -05:00
修改提示弹窗
This commit is contained in:
parent
c18df6bdbf
commit
ddd90b3449
@ -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…
Reference in New Issue
Block a user