保誠-保戶業務員媒合平台
Tomas
2023-08-08 4e86a748719097a92220b223f86ae98f45032a41
Update: [顧問登入] AES 加密
修改2個檔案
5 ■■■■ 已變更過的檔案
PAMapp/package.json 1 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/shared/services/login.service.ts 4 ●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/package.json
@@ -21,6 +21,7 @@
    "@nuxtjs/style-resources": "^1.2.1",
    "@types/swiper": "^5.4.3",
    "core-js": "^3.18.3",
    "crypto-js": "^4.1.1",
    "element-ui": "^2.15.6",
    "lodash": "^4.17.21",
    "nuxt": "^2.15.8",
PAMapp/shared/services/login.service.ts
@@ -1,6 +1,7 @@
import { http } from "./httpClient";
import { AxiosResponse } from 'axios';
import _ from "lodash";
import AES from 'crypto-js/aes';
import { ConsultantLoginInfo } from "../models/ConsultantLoginInfo";
import { LoginRequest } from "../models/loginRequest.model";
@@ -84,7 +85,8 @@
  /** 顧問登入 **/
  logInToConsultant(consultantDto:ConsultantLoginInfo, verificationCode: string):Promise<AxiosResponse<LoginSuccessToken>>{
    return http.post(`/eService/authenticate/${verificationCode}`,consultantDto);
    const encryptPassword = AES.encrypt(consultantDto.password, 'PAM KEY').toString();
    return http.post(`/eService/authenticate/${verificationCode}`, { ...consultantDto, password: encryptPassword });
  }
}