beelink/src/api/index.ts

39 lines
745 B
TypeScript
Raw Normal View History

2020-09-24 07:33:12 +00:00
import { get, post } from './base'
import { AxiosPromise } from 'axios'
2020-10-09 01:45:13 +00:00
/**
*
* @param phone
* @param type 0 1
*/
2020-10-09 06:31:10 +00:00
export function sendsms(phone: string, type?: number): Promise<AxiosPromise>{
2020-10-09 01:45:13 +00:00
return post('SendSms',{phone, type})
}
2020-10-09 06:31:10 +00:00
export function loginpass(phone: string, password: string): Promise<AxiosPromise>{
return post("login",{type: 2,username: phone, password: password})
}
2020-10-09 01:45:13 +00:00
// 下面是示例接口 可以删除
2020-09-24 07:46:08 +00:00
/**
*
*/
2020-09-24 07:33:12 +00:00
export function getinfo(): Promise<AxiosPromise>{
return get("a")
}
2020-09-24 07:46:08 +00:00
/**
*
* @param data
*
*/
export function seninfo(data: object): Promise<AxiosPromise>{
2020-09-24 07:33:12 +00:00
return post("b",data)
}
2020-09-25 07:23:51 +00:00