123456789101112131415161718 |
- import { defineStore } from 'pinia'
- import { AxiosWrapper } from '@/utils/axios-wrapper'
- const axios = new AxiosWrapper()
- export const UtilStore = defineStore('util', () => {
- const toImport = async (payload) => {
- const res = await axios.$post(`/util/toImport`, payload)
- return res
- }
- const toExport = async (payload) => {
- const res = await axios.$post(`/util/toExport`, payload)
- return res
- }
- const toTotal = async (payload) => {
- const res = await axios.$post(`/util/toTotal`, payload)
- return res
- }
- return { toImport, toExport, toTotal }
- })
|