change logout

This commit is contained in:
cebgcontract 2022-11-17 00:42:25 +08:00
parent 939f577276
commit ff8ad23d13
2 changed files with 7 additions and 4 deletions

View File

@ -477,9 +477,7 @@
location.href = "/sinup";
});
$('#logout_btn').click(function(){
window.chain.logout().then(() => {
console.log('logout')
})
localStorage.removeItem('userinfo')
})
});

View File

@ -7,7 +7,7 @@
<div class="header-login">
<span >WALLET CONNECT</span>
<div class="dropdown-content">
<a href="/rankinglist">Quest Info</a>
<a href="javascript:void(0)" @click.stop="toQuest">Quest Info</a>
<a href="javascript:void(0);" @click="logout">Log out</a>
</div>
</div>
@ -26,6 +26,11 @@ export default {
methods: {
logout() {
chain.logout();
localStorage.removeItem('userinfo');
location.href = '/desktop.html'
},
toQuest(e) {
this.$router.push('rankinglist')
}
}
};