account_http_pb.ts 717 B

1234567891011121314151617181920212223
  1. // @ts-ignore
  2. import { request } from 'ice';
  3. import {DebugLoginRequest,LoginReply,LoginRequest} from "./account_pb";
  4. const AccountService = {
  5. DebugLogin: async (req?: DebugLoginRequest) => {
  6. const res = await request.post<{ data: LoginReply, code: string, message: string }>('/api/login/debug', req);
  7. return res.data;
  8. },
  9. /** rpc MiniProgramLogin (LoginRequest) returns (LoginReply){
  10. // option (google.api.http) = {
  11. // post: "/api/login/mini_program",
  12. // body:"*"
  13. // };
  14. // }; */
  15. Login: async (req?: LoginRequest) => {
  16. const res = await request.post<{ data: LoginReply, code: string, message: string }>('/api/login', req);
  17. return res.data;
  18. },
  19. };
  20. export default AccountService;