feat(db): 添加Dexie数据库支持并重构数据存储结构
添加Dexie作为IndexedDB封装库,实现本地数据存储功能 重构数据接口定义和存储模块结构,优化类型定义 统一数据接口文件位置,增强代码可维护性
This commit is contained in:
@@ -1,46 +1,4 @@
|
||||
import { ContractData } from "../../pages/pc/ckbox/data";
|
||||
|
||||
//终端用户数据接口
|
||||
export interface KfUserListData {
|
||||
id: number;
|
||||
tenantId: number;
|
||||
wechatId: string;
|
||||
nickname: string;
|
||||
alias: string;
|
||||
avatar: string;
|
||||
gender: number;
|
||||
region: string;
|
||||
signature: string;
|
||||
bindQQ: string;
|
||||
bindEmail: string;
|
||||
bindMobile: string;
|
||||
createTime: string;
|
||||
currentDeviceId: number;
|
||||
isDeleted: boolean;
|
||||
deleteTime: string;
|
||||
groupId: number;
|
||||
memo: string;
|
||||
wechatVersion: string;
|
||||
labels: string[];
|
||||
lastUpdateTime: string;
|
||||
isOnline?: boolean;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
// 账户信息接口
|
||||
export interface CkAccount {
|
||||
id: number;
|
||||
realName: string;
|
||||
nickname: string | null;
|
||||
memo: string | null;
|
||||
avatar: string;
|
||||
userName: string;
|
||||
secret: string;
|
||||
accountType: number;
|
||||
departmentId: number;
|
||||
useGoogleSecretKey: boolean;
|
||||
hasVerifyGoogleSecret: boolean;
|
||||
}
|
||||
import { ContractData, KfUserListData, CkAccount } from "@/pages/pc/ckbox/data";
|
||||
|
||||
// 权限片段接口
|
||||
export interface PrivilegeFrag {
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
import { createPersistStore } from "@/store/createPersistStore";
|
||||
|
||||
import { CkChatState, CkUserInfo, CkTenant } from "./ckchat.data";
|
||||
import {
|
||||
CkChatState,
|
||||
CkUserInfo,
|
||||
ContractData,
|
||||
GroupData,
|
||||
CkAccount,
|
||||
CkTenant,
|
||||
KfUserListData,
|
||||
} from "./ckchat.data";
|
||||
import { ContractData, GroupData } from "@/pages/pc/ckbox/data";
|
||||
} from "@/pages/pc/ckbox/data";
|
||||
|
||||
export const useCkChatStore = createPersistStore<CkChatState>(
|
||||
set => ({
|
||||
|
||||
Reference in New Issue
Block a user