|
@@ -187,7 +187,7 @@ export class UserData {
|
|
|
from(this.nativeHttp.post(`${environment.APP_SERVE_URL}/production/sample/factory/pCode`,
|
|
|
data,
|
|
|
headers)).pipe(
|
|
|
- finalize(() => { })
|
|
|
+ finalize(() => loading.dismiss() )
|
|
|
).subscribe(async data => {
|
|
|
if (JSON.parse(data.data).code == 1) {
|
|
|
const toast = await this.toastCtrl.create({
|
|
@@ -223,7 +223,7 @@ export class UserData {
|
|
|
from(this.nativeHttp.post(`${environment.APP_SERVE_URL}/production/sample/factory/details/`,
|
|
|
data,
|
|
|
headers)).pipe(
|
|
|
- finalize(() => { })
|
|
|
+ finalize(() => loading.dismiss())
|
|
|
).subscribe(async data => {
|
|
|
let message = ''
|
|
|
if (JSON.parse(data.data).code == 1) {
|
|
@@ -356,14 +356,14 @@ export class UserData {
|
|
|
// 获取样品单QA详情
|
|
|
async getSampleQAlog(sdpId: Number): Promise<any> {
|
|
|
const token = await this.getToken();
|
|
|
- // let loading = await this.loadingCtrl.create();
|
|
|
- // await loading.present();
|
|
|
+ let loading = await this.loadingCtrl.create();
|
|
|
+ await loading.present();
|
|
|
this.nativeHttp.setDataSerializer('json');
|
|
|
const headers = { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json;charset=UTF-8' };
|
|
|
return new Promise((resolve, reject) => {
|
|
|
from(this.nativeHttp.get(`${environment.APP_SERVE_URL}/production/samples/mobile/qalog/${sdpId}`, {},
|
|
|
headers)).pipe(
|
|
|
- finalize(() => { })
|
|
|
+ finalize(() => loading.dismiss())
|
|
|
).subscribe(async data => {
|
|
|
resolve(data.data);
|
|
|
}, async err => {
|