This commit is contained in:
lll 2023-11-13 22:37:10 +08:00
parent bdfc249089
commit a22f92c215
5 changed files with 29 additions and 11 deletions

View File

@ -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() {},

View File

@ -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}$/;
// IPv4IPv6
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 +

View File

@ -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: {

View File

@ -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: {

View File

@ -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) {