src/stores/session.js
@@ -1,7 +1,17 @@ import { ref } from 'vue' import { defineStore } from 'pinia' export const useSessionStore = defineStore('session', () => { const userInfo = ref({}) const userInfo = ref({ id: '', nickName: '', idCard: '', idCardType: '', mobile: '', sex: '', avatar: '', idCardFrontImg: '', idCardBackImg: '' }) function setUserInfo(data) { userInfo.value = data