Reinit project
This commit is contained in:
120
src/types/common.ts
Normal file
120
src/types/common.ts
Normal file
@@ -0,0 +1,120 @@
|
||||
export enum PageState {
|
||||
Pending = 'pending',
|
||||
Failure = 'failure',
|
||||
Success = 'success',
|
||||
}
|
||||
|
||||
export interface User {
|
||||
id: string;
|
||||
nickname: string;
|
||||
avatar?: string;
|
||||
phone: string;
|
||||
email?: string;
|
||||
token: string;
|
||||
}
|
||||
|
||||
export interface AreaCode {
|
||||
id: string;
|
||||
areacode: string;
|
||||
areaname: string;
|
||||
}
|
||||
|
||||
export type AreaCodes = AreaCode[];
|
||||
|
||||
export enum EstateType {
|
||||
Hold = '0',
|
||||
Sold = '1',
|
||||
}
|
||||
|
||||
export interface Estate {
|
||||
id: string;
|
||||
name: string;
|
||||
image?: string;
|
||||
desc?: string;
|
||||
|
||||
/**
|
||||
* 买入价格
|
||||
*/
|
||||
inPrice: string;
|
||||
|
||||
/**
|
||||
* 买入时间
|
||||
*/
|
||||
inTime: string;
|
||||
|
||||
/**
|
||||
* 卖出时间
|
||||
*/
|
||||
outTime: string;
|
||||
|
||||
/**
|
||||
* 到期时间
|
||||
*/
|
||||
lockTime: string;
|
||||
|
||||
/**
|
||||
* 利率
|
||||
*/
|
||||
profit: string;
|
||||
|
||||
/**
|
||||
* 利率 %
|
||||
*/
|
||||
profitShow: string;
|
||||
|
||||
/**
|
||||
* 税率
|
||||
*/
|
||||
taxfee: string;
|
||||
|
||||
/**
|
||||
* 税率 %
|
||||
*/
|
||||
taxfeeShow: string;
|
||||
|
||||
/**
|
||||
* 手续费实际值
|
||||
*/
|
||||
taxfeeAmount: string;
|
||||
|
||||
/**
|
||||
* 卖出价格
|
||||
*/
|
||||
outPrice: string;
|
||||
|
||||
/**
|
||||
* 实际收益
|
||||
*/
|
||||
profitPrice: string;
|
||||
|
||||
type?: EstateType;
|
||||
}
|
||||
|
||||
export type Estates = Estate[];
|
||||
|
||||
export enum MarketEstateAvailable {
|
||||
No = 0,
|
||||
Yes = 1,
|
||||
}
|
||||
|
||||
export interface MarketEstate {
|
||||
id: string;
|
||||
|
||||
name: string;
|
||||
|
||||
image?: string;
|
||||
|
||||
available: MarketEstateAvailable;
|
||||
|
||||
/**
|
||||
* 秒杀价
|
||||
*/
|
||||
price: string;
|
||||
|
||||
/**
|
||||
* 预期盈利,利率
|
||||
*/
|
||||
profit: string;
|
||||
}
|
||||
|
||||
export type MarketEstates = MarketEstate[];
|
||||
3
src/types/dva-saga.d.ts
vendored
Normal file
3
src/types/dva-saga.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
declare module 'dva/saga' {
|
||||
export function delay(timeout: number): any;
|
||||
}
|
||||
3
src/types/global.d.ts
vendored
Normal file
3
src/types/global.d.ts
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
interface Window {
|
||||
g_app: any;
|
||||
}
|
||||
32
src/types/react-fitted-image.d.ts
vendored
Normal file
32
src/types/react-fitted-image.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
declare module 'react-fitted-image' {
|
||||
import React from 'react';
|
||||
|
||||
export type FitType = 'auto' | 'contain' | 'cover';
|
||||
|
||||
export interface FittedImageProps {
|
||||
/**
|
||||
* @default false
|
||||
*/
|
||||
background?: boolean;
|
||||
|
||||
style?: React.CSSProperties;
|
||||
|
||||
className?: string;
|
||||
|
||||
/**
|
||||
* @default auto
|
||||
*/
|
||||
fit?: FitType;
|
||||
|
||||
src: string;
|
||||
|
||||
loader?: React.ReactElement;
|
||||
|
||||
onLoad?: () => any;
|
||||
|
||||
onError?: () => any;
|
||||
}
|
||||
|
||||
export default class extends React.Component<FittedImageProps> {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user