From db369f9ec74cd025e162b99f7ec1ac343733bbc8 Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期四, 16 十二月 2021 11:07:48 +0800 Subject: [PATCH] refactor: login 1. 整理 methods 順序 2. 使用 loginService --- PAMapp/assets/ts/api/consultant.ts | 54 ------------------------------------------------------ 1 files changed, 0 insertions(+), 54 deletions(-) diff --git a/PAMapp/assets/ts/api/consultant.ts b/PAMapp/assets/ts/api/consultant.ts index d3462a4..5e4bea4 100644 --- a/PAMapp/assets/ts/api/consultant.ts +++ b/PAMapp/assets/ts/api/consultant.ts @@ -7,25 +7,6 @@ import { http } from '../services/httpClient'; import { FastQueryParams } from '../models/quickFilter.model'; -// 憿批恥��(TODO: OTP隤����� ���蝙�) -export function login(user: any) { - return http.post('/authenticate', user) -} - -// 憿批恥��-��TP -export function sendOtp(loginInfo: LoginRequest) { - return http.post<OtpInfo>('/otp/sendOtp', loginInfo).then(res => res.data) -} - -// 憿批恥��-撽�tp銝衣� -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() { @@ -191,41 +172,6 @@ } export interface RequestOfLoginSuccess{ id_token: string; -} - -export interface LoginRequest { - /** "SMS"=�����"EMAIL"=email */ - loginType: string, - /** �loginType憛俟MS��府甈葆�����MAIL��葆��隞嗡縑蝞� */ - account: string, -} - -export interface OtpInfo { - /** ��撣嗅otp隤��� */ - indexKey: string, - /** Otp�������� */ - success: boolean, - failCode: string, - failReason: string, -} - -export interface LoginVerify { - /** �撣嗅����mail */ - account: string, - /** �otp��pi���ndex key */ - indexKey: string, - /** �����縑蝞望�����Ⅳ */ - otpCode: string -} - -export interface RegisterInfo { - phone?: string, - email?: string, - indexKey: string, - otpCode: string, - name: string, - /** "SMS"嚗tp������"EMAIL":Otp�email */ - contactType: string } export interface UserReviewsConsultantsParams{ -- Gitblit v1.8.0