修改提示弹窗

This commit is contained in:
kkk 2021-03-02 14:46:02 +08:00
parent c18df6bdbf
commit ddd90b3449

View File

@ -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;
}) })