import { useState } from '#app';

// 用户token
export const useUserToken = () => {
  return useState('userToken', () => '');
};

// 用户信息
export const useTokenInfo = () => {
  return useState('userInfo', () => ({
    name: '---',
    vip_type: '免费会员',
  }));
};

// 需要切换的路由
export const useChangeRouter = () => {
  return useState('ChangeRouterPath', () => ({
    name: 'router',
    path: '/user',
    id: 0,
  }));
};

// 修改用户信息中的某个属性或多个属性
export const useUserName = () => {
  return useState('UserName', () => ({
    name: 'router',
    path: '/user',
  }));
};
