This commit is contained in:
parent
bdfc249089
commit
a22f92c215
|
@ -694,6 +694,8 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
alert(this.$route.query.id, this.$store.state.type);
|
||||||
|
console.log(this.user_id, this.$store.state.type);
|
||||||
this.GetUserAnswer();
|
this.GetUserAnswer();
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
|
|
|
@ -488,7 +488,7 @@ export default {
|
||||||
) {
|
) {
|
||||||
callback(new Error("请输入主DNS服务器地址"));
|
callback(new Error("请输入主DNS服务器地址"));
|
||||||
} else if (
|
} else if (
|
||||||
!isValidPrimaryDNS(
|
!this.isValidDNSAddress(
|
||||||
this.ippz_dns_zy1 +
|
this.ippz_dns_zy1 +
|
||||||
"." +
|
"." +
|
||||||
this.ippz_dns_zy2 +
|
this.ippz_dns_zy2 +
|
||||||
|
@ -503,6 +503,16 @@ export default {
|
||||||
callback();
|
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服务验证
|
//备用dns服务验证
|
||||||
validatePrimaryDNS1(rule, value, callback) {
|
validatePrimaryDNS1(rule, value, callback) {
|
||||||
if (
|
if (
|
||||||
|
@ -517,7 +527,7 @@ export default {
|
||||||
) {
|
) {
|
||||||
callback(new Error("请输入备用DNS服务器地址"));
|
callback(new Error("请输入备用DNS服务器地址"));
|
||||||
} else if (
|
} else if (
|
||||||
!isValidPrimaryDNS(
|
!this.isValidDNSAddress(
|
||||||
this.ippz_dns_by1 +
|
this.ippz_dns_by1 +
|
||||||
"." +
|
"." +
|
||||||
this.ippz_dns_by2 +
|
this.ippz_dns_by2 +
|
||||||
|
|
|
@ -236,6 +236,8 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$store.commit("setType", "GYWZ_wx");
|
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();
|
this.GetUserAnswer();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -163,14 +163,16 @@ export default {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
// let str = window.location.href.split("?")[1];
|
let str = window.location.href.split("?")[1];
|
||||||
// this.user_id = str.split("|")[0];
|
this.user_id = str.split("|")[0];
|
||||||
// let type = str.split("|")[1];
|
let type = str.split("|")[1];
|
||||||
// if (type == 1) {
|
if (type == 1) {
|
||||||
// this.$store.commit("setType", "GYWZ_yx");
|
this.$store.commit("setType", "GYWZ_yx");
|
||||||
// } else {
|
} else {
|
||||||
// this.$store.commit("setType", "GYWZ_wx");
|
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();
|
this.GetUserAnswer();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -278,13 +278,15 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.$store.commit("setType", "GYWZ_wx");
|
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();
|
this.GetUserAnswer();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
addPolicy() {
|
addPolicy() {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: "addstrategy",
|
name: "addstrategy",
|
||||||
query: { id: "USER202307301109254198" },
|
query: { id: this.user_id },
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async del(index, a) {
|
async del(index, a) {
|
||||||
|
|
Loading…
Reference in New Issue