36 lines
1.0 KiB
TypeScript
36 lines
1.0 KiB
TypeScript
import { request } from '../base'
|
|
import type { LoginParam, ResultDomain, LoginDomain, TbGuestDTO } from '../../types'
|
|
// 来客 API
|
|
export const guestAPI = {
|
|
/**
|
|
* 微信小程序用户识别登录
|
|
*/
|
|
identify(loginParam: LoginParam): Promise<ResultDomain<LoginDomain>> {
|
|
return request<LoginDomain>({
|
|
url: '/urban-lifeline/system/guest/identify',
|
|
method: 'POST',
|
|
data: loginParam
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 根据微信ID查询来客
|
|
*/
|
|
selectGuestByWechat(wechatId: string): Promise<ResultDomain<TbGuestDTO>> {
|
|
return request<TbGuestDTO>({
|
|
url: `/urban-lifeline/system/guest/wechat/${wechatId}`,
|
|
method: 'GET'
|
|
})
|
|
},
|
|
|
|
/**
|
|
* 获取可选人员列表
|
|
*/
|
|
listGuest(filter?: TbGuestDTO): Promise<ResultDomain<TbGuestDTO>> {
|
|
return request<TbGuestDTO>({
|
|
url: '/urban-lifeline/system/guest/list',
|
|
method: 'POST',
|
|
data: filter||{}
|
|
})
|
|
}
|
|
} |