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

@ -10,11 +10,6 @@
<script>
export default {
name: 'App',
mounted() {
const urlParams = new URLSearchParams(window.location.search);
const token = urlParams.get('token');
this.$toast("打印token",token)
}
}
</script>

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 {

View File

@ -66,6 +66,9 @@ export default {
}
},
mounted() {
const urlParams = new URLSearchParams(window.location.search);
const token = urlParams.get('token');
this.$toast("司机管理打印token",token)
this.getDriverList()
},
methods:{

View File

@ -150,6 +150,9 @@ export default {
}
},
async mounted() {
const urlParams = new URLSearchParams(window.location.search);
const token = urlParams.get('token');
this.$toast("车辆编辑打印token",token)
this.id=this.$route.query?.id || ''
this.$toast('id:', this.id)
const selectElement = document.getElementById('mySelect');

View File

@ -57,6 +57,9 @@ export default {
}
},
mounted() {
const urlParams = new URLSearchParams(window.location.search);
const token = urlParams.get('token');
this.$toast("车辆管理打印token",token)
this.getVehicleList();
},
methods:{