Browse Source

[完善]%3D处理

test-assets
邵佳豪 8 months ago
parent
commit
462733e9ca
  1. 5
      proxy.config.json
  2. 15
      src/app/pages/singlelogin/singlelogin.component.ts

5
proxy.config.json

@ -12,10 +12,5 @@
"secure": false, "secure": false,
"ws": true, "ws": true,
"logLevel": "debug" "logLevel": "debug"
},
"/p3p": {
"target": "https://test-uomsp.sinochemoilmarketing.com/sagframe-portal/",
"secure": false,
"changeOrigin": true
} }
} }

15
src/app/pages/singlelogin/singlelogin.component.ts

@ -24,13 +24,14 @@ export class SingleloginComponent implements OnInit {
async ngOnInit(): Promise<void> { async ngOnInit(): Promise<void> {
console.log("查询参数", this.route.snapshot.queryParams.page); console.log("查询参数", this.route.snapshot.queryParams.page);
let obj = { // let obj = {
SAG_USER_TOKEN: // SAG_USER_TOKEN:
"J0UI55c9334Julcaad1cs5kL_5OEg6x_ONVHdH4kTRJHC_yrfRI6ej5dwPeEsJYg==", // "hrtwsc5737z6LYr67e2e0PvinLXvo0Pk8ffAp8qxOLXt9CtSLGg61cZv9IDjKybQ%3D%3D",
}; // };
this.setCookie(obj); // this.setCookie(obj);
let token = this.getCookie("SAG_USER_TOKEN"); let token = this.getCookie("SAG_USER_TOKEN");
token = token.replace(/%3D/g, "=");
if (!token) { if (!token) {
alert("获取失败!"); alert("获取失败!");
return; return;
@ -79,7 +80,7 @@ export class SingleloginComponent implements OnInit {
getCurrentUserInfo() { getCurrentUserInfo() {
return new Promise<void>((resolve, reject) => { return new Promise<void>((resolve, reject) => {
this.http this.http
.get("/p3p/auth/getCurrentUserInfo", { .get("https://test-uomsp.sinochemoilmarketing.com/sagframe-portal/p3p/auth/getCurrentUserInfo", {
params: { params: {
token: this.sinToken, token: this.sinToken,
}, },
@ -100,7 +101,7 @@ export class SingleloginComponent implements OnInit {
getAuthOrganInfos() { getAuthOrganInfos() {
return new Promise<void>((resolve, reject) => { return new Promise<void>((resolve, reject) => {
this.http this.http
.get("/p3p/auth/getAuthOrganInfos", { .get("https://test-uomsp.sinochemoilmarketing.com/sagframe-portal/p3p/auth/getAuthOrganInfos", {
params: { params: {
token: this.sinToken, token: this.sinToken,
}, },

Loading…
Cancel
Save