token问题使用sotorage方式存储和读取

This commit is contained in:
2023-08-23 14:29:44 +08:00
parent 989affd5ea
commit 6060a36d92
4 changed files with 11 additions and 44 deletions

View File

@ -101,12 +101,9 @@ export default {
},
methods:{
isUse(e){
console.log("是否启用",e)
this.states=e
},
async submitBtn(){
this.$toast(1111)
try {
let res = await saveDriver({
driverId:this.id ? this.id : '',
driverName:this.driverName ,
@ -127,16 +124,12 @@ export default {
this.$router.back();
},2000)
}
}catch (e){
this.$toast(JSON.stringify(e), "eeeeeeee")
}
},
cancelBtn(){//取消
this.$router.back()
},
validatePhoneNumber() {
const phoneNumberRegex = /^1[0-9]{10}$/;
if (!phoneNumberRegex.test(this.driverPhone)) {
this.phoneNumberError = true;
this.phoneNumberErrorMessage = '电话号码格式不正确请输入有效的11位手机号码。';