diff --git a/proxy.config.json b/proxy.config.json index 1898eac..14daf3d 100644 --- a/proxy.config.json +++ b/proxy.config.json @@ -1,6 +1,6 @@ { "/api": { - "target": "http://39.106.78.171:8000", + "target": "http://10.81.73.39:8000", "secure": false, "changeOrigin": true } diff --git a/src/app/external-links-plan/external-links-plan.component.ts b/src/app/external-links-plan/external-links-plan.component.ts index 60200de..add6114 100644 --- a/src/app/external-links-plan/external-links-plan.component.ts +++ b/src/app/external-links-plan/external-links-plan.component.ts @@ -48,7 +48,7 @@ export class ExternalLinksPlanComponent implements OnInit { } } else { // 二维三维预案 - this.handleData() + this.handleData(data.url) } }) }) @@ -110,8 +110,9 @@ export class ExternalLinksPlanComponent implements OnInit { companyData//当前公司信息 thirdPartyURL threedUrl: any - handleData() { + handleData(url?:string) { let data = this.planData + // console.log('ddddd',data) if (this.planData.planMode == 2) { //预案planMode=2时, 跳查看页面组件 this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => { @@ -126,12 +127,13 @@ export class ExternalLinksPlanComponent implements OnInit { // this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(`/keyUnit/viewunitinfoplans?id=${data.companyId}`) }) } else if (this.planData.planMode == 3) { //预案planMode=3时, 第三方网址' - this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => { - data && data.company ? this.companyData = data.company : null - this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(data.url) - this.showType = 2 - }) - + // this.http.get(`/api/Plans/${data.companyId}`).subscribe((data: any) => { + // console.log('xxxx',data) + // data && data.company ? this.companyData = data.company : null + // this.threedUrl = this.sanitizer.bypassSecurityTrustResourceUrl(url) + // this.showType = 2 + // }) + window.location.href = `${url}?unitId=${data.company.id}&unitName=${data.company.name}&editMode=false` } } } diff --git a/src/index.html b/src/index.html index 0e6018c..3e12f4c 100644 --- a/src/index.html +++ b/src/index.html @@ -22,9 +22,9 @@ - - - + + +