mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 15:06:37 +08:00
parent
d4b561e42d
commit
3fcb20d24c
4 changed files with 20 additions and 1 deletions
|
@ -1936,6 +1936,7 @@ const message = {
|
||||||
acmeAccountType: 'Account Type',
|
acmeAccountType: 'Account Type',
|
||||||
keyType: 'Key algorithm',
|
keyType: 'Key algorithm',
|
||||||
tencentCloud: 'Tencent Cloud',
|
tencentCloud: 'Tencent Cloud',
|
||||||
|
containWarn: 'The domain name contains the main domain, please re-enter',
|
||||||
},
|
},
|
||||||
php: {
|
php: {
|
||||||
short_open_tag: 'Short tag support',
|
short_open_tag: 'Short tag support',
|
||||||
|
|
|
@ -1811,6 +1811,7 @@ const message = {
|
||||||
acmeAccountType: '賬號類型',
|
acmeAccountType: '賬號類型',
|
||||||
keyType: '密鑰演算法',
|
keyType: '密鑰演算法',
|
||||||
tencentCloud: '騰訊雲',
|
tencentCloud: '騰訊雲',
|
||||||
|
containWarn: '其他域名中包含主域名,请重新輸入',
|
||||||
},
|
},
|
||||||
php: {
|
php: {
|
||||||
short_open_tag: '短標簽支持',
|
short_open_tag: '短標簽支持',
|
||||||
|
|
|
@ -1811,6 +1811,7 @@ const message = {
|
||||||
acmeAccountType: '账号类型',
|
acmeAccountType: '账号类型',
|
||||||
keyType: '密钥算法',
|
keyType: '密钥算法',
|
||||||
tencentCloud: '腾讯云',
|
tencentCloud: '腾讯云',
|
||||||
|
containWarn: '其他域名中包含主域名,请重新输入',
|
||||||
},
|
},
|
||||||
php: {
|
php: {
|
||||||
short_open_tag: '短标签支持',
|
short_open_tag: '短标签支持',
|
||||||
|
|
|
@ -349,7 +349,7 @@ import { ElForm, FormInstance } from 'element-plus';
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import Params from '@/views/app-store/detail/params/index.vue';
|
import Params from '@/views/app-store/detail/params/index.vue';
|
||||||
import Check from '../check/index.vue';
|
import Check from '../check/index.vue';
|
||||||
import { MsgSuccess } from '@/utils/message';
|
import { MsgError, MsgSuccess } from '@/utils/message';
|
||||||
import { GetGroupList } from '@/api/modules/group';
|
import { GetGroupList } from '@/api/modules/group';
|
||||||
import { Group } from '@/api/interface/group';
|
import { Group } from '@/api/interface/group';
|
||||||
import { SearchRuntimes } from '@/api/modules/runtime';
|
import { SearchRuntimes } from '@/api/modules/runtime';
|
||||||
|
@ -582,6 +582,16 @@ const changeAppType = (type: string) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function isSubsetOfStrArray(primaryDomain: string, otherDomains: string): boolean {
|
||||||
|
const arr: string[] = otherDomains.split('\n');
|
||||||
|
for (const item of arr) {
|
||||||
|
if (primaryDomain === item) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
const submit = async (formEl: FormInstance | undefined) => {
|
const submit = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return;
|
if (!formEl) return;
|
||||||
await formEl.validate((valid) => {
|
await formEl.validate((valid) => {
|
||||||
|
@ -589,6 +599,12 @@ const submit = async (formEl: FormInstance | undefined) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
|
const flag = isSubsetOfStrArray(website.value.primaryDomain, website.value.otherDomains);
|
||||||
|
if (!flag) {
|
||||||
|
MsgError(i18n.global.t('website.containWarn'));
|
||||||
|
loading.value = false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
PreCheck({})
|
PreCheck({})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue