修改在线注册的IP校验
This commit is contained in:
parent
2930add85f
commit
f4b2e6cd15
|
@ -407,6 +407,7 @@ import GlobalData from "src/common/GlobalData";
|
|||
import QrcodeVue from "qrcode.vue";
|
||||
import { Protocol } from "src/entities/WSProtocol";
|
||||
import { EDeviceAttribute } from "src/entities/EDeviceAttribute";
|
||||
import ValidationUtil from "src/common/ValidationUtil";
|
||||
|
||||
export default defineComponent({
|
||||
name: "ComponentRegisterDialog",
|
||||
|
@ -650,7 +651,6 @@ export default defineComponent({
|
|||
}
|
||||
if (function_magic_wall.value) {
|
||||
attribute |= EDeviceAttribute.ProductMagicWall;
|
||||
|
||||
}
|
||||
if (function_fusion.value) {
|
||||
attribute |= EDeviceAttribute.ProductFusion;
|
||||
|
@ -692,12 +692,7 @@ export default defineComponent({
|
|||
}
|
||||
},
|
||||
isIpAddress(str: string) {
|
||||
return (
|
||||
str == "localhost" ||
|
||||
/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/.test(
|
||||
str
|
||||
)
|
||||
);
|
||||
return ValidationUtil.isIpAddress(str);
|
||||
},
|
||||
changeMagic() {
|
||||
if (function_magic_wall.value) {
|
||||
|
@ -708,7 +703,7 @@ export default defineComponent({
|
|||
if (function_fusion.value) {
|
||||
function_magic_wall.value = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue