|
|
|
@ -1,10 +1,12 @@ |
|
|
|
|
import {request} from "./request"; |
|
|
|
|
|
|
|
|
|
interface Code { |
|
|
|
|
image: string |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
interface Login { |
|
|
|
|
access_token: string |
|
|
|
|
code?: { |
|
|
|
|
image: string |
|
|
|
|
} |
|
|
|
|
code?: Code |
|
|
|
|
company: Company |
|
|
|
|
token: string |
|
|
|
|
user: User |
|
|
|
@ -48,6 +50,6 @@ export const userApi = { |
|
|
|
|
return request<DepListData>(`/api/v1/user/detail`, "GET") |
|
|
|
|
}, |
|
|
|
|
code(catch_key: string) { |
|
|
|
|
return request(`/api/v1/auth/login/code`, "GET", {open_id:catch_key}) |
|
|
|
|
return request<{ code: Code }>(`/api/v1/auth/login/code`, "POST", {openid: catch_key}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|