1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| import { ref } from 'vue'
| import { defineStore } from 'pinia'
| export const useSessionStore = defineStore('session', () => {
| const userInfo = ref({
| id: '',
| nickName: '',
| idCard: '',
| idCardType: '',
| mobile: '',
| sex: '',
| avatar: '',
| idCardFrontImg: '',
| idCardBackImg: ''
| })
|
| function setUserInfo(data) {
| userInfo.value = data
| }
|
| return { userInfo, setUserInfo }
| })
|
|