12345678910111213141516171819202122232425 |
- 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
- })
|