feat:错误信息判断修改
This commit is contained in:
@@ -1046,7 +1046,7 @@ const local: any = {
|
||||
},
|
||||
package: {
|
||||
title: 'Package Management',
|
||||
add: 'Add Package',
|
||||
add: 'Package',
|
||||
packagename: 'Package Name',
|
||||
plepackagename: 'Please enter package name',
|
||||
period: 'Billing Cycle',
|
||||
|
||||
@@ -267,7 +267,7 @@ const handleOk = async () => {
|
||||
message.error(t('page.ratelimit.idnull'));
|
||||
return;
|
||||
}
|
||||
await editRateLimit({
|
||||
const {error} = await editRateLimit({
|
||||
id: editId.value,
|
||||
rateLimitName: submitData.rateLimitName,
|
||||
upLimitEnable: submitData.upLimitEnable,
|
||||
@@ -275,10 +275,14 @@ const handleOk = async () => {
|
||||
upLimit: submitData.upLimit,
|
||||
downLimit: submitData.downLimit
|
||||
});
|
||||
message.success(t('page.ratelimit.changesuc'));
|
||||
if(!error) {
|
||||
message.success(t('page.ratelimit.changesuc'));
|
||||
}
|
||||
} else {
|
||||
await addRateLimit(submitData);
|
||||
message.success(t('page.ratelimit.addsuc'));
|
||||
const{ error } = await addRateLimit(submitData);
|
||||
if(!error) {
|
||||
message.success(t('page.ratelimit.addsuc'));
|
||||
}
|
||||
}
|
||||
handleCancel();
|
||||
getData();
|
||||
|
||||
Reference in New Issue
Block a user