OSDN Git Service

Revert "fix account balance view"
authormonky <monky@it709.com>
Wed, 2 Jan 2019 15:45:14 +0000 (23:45 +0800)
committermonky <monky@it709.com>
Wed, 2 Jan 2019 15:45:14 +0000 (23:45 +0800)
This reverts commit b04e46e547cc5279e706d1fa6beaf8a66cda4dfd.

src/views/home.vue

index b476ea9..e1730f2 100644 (file)
@@ -327,8 +327,12 @@ export default {
                     this.currentAccount = {};
                     return;
                 }
-                this.currentAccount = accounts[0];
-                this.refreshBalance(this.currentAccount.guid);
+
+                if (localStorage.currentAccount != undefined && localStorage.currentAccount != '{}') {
+                    this.currentAccount = JSON.parse(localStorage.currentAccount);
+                } else {
+                    this.currentAccount = accounts[0];
+                }
             })
         },
         refreshBalance: function (guid) {