This commit is contained in:
parent
bdfc249089
commit
a22f92c215
|
@ -694,6 +694,8 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
alert(this.$route.query.id, this.$store.state.type);
|
||||
console.log(this.user_id, this.$store.state.type);
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
mounted() {},
|
||||
|
|
|
@ -488,7 +488,7 @@ export default {
|
|||
) {
|
||||
callback(new Error("请输入主DNS服务器地址"));
|
||||
} else if (
|
||||
!isValidPrimaryDNS(
|
||||
!this.isValidDNSAddress(
|
||||
this.ippz_dns_zy1 +
|
||||
"." +
|
||||
this.ippz_dns_zy2 +
|
||||
|
@ -503,6 +503,16 @@ export default {
|
|||
callback();
|
||||
}
|
||||
},
|
||||
isValidDNSAddress(value) {
|
||||
// IPv4地址的正则表达式
|
||||
const ipv4Regex = /^(\d{1,3}\.){3}\d{1,3}$/;
|
||||
|
||||
// IPv6地址的正则表达式
|
||||
const ipv6Regex = /^(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/;
|
||||
|
||||
// 检查是否是有效的IPv4或IPv6地址
|
||||
return ipv4Regex.test(value) || ipv6Regex.test(value);
|
||||
},
|
||||
//备用dns服务验证
|
||||
validatePrimaryDNS1(rule, value, callback) {
|
||||
if (
|
||||
|
@ -517,7 +527,7 @@ export default {
|
|||
) {
|
||||
callback(new Error("请输入备用DNS服务器地址"));
|
||||
} else if (
|
||||
!isValidPrimaryDNS(
|
||||
!this.isValidDNSAddress(
|
||||
this.ippz_dns_by1 +
|
||||
"." +
|
||||
this.ippz_dns_by2 +
|
||||
|
|
|
@ -236,6 +236,8 @@ export default {
|
|||
} else {
|
||||
this.$store.commit("setType", "GYWZ_wx");
|
||||
}
|
||||
alert(this.user_id, this.$store.state.type);
|
||||
console.log(this.user_id, this.$store.state.type);
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -163,14 +163,16 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.dialogVisible = true;
|
||||
// let str = window.location.href.split("?")[1];
|
||||
// this.user_id = str.split("|")[0];
|
||||
// let type = str.split("|")[1];
|
||||
// if (type == 1) {
|
||||
// this.$store.commit("setType", "GYWZ_yx");
|
||||
// } else {
|
||||
// this.$store.commit("setType", "GYWZ_wx");
|
||||
// }
|
||||
let str = window.location.href.split("?")[1];
|
||||
this.user_id = str.split("|")[0];
|
||||
let type = str.split("|")[1];
|
||||
if (type == 1) {
|
||||
this.$store.commit("setType", "GYWZ_yx");
|
||||
} else {
|
||||
this.$store.commit("setType", "GYWZ_wx");
|
||||
}
|
||||
alert(this.user_id, this.$store.state.type);
|
||||
console.log(this.user_id, this.$store.state.type);
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -278,13 +278,15 @@ export default {
|
|||
} else {
|
||||
this.$store.commit("setType", "GYWZ_wx");
|
||||
}
|
||||
alert(this.user_id, this.$store.state.type);
|
||||
console.log(this.user_id, this.$store.state.type);
|
||||
this.GetUserAnswer();
|
||||
},
|
||||
methods: {
|
||||
addPolicy() {
|
||||
this.$router.push({
|
||||
name: "addstrategy",
|
||||
query: { id: "USER202307301109254198" },
|
||||
query: { id: this.user_id },
|
||||
});
|
||||
},
|
||||
async del(index, a) {
|
||||
|
|
Loading…
Reference in New Issue