You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
122 lines
1.7 KiB
122 lines
1.7 KiB
import { http } from '../../utils/http'
|
|
|
|
|
|
/**
|
|
*
|
|
* @param data 模拟手机号码
|
|
* {
|
|
"loginType":"EMAIL", //登录方式
|
|
"account":"q614588746@163.com" , //登陆账号 手机号/邮箱/dccode
|
|
"verifyCode":"837012", //验证码
|
|
"password":"", //密码
|
|
"useCode":"true", //是否使用验证码 true/false
|
|
"idToken":"", //第三方登录idToken
|
|
}
|
|
*/
|
|
export const LoginApi = (data) => {
|
|
return http({
|
|
method: 'POST',
|
|
url: '/UserLogin/login',
|
|
data:
|
|
data
|
|
,
|
|
})
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* 发送邮箱验证码
|
|
* @param {*} email
|
|
* @returns
|
|
*/
|
|
export const SendEmailCodeApi = (data) => {
|
|
return http({
|
|
method: 'POST',
|
|
url: '/UserLogin/sendEmail',
|
|
data: {
|
|
data
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* 发送手机验证码
|
|
* @param {*} email
|
|
* @returns
|
|
*/
|
|
export const SendPhoneCodeApi = (data) => {
|
|
return http({
|
|
method: 'POST',
|
|
url: '/UserLogin/sendPhone',
|
|
data: {
|
|
data
|
|
}
|
|
})
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* 注册
|
|
*/
|
|
|
|
export const register = (data) => {
|
|
return http({
|
|
method: 'GET',
|
|
url: '/register',
|
|
data: {
|
|
data
|
|
},
|
|
})
|
|
}
|
|
|
|
/**
|
|
* 修改密码
|
|
*
|
|
*/
|
|
|
|
export const updatePassword = (data) => {
|
|
return http({
|
|
method: 'GET',
|
|
url: '/updatePassword',
|
|
data: {
|
|
data
|
|
},
|
|
})
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* 通过苹果登录
|
|
*/
|
|
|
|
export const postLoginAppleSimpleAPI = (phoneNumber) => {
|
|
return http({
|
|
method: 'POST',
|
|
url: '/login',
|
|
data: {
|
|
phoneNumber,
|
|
},
|
|
})
|
|
}
|
|
|
|
|
|
/**
|
|
* 通过谷歌登录
|
|
*/
|
|
|
|
export const postLoginGoogleSimpleAPI = (phoneNumber) => {
|
|
return http({
|
|
method: 'POST',
|
|
url: '/login/wxMin/simple',
|
|
data: {
|
|
phoneNumber,
|
|
},
|
|
})
|
|
}
|
|
|
|
|