fix bug
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-03-14 14:17:38
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-03-24 10:12:00
|
||||
* @LastEditTime : 2022-03-24 19:19:17
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\passport\\components\\order-agreement\\order-agreement.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -20,24 +20,31 @@ import { PassportService } from '../../services/passport.service';
|
||||
export class OrderAgreementComponent implements OnInit {
|
||||
agreementContent: any;
|
||||
type = 2;
|
||||
data : any;
|
||||
constructor(private ar: ActivatedRoute, private service: PassportService) {
|
||||
ar.queryParams.subscribe((params: Params) => {
|
||||
this.type = params.type || 2;
|
||||
console.log(params);
|
||||
|
||||
this.type = params?.type || 2;
|
||||
this.data = JSON.parse(params?.data) || {};
|
||||
});
|
||||
}
|
||||
ngOnInit() {
|
||||
console.log(this.type);
|
||||
if(this.type == 3) {
|
||||
this.service.request(this.service.$api_get_getSupplementaryAgreement, { type: this.type }).subscribe(res => {
|
||||
console.log(this.data);
|
||||
|
||||
this.service.request(this.service.$api_get_getSupplementaryAgreement, { billId: this.data?.billId, billCode: this.data?.billCode }).subscribe(res => {
|
||||
if (res) {
|
||||
this.agreementContent = res;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.service.request(this.service.$api_get_agreement, { type: this.type }).subscribe(res => {
|
||||
if (res) {
|
||||
this.agreementContent = res;
|
||||
}
|
||||
});
|
||||
}
|
||||
this.service.request(this.service.$api_get_agreement, { type: this.type }).subscribe(res => {
|
||||
if (res) {
|
||||
this.agreementContent = res;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user