import { defineStore } from 'pinia'

export const useAppStore = defineStore({
  id: 'appStore',
  state: () => {
    return {
      menu: []
    }
  },
  actions: {
    setMenu(value) {
      this.menu = value || uni.getStorageSync('menu') || []
      uni.setStorageSync('userInfo', this.menu)
    }
  }
})
