钱包切换帐号后, 退至首页

This commit is contained in:
cebgcontract 2022-11-17 03:42:28 +08:00
parent 713a034cac
commit 1267ed0a49
2 changed files with 9 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,6 @@
<a href="javascript:void(0);" @click="logout">Log out</a>
</div>
</div>
</div>
</div>
</template>
@ -25,9 +24,17 @@ export default {
};
},
created() {
if (!this.$store.state.account && location.pathname.indexOf('login') == -1 ) {
location.href = '/desktop.html'
}
chain.chainManager.init().then(() => {
console.log("header wallet init");
});
window.addEventListener('account_change', function() {
localStorage.removeItem('userinfo');
localStorage.removeItem('invite_code');
console.log('received account change')
})
},
methods: {
header(){