Browse Source

增加保存失败时的弹窗提示

dev
刘向辉 3 years ago
parent
commit
623a8a26c3
  1. 7
      src/app/service/babylon/building-basic-infos.service.ts

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

@ -172,10 +172,13 @@ export class BuildingBasicInfosService {
let l_body = `'${bodyString}'`;
//兼容换行符
l_body = l_body.replace(/\\n/g, "\\\\n");
let instance = this;
return this.http.post<any>(api + this.c_post, l_body, { headers, params })
.pipe(
catchError((err) => this.handleError(err))
catchError((err) => {
alert("保存失败,错误:" + err.status);
return instance.handleError(err);
})
);
}

Loading…
Cancel
Save