| | |
| | | import { http } from '../services/httpClient'; |
| | | import { FastQueryParams } from '../models/quickFilter.model'; |
| | | |
| | | // 顧客登入(TODO: OTP認證開發前 暫時使用) |
| | | export function login(user: any) { |
| | | return http.post('/authenticate', user) |
| | | } |
| | | |
| | | // 顧客登入-發送OTP |
| | | export function sendOtp(loginInfo: LoginRequest) { |
| | | return http.post<OtpInfo>('/otp/sendOtp', loginInfo).then(res => res.data) |
| | | } |
| | | |
| | | // 顧客登入-驗證otp並登入 |
| | | export function loginVerify(loginVerify: LoginVerify) { |
| | | return http.post('/otp/verify', loginVerify) |
| | | } |
| | | |
| | | // 顧客註冊 |
| | | export function register(registerInfo: RegisterInfo) { |
| | | return http.post('/otp/register', registerInfo) |
| | | } |
| | | |
| | | // 推薦保險顧問 |
| | | export function recommend() { |
| | |
| | | } |
| | | export interface RequestOfLoginSuccess{ |
| | | id_token: string; |
| | | } |
| | | |
| | | export interface LoginRequest { |
| | | /** "SMS"=手機,"EMAIL"=email */ |
| | | loginType: string, |
| | | /** 若loginType填SMS則該欄帶入手機、EMAIL則帶入郵件信箱 */ |
| | | account: string, |
| | | } |
| | | |
| | | export interface OtpInfo { |
| | | /** 用於帶入otp認證時 */ |
| | | indexKey: string, |
| | | /** Otp是否有成功發送 */ |
| | | success: boolean, |
| | | failCode: string, |
| | | failReason: string, |
| | | } |
| | | |
| | | export interface LoginVerify { |
| | | /** 可帶入手機或email */ |
| | | account: string, |
| | | /** 由otp的api回的index key */ |
| | | indexKey: string, |
| | | /** 由手機或信箱收到的認證碼 */ |
| | | otpCode: string |
| | | } |
| | | |
| | | export interface RegisterInfo { |
| | | phone?: string, |
| | | email?: string, |
| | | indexKey: string, |
| | | otpCode: string, |
| | | name: string, |
| | | /** "SMS":Otp發送手機,"EMAIL":Otp發email */ |
| | | contactType: string |
| | | } |
| | | |
| | | export interface UserReviewsConsultantsParams{ |