import { defineStore } from 'pinia'

export const useLoginType = defineStore('changeLoginType', {
  state: () => ({
    // loginType: 0
    loginType: localStorage.getItem('loginType') || 'personal'
  }),
  actions: {
    change(type) {
      this.loginType = type
      localStorage.setItem('loginType', type) // 用户登录类型，0：企业， 1：用户
    }
  }
})