index.ts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. import * as Study from "./study";
  2. import * as User from "./user";
  3. import * as News from "./news";
  4. import * as Transfer from "./transfer";
  5. import * as System from './system';
  6. import * as Major from "./major";
  7. import * as Career from "./career";
  8. import * as Tree from "./tree";
  9. import * as Voluntary from "./voluntary";
  10. import * as Dropdown from "./dropdown";
  11. import * as University from "./university";
  12. import * as TestCenter from "./test-center";
  13. import * as Pay from "./pay";
  14. import { VipCardInfo } from "./user";
  15. import { EnumExamMode, EnumExamType, EnumReviewMode } from "@/common/enum";
  16. export { Study, User, News, Transfer, System, Major, Career, Tree, Voluntary, Dropdown, University, TestCenter, Pay };
  17. /// 接口响应
  18. export interface ApiResponse<T> {
  19. code: number;
  20. msg: string;
  21. data: T;
  22. card?: VipCardInfo;
  23. // 以下是注册登录才有的
  24. token?: string;
  25. user?: User.UserInfo;
  26. isDefaultModifyPwd?: boolean;
  27. isPasswordExpired?: boolean;
  28. // 以下是机构信息
  29. org?: {
  30. contactPhone: string;
  31. logo: string;
  32. orgName: string;
  33. }
  34. }
  35. export interface ApiCaptchaResponse {
  36. code: number;
  37. msg: string;
  38. img: string;
  39. uuid: string;
  40. }
  41. export interface ApiResponseList<T> {
  42. code: number;
  43. msg: string;
  44. rows: T[];
  45. total: number;
  46. }
  47. export interface TableConfig {
  48. border?: boolean;
  49. stripe?: boolean;
  50. emptyText?: string;
  51. loading?: boolean;
  52. rowKey?: string;
  53. defaultValue?: string;
  54. }
  55. export interface TableColumnConfig {
  56. prop: string;
  57. label: string;
  58. flex?: number;
  59. slot?: string;
  60. type?: string;
  61. headerAlign?: 'left' | 'center' | 'right';
  62. align?: 'left' | 'center' | 'right';
  63. }
  64. /**
  65. * 应用 store
  66. */
  67. export interface AppStoreState {
  68. isInitialized: boolean;
  69. activeTabbar: number;
  70. statusBarHeight: number;
  71. systemInfo: UniApp.GetSystemInfoResult | null;
  72. appConfig: ConfigItem[];
  73. }
  74. export interface DictStoreState {
  75. dicts: Record<string, DictItem[]>;
  76. }
  77. export interface UserStoreState {
  78. accessToken: string | null;
  79. user: User.UserInfo | null;
  80. isDefaultModifyPwd?: boolean;
  81. isPasswordExpired?: boolean;
  82. card: VipCardInfo | null;
  83. isExamGuideShow: boolean;
  84. tempInfo?: {
  85. location: string;
  86. examType?: EnumExamType;
  87. };
  88. org: {
  89. contactPhone: string;
  90. logo: string;
  91. orgName: string;
  92. };
  93. rememberPwd: boolean;
  94. cardPassword: string;
  95. cardNo: string;
  96. directedSchoolList: Study.DirectedSchool[];
  97. practiceSettings: Study.PracticeSettings;
  98. }
  99. /**
  100. * 字典项
  101. */
  102. export interface DictItem {
  103. dictLabel: string;
  104. dictValue: string;
  105. }
  106. export interface PickerItem {
  107. label: string;
  108. value: string | number;
  109. }
  110. export interface ConfigItem {
  111. configKey: string;
  112. configValue: string;
  113. configType: string;
  114. configName: string;
  115. configId: number;
  116. }
  117. export interface SwiperTabItem {
  118. name: string;
  119. value?: string;
  120. slot?: string;
  121. params?: any;
  122. visited?: boolean;
  123. component?: any;
  124. }
  125. export interface Entity {
  126. id: number;
  127. name: string;
  128. remark: string | null;
  129. createBy: string | null;
  130. createTime: string | null;
  131. updateBy: string | null;
  132. updateTime: string | null;
  133. }