25 lines
741 B
TypeScript
25 lines
741 B
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'
|
|
})
|
|
}
|
|
} |