token问题修复

This commit is contained in:
2023-08-23 11:40:47 +08:00
parent 5418074081
commit 5ab689430d
5 changed files with 13 additions and 6 deletions

View File

@@ -86,6 +86,9 @@ export default {
}
},
mounted() {
const urlParams = new URLSearchParams(window.location.search);
const token = urlParams.get('token');
this.$toast("司机编辑打印token",token)
this.id = this.$route.params?.id;
this.driverName = this.$route.params?.name;
this.driverPhone = this.$route.params?.phone;
@@ -137,7 +140,7 @@ export default {
validatePhoneNumber() {
const phoneNumberRegex = /^1[0-9]{10}$/;
if (phoneNumberRegex.test(this.driverPhone)) {
if (!phoneNumberRegex.test(this.driverPhone)) {
this.phoneNumberError = true;
this.phoneNumberErrorMessage = '电话号码格式不正确请输入有效的11位手机号码。';
} else {