import { defineStore } from 'pinia' export const useUserStore = defineStore('user', { state: () => { return { token: '', lastLoginPhone: '', userInfo: {} } }, actions: { updateToken(token) { this.token = token }, updateLastLoginPhone(lastLoginPhone) { this.lastLoginPhone = lastLoginPhone }, updateUserInfo(userInfo) { this.userInfo = userInfo } }, unistorage: true })