30 lines
596 B
TypeScript
30 lines
596 B
TypeScript
import { http } from '@/utils/http'
|
|
import type { LoginResult } from '@/types/member'
|
|
|
|
type LoginParams = {
|
|
code: string
|
|
encryptedData: string
|
|
iv: string
|
|
}
|
|
|
|
// 获取手机号
|
|
export const postPhoneNumberAPI = (data: LoginParams) => {
|
|
return http<LoginResult>({
|
|
url: '/login/wxMin',
|
|
method: 'POST',
|
|
data,
|
|
})
|
|
}
|
|
|
|
// 模拟快捷登录
|
|
type PhoneNumberLoginMockParams = {
|
|
phoneNumber: string
|
|
}
|
|
export const postPhoneNumberLoginMockAPI = (data: PhoneNumberLoginMockParams) => {
|
|
return http<LoginResult>({
|
|
url: '/login/wxMin/simple',
|
|
method: 'POST',
|
|
data,
|
|
})
|
|
}
|