首页登录完成

This commit is contained in:
2020-10-09 16:04:20 +08:00
parent e9a37efe02
commit fb6a526aee
9 changed files with 89 additions and 55 deletions

View File

@@ -1,5 +1,4 @@
import { get, post } from './base'
import { AxiosPromise } from 'axios'
/**
* 请求验证码
@@ -7,32 +6,10 @@ import { AxiosPromise } from 'axios'
* @param type 类型 0国内 1国外
*/
export function sendsms(phone: string, type?: number): Promise<AxiosPromise>{
export function sendsms(phone: string, type?: number){
return post('SendSms',{phone, type})
}
export function loginpass(phone: string, password: string): Promise<AxiosPromise>{
export function loginpass(phone: string, password: string){
return post("login",{type: 2,username: phone, password: password})
}
// 下面是示例接口 可以删除
/**
* 请求用户信息
*/
export function getinfo(): Promise<AxiosPromise>{
return get("a")
}
/**
* 提交修改之后的用户信息
* @param data
*
*/
export function seninfo(data: object): Promise<AxiosPromise>{
return post("b",data)
}