修改设备工单
This commit is contained in:
20
utils/api.js
20
utils/api.js
@@ -16,8 +16,6 @@ const request = (url = '', data = {}, header = {
|
||||
setTimeout( ()=> {
|
||||
uni.hideLoading();
|
||||
}, 200);
|
||||
|
||||
console.log(res.data.code,455)
|
||||
uni.showModal({
|
||||
showCancel: false,
|
||||
title: '温馨提示',
|
||||
@@ -32,8 +30,7 @@ const request = (url = '', data = {}, header = {
|
||||
}
|
||||
}
|
||||
});
|
||||
console.log(res.data.code,888)
|
||||
|
||||
return
|
||||
}
|
||||
if(res.header.Authorization){
|
||||
uni.removeStorageSync('mes_token');
|
||||
@@ -46,7 +43,12 @@ const request = (url = '', data = {}, header = {
|
||||
|
||||
// 成功的回调
|
||||
if(res.data.code == 200){
|
||||
resolve(res.data)
|
||||
resolve(res.data);
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:res.data.message
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
@@ -91,7 +93,8 @@ const request = (url = '', data = {}, header = {
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
return
|
||||
}
|
||||
if(res.header.Authorization){
|
||||
uni.removeStorageSync('mes_token');
|
||||
@@ -104,6 +107,11 @@ const request = (url = '', data = {}, header = {
|
||||
// 成功的回调
|
||||
if(res.data.code == 200){
|
||||
resolve(res.data)
|
||||
}else{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:res.data.message
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
|
||||
Reference in New Issue
Block a user