lxf
2025-07-09 2eb4dd6f50b75c9ec844d08eded5365cd79e4207
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { defineStore } from 'pinia'
import { GET_USERLIST } from '@/store/types.store'
import { _itemUserOptionalList } from '@/service/quotes.api'
export const useMyListStore = defineStore('myList', {
    // state 持久化
    persist: true,
    state: () => ('myList', {
        userList: []
    }),
    getters: {
    },
    actions: {
        async [GET_USERLIST]() { // 发送请求获取信息
            _itemUserOptionalList().then((res) => {
                this.userList = res
            })
        },
    },
})