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"; location.href = "/sinup";
}); });
$('#logout_btn').click(function(){ $('#logout_btn').click(function(){
window.chain.logout().then(() => { localStorage.removeItem('userinfo')
console.log('logout')
})
}) })
}); });

View File

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