import { useState } from '#imports'; import type { Config } from '~/types/global'; import type {Website} from "~/api/cms/website/model"; import type {Navigation} from "~/api/cms/navigation/model"; import type {User} from "~/api/system/user/model"; import type {Company} from "~/api/system/company/model"; import type {MyCart, ShopCart} from "~/api/shop/shopCart/model"; // 网站信息 export const useWebsite = () => useState('website', () => { return {}; }); // 参数配置 export const useConfigInfo = () => useState('config', () => { return {}; }); // 主导航 export const useMenu = () => useState('menu', () => { return []; }); // 副导航 export const useSubMenu = () => useState('subMenu', () => { return []; }); // 页面元素 export const useForm = () => useState('form', () => { return {}; }); // 固钉 export const useProductAffix = () => useState('affixTop', () => { return false; }); // 后台管理域名 export const useSysDomain = () => useState('useSysDomain', () => ''); // 登录凭证 export const useToken = () => useState('token', () => ''); // 用户信息 export const useUser = () => useState('user', () => { return { userId: 0, avatar: '', phone: '', balance: 0, nickname: '', gradeId: 0, gradeName: '', certification: false, tenantId: 0, tenantName: '', }; }); // 企业信息 export const useCompany = () => useState('company', () => { return {}; }); // 是否显示登录弹窗 export const useShowLogin = () => useState('showLogin',() => false) // 购物车状态 export const useCart = () => useState('cart', () => { return { appName: '', domain: '', adminUrl: '', num: 1, type: 1, payType: 102, payPrice: 0, month: 1, comments: '', list: [], totalPrice: 0 }; });