Обновление history при переходе

This commit is contained in:
2021-06-03 22:49:56 +03:00
parent 1222e4911a
commit 87bda59150
2 changed files with 11 additions and 1 deletions

View File

@@ -34,12 +34,20 @@ export default {
auth(image) {
if (image) {
this.loggedin = true
this.image = image
this.image = image
history.pushState(
{},
'logged in'
)
}
},
logout() {
axios.post('http://127.0.0.1:3000/api/logout').then(() => {
this.loggedin = false
history.pushState(
{},
'logged out'
)
});
}
}

View File

@@ -6,6 +6,7 @@
v-model="email"
placeholder="E-mail"
autocomplete="email"
type="email"
left-icon-name="email"
class="maz-mb-2"
:color=validateEmail()
@@ -19,6 +20,7 @@
v-model="phone"
default-country-code="RU"
no-country-selector
type="tel"
autocomplete="tel"
class="maz-mb-2"
left-icon-name="phone"