| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- import * as Study from "./study";
- import * as User from "./user";
- import * as News from "./news";
- import * as Transfer from "./transfer";
- import * as System from './system';
- import * as Major from "./major";
- import { VipCardInfo } from "./user";
- import { EnumExamMode, EnumExamType, EnumReviewMode } from "@/common/enum";
- /// 接口响应
- export interface ApiResponse<T> {
- code: number;
- msg: string;
- data: T;
- card?: VipCardInfo;
- // 以下是注册登录才有的
- token?: string;
- user?: User.UserInfo;
- isDefaultModifyPwd?: boolean;
- isPasswordExpired?: boolean;
- // 以下是机构信息
- org?: {
- contactPhone: string;
- logo: string;
- orgName: string;
- }
- }
- export interface ApiCaptchaResponse {
- code: number;
- msg: string;
- img: string;
- uuid: string;
- }
- export interface ApiResponseList<T> {
- code: number;
- msg: string;
- rows: T[];
- total: number;
- }
- export interface TreeData {
- name: string;
- value: number;
- children?: TreeData[];
- isExpanded?: boolean;
- isLeaf?: boolean;
- }
- export interface TableConfig {
- border?: boolean;
- stripe?: boolean;
- emptyText?: string;
- loading?: boolean;
- rowKey?: string;
- }
- export interface TableColumnConfig {
- prop: string;
- label: string;
- flex?: number;
- slot?: string;
- type?: string;
- headerAlign?: 'left' | 'center' | 'right';
- align?: 'left' | 'center' | 'right';
- }
- /**
- * 应用 store
- */
- export interface AppStoreState {
- isInitialized: boolean;
- activeTabbar: number;
- statusBarHeight: number;
- systemInfo: UniApp.GetSystemInfoResult | null;
- appConfig: ConfigItem[];
- platform: string;
- }
- export interface DictStoreState {
- dicts: Record<string, DictItem[]>;
- }
- export interface UserStoreState {
- accessToken: string | null;
- user: User.UserInfo | null;
- isDefaultModifyPwd?: boolean;
- isPasswordExpired?: boolean;
- card: VipCardInfo | null;
- isExamGuideShow: boolean;
- tempInfo?: {
- location: string;
- examType?: EnumExamType;
- };
- org: {
- contactPhone: string;
- logo: string;
- orgName: string;
- };
- rememberPwd: boolean;
- cardPassword: string;
- cardNo: string;
- directedSchoolList: Study.DirectedSchool[];
- practiceSettings: Study.PracticeSettings;
- }
- /**
- * 字典项
- */
- export interface DictItem {
- dictLabel: string;
- dictValue: string;
- }
- export interface PickerItem {
- label: string;
- value: string | number;
- }
- export interface ConfigItem {
- configKey: string;
- configValue: string;
- configType: string;
- configName: string;
- configId: number;
- }
- export interface SwiperTabItem {
- name: string;
- value?: string;
- slot?: string;
- params?: any;
- }
- export { Study, User, News, Transfer, System, Major };
|