import { WxInfoDto } from "../DTO/wx-info-dto.model"; import { HostConfig } from '../config/host.config'; import { Injectable } from '@angular/core'; import { HttpHandler } from './http-handler.service'; import { Page } from '../response/page.type'; @Injectable({ providedIn: 'root', }) export class WxMaUserService { static PATH = '/wx/user'; constructor(private httpHandler: HttpHandler) {} login(code: string, header?: any): Promise { return this.httpHandler.(`${HostConfig.DEV_HOST}${WxMaUserService.PATH}`, header); } info(sessionKey: string,signature: string,rawData: string,encryptedData: string,iv: string, header?: any): Promise { return this.httpHandler.(`${HostConfig.DEV_HOST}${WxMaUserService.PATH}`, header); } phone(wxinfo: WxInfoDto, header?: any): Promise { return this.httpHandler.post(`${HostConfig.DEV_HOST}${WxMaUserService.PATH}/phone` ,wxinfo, header); } }