// 每一个存储的模块，命名规则use开头，store结尾
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
export const useUserInfoStore = defineStore('userInfo', () => {
	const state = ref({
		userInfo: {},
		token: '',

	})

	// actions
	const setUserInfo = (data: any) => {
		state.value.userInfo = data
	}

	const setToken = (data: string) => {
		state.value.token = data
	}

	const logOut = async () => {

	}

	return {
		state,
		setToken,
		setUserInfo,
		logOut,
	}
})
