保誠-保戶業務員媒合平台
Tomas
2023-12-25 f065760fa7df1f88747395ab4b55349ce8b2faf0
PAMapp/shared/services/login.service.ts
@@ -1,8 +1,6 @@
import { http } from "./httpClient";
import { AxiosResponse } from 'axios';
import _ from "lodash";
import CryptoJS from "crypto-js";
import forge from "node-forge";
import { http } from "./httpClient";
// import CryptoJS from "asmcrypto-js";
import { ConsultantLoginInfo } from "../models/ConsultantLoginInfo";
@@ -73,8 +71,8 @@
    return http.get('/login/validate/get_img_code',{ responseType : 'arraybuffer' })
      .then( response => {
        const toBase64 = window.btoa(
                          _.reduce( new Uint8Array(response.data),(data,byte) =>
                            data + String.fromCharCode(byte),'')
                          Array.from(new Uint8Array(response.data)).reduce((data, byte) =>
                            data + String.fromCharCode(byte), '')
                        );
        const imgSrc = `data:image/jpeg;base64,${toBase64}`;
        return imgSrc;