import { getParking } from '@/api/parking'


const parkingOptions = {
    namespaced: true,
    actions: {
        // 获取停车场数据
        async getParking(context, value) {
            let result = await getParking()
            if (result.status === 200) {
                context.commit('GETPARKING', result.data)
            }
        }
    },
    mutations: {
        GETPARKING(state, parking) {
            state.parkingList = parking
        }
    },
    state: {
        parkingList: []
    },
    getters: {}
}
export default parkingOptions