修改在线注册的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 QrcodeVue from "qrcode.vue";
|
||||||
import { Protocol } from "src/entities/WSProtocol";
|
import { Protocol } from "src/entities/WSProtocol";
|
||||||
import { EDeviceAttribute } from "src/entities/EDeviceAttribute";
|
import { EDeviceAttribute } from "src/entities/EDeviceAttribute";
|
||||||
|
import ValidationUtil from "src/common/ValidationUtil";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "ComponentRegisterDialog",
|
name: "ComponentRegisterDialog",
|
||||||
|
@ -650,7 +651,6 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
if (function_magic_wall.value) {
|
if (function_magic_wall.value) {
|
||||||
attribute |= EDeviceAttribute.ProductMagicWall;
|
attribute |= EDeviceAttribute.ProductMagicWall;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (function_fusion.value) {
|
if (function_fusion.value) {
|
||||||
attribute |= EDeviceAttribute.ProductFusion;
|
attribute |= EDeviceAttribute.ProductFusion;
|
||||||
|
@ -692,23 +692,18 @@ export default defineComponent({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isIpAddress(str: string) {
|
isIpAddress(str: string) {
|
||||||
return (
|
return ValidationUtil.isIpAddress(str);
|
||||||
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
|
|
||||||
)
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
changeMagic(){
|
changeMagic() {
|
||||||
if(function_magic_wall.value){
|
if (function_magic_wall.value) {
|
||||||
function_fusion.value=false;
|
function_fusion.value = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeFusion(){
|
changeFusion() {
|
||||||
if(function_fusion.value){
|
if (function_fusion.value) {
|
||||||
function_magic_wall.value=false;
|
function_magic_wall.value = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue