project init
This commit is contained in:
Executable
+5
@@ -0,0 +1,5 @@
|
||||
export interface IAccountInfo {
|
||||
userAccount: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
import {IAccountInfo} from "./IAccountInfo";
|
||||
import {ILoginResult} from "./ILoginResult";
|
||||
|
||||
export interface IAccountService {
|
||||
login(accountInfo: IAccountInfo): Promise<ILoginResult>;
|
||||
authUser(userInfo: IAccountInfo): boolean;
|
||||
}
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
import { HttpMethod } from 'urllib';
|
||||
|
||||
/**
|
||||
* @description User-Service abstractions
|
||||
*/
|
||||
export interface IFetchOptions {
|
||||
method?: string;
|
||||
url: string;
|
||||
body: object;
|
||||
head?: object;
|
||||
timeout?: number;
|
||||
headers?: object;
|
||||
type?: HttpMethod;
|
||||
ssjToken: string;
|
||||
}
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
export interface ILoginResult {
|
||||
token:string
|
||||
}
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
export enum ProductType {
|
||||
/**
|
||||
* 网贷(二部产品)
|
||||
*/
|
||||
WEB_LOAN,
|
||||
/**
|
||||
* 信用卡贷款(一部产品)
|
||||
*/
|
||||
CREDIT_CARD,
|
||||
}
|
||||
|
||||
export interface IRequestBody {
|
||||
head: any;
|
||||
body: any;
|
||||
}
|
||||
Executable
+11
@@ -0,0 +1,11 @@
|
||||
export enum ResultCode {
|
||||
SUCCESS = '000000',
|
||||
FAILD = '100000',
|
||||
UNAUTH = '999999'
|
||||
}
|
||||
|
||||
export interface IResult {
|
||||
code: ResultCode;
|
||||
data: any;
|
||||
message: string;
|
||||
}
|
||||
Reference in New Issue
Block a user