fix: 修正未认证设置表单初始值 (#5383)

This commit is contained in:
Frost-ZX 2024-06-11 11:33:46 +08:00 committed by GitHub
parent e2316369a7
commit 0341587716
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -224,6 +224,7 @@ const form = reactive({
allowIPs: '',
bindDomain: '',
noAuthSetting: '200 - ' + i18n.global.t('setting.help200'),
noAuthSettingValue: '200',
});
const unset = ref(i18n.global.t('setting.unSetting'));
@ -246,6 +247,7 @@ const search = async () => {
form.mfaInterval = Number(res.data.mfaInterval);
form.allowIPs = res.data.allowIPs.replaceAll(',', '\n');
form.bindDomain = res.data.bindDomain;
form.noAuthSettingValue = res.data.noAuthSetting;
if (res.data.noAuthSetting !== '200') {
form.noAuthSetting = res.data.noAuthSetting + ' - ' + i18n.global.t('setting.error' + res.data.noAuthSetting);
} else {
@ -297,7 +299,7 @@ const onChangeBind = () => {
bindRef.value.acceptParams({ ipv6: form.ipv6, bindAddress: form.bindAddress });
};
const onChangeResponse = () => {
responseRef.value.acceptParams({ noAuthSetting: form.noAuthSetting });
responseRef.value.acceptParams({ noAuthSetting: form.noAuthSettingValue });
};
const onChangeBindDomain = () => {
domainRef.value.acceptParams({ bindDomain: form.bindDomain });