mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-25 03:29:13 +08:00
feat: 修改重复提示
This commit is contained in:
parent
8d560e8668
commit
0d22ae6dc3
@ -96,7 +96,7 @@ func (w WebsiteService) GetWebsites() ([]response.WebsiteDTO, error) {
|
||||
|
||||
func (w WebsiteService) CreateWebsite(ctx context.Context, create request.WebsiteCreate) error {
|
||||
if exist, _ := websiteRepo.GetBy(websiteRepo.WithDomain(create.PrimaryDomain)); len(exist) > 0 {
|
||||
return buserr.New(constant.ErrNameIsExist)
|
||||
return buserr.New(constant.ErrDomainIsExist)
|
||||
}
|
||||
if exist, _ := websiteRepo.GetBy(websiteRepo.WithAlias(create.Alias)); len(exist) > 0 {
|
||||
return buserr.New(constant.ErrAliasIsExist)
|
||||
|
@ -6,12 +6,12 @@
|
||||
<el-switch v-model="form.enable" @change="updateEnable"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item prop="cycle" :label="$t('website.cycle')">
|
||||
<el-input v-model.number="form.cycle" type="number">
|
||||
<el-input v-model="form.cycle" type="number">
|
||||
<template #append>{{ $t('website.seconds') }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="frequency" :label="$t('website.frequency')">
|
||||
<el-input v-model.number="form.frequency" type="number">
|
||||
<el-input v-model="form.frequency" type="number">
|
||||
<template #append>{{ $t('website.count') }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -35,7 +35,7 @@
|
||||
import { Website } from '@/api/interface/website';
|
||||
import { SaveFileContent } from '@/api/modules/files';
|
||||
import { GetWafConfig, UpdateWafEnable } from '@/api/modules/website';
|
||||
import { Rules } from '@/global/form-rules';
|
||||
import { checkNumberRange, Rules } from '@/global/form-rules';
|
||||
import i18n from '@/lang';
|
||||
import { MsgSuccess } from '@/utils/message';
|
||||
import { FormInstance } from 'element-plus';
|
||||
@ -73,8 +73,8 @@ let fileUpdate = reactive({
|
||||
content: '',
|
||||
});
|
||||
let rules = ref({
|
||||
cycle: [Rules.requiredInput],
|
||||
frequency: [Rules.requiredInput],
|
||||
cycle: [Rules.requiredInput, checkNumberRange(1, 9999999)],
|
||||
frequency: [Rules.requiredInput, checkNumberRange(1, 9999999)],
|
||||
});
|
||||
const wafForm = ref<FormInstance>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user