|
@@ -153,23 +153,22 @@ export const useUserStore = defineStore('user',
|
|
|
const data = await getEnterpriseUserAccount()
|
|
|
if (!data) return
|
|
|
this.enterpriseUserAccount = data
|
|
|
- this.getUserAccountBalance(false)
|
|
|
- // localStorage.setItem('enterpriseUserAccount', JSON.stringify(data))
|
|
|
+ // this.getUserAccountBalance()
|
|
|
+ localStorage.setItem('enterpriseUserAccount', JSON.stringify(data))
|
|
|
},
|
|
|
// 获取用户账户信息
|
|
|
async getUserAccountInfo () {
|
|
|
const data = await getUserAccount()
|
|
|
if (!data) return
|
|
|
this.userAccount = data
|
|
|
- this.getUserAccountBalance(true)
|
|
|
+ this.getUserAccountBalance()
|
|
|
// localStorage.setItem('userAccount', JSON.stringify(data))
|
|
|
},
|
|
|
// 获取账户余额
|
|
|
- async getUserAccountBalance (type) {
|
|
|
+ async getUserAccountBalance () {
|
|
|
const data = await getAccountBalance()
|
|
|
- const obj = !type ? Object.assign(this.enterpriseUserAccount, data) : Object.assign(this.userAccount, data)
|
|
|
- const key = !type ? 'enterpriseUserAccount' : 'userAccount'
|
|
|
- localStorage.setItem(key, JSON.stringify(obj))
|
|
|
+ const obj = Object.assign(this.userAccount, data)
|
|
|
+ localStorage.setItem('userAccount', JSON.stringify(obj))
|
|
|
}
|
|
|
}
|
|
|
},
|