import { defineStore } from 'pinia'
import businessDEl from '@/api/home/home.js'

export const enumMaplistStore = defineStore('enumMaplist', () => {
	// 定义state
	const enumMaplist = ref(JSON.parse(localStorage.getItem('enumMaplist')) || [])

	const businessDElasync = async () => {
		const res = await businessDEl.pagelist()
		console.log(444)
		enumMaplist.value = []
		enumMaplist.value = res
		localStorage.setItem('enumMaplist', JSON.stringify(res))
		console.log(res)
	}

	return { enumMaplist, businessDElasync }
})
