Browse Source

Merge branch 'master' of http://39.106.78.171:3000/shaojiahao/Sinopec-Anxin

# Conflicts:
#	src/app/service/babylon/building-basic-infos.service.ts
dev
刘向辉 3 years ago
parent
commit
c800fed21a
  1. 14
      src/app/service/babylon/building-basic-infos.service.ts

14
src/app/service/babylon/building-basic-infos.service.ts

@ -11,6 +11,13 @@ export class BuildingBasicInfosService {
readonly c_get = "/Get";
readonly c_post = "/PostOrPut";
/**
*
*/
headers = {
"Content-Type": "application/json"
};
//获取单位信息的api
baseUrl = 'api/Services/3D/BuildingBasicInfo';
@ -20,6 +27,7 @@ export class BuildingBasicInfosService {
markUrl = "api/Services/3D/Sandboxie";
constructor(
private http: HttpClient
) { }
@ -38,9 +46,11 @@ export class BuildingBasicInfosService {
postBuildingBasicInfos(name: string, data: any): Observable<any> {
let params = {
name: name,
// content: JSON.stringify(data),
}
return this.http.post<any>(this.baseUrl + this.c_post, (data), { params })
let instance = this;
return this.http.post<any>(this.baseUrl + this.c_post, `'${JSON.stringify(data)}'`, { instance.headers, params })
.pipe(
catchError((err) => this.handleError(err))
);

Loading…
Cancel
Save