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