提交 c211fd1c authored 作者: 钟是志's avatar 钟是志

基础架构

上级 5b054af4
......@@ -90,7 +90,7 @@ export default function request(url, options) {
if (typeof response === 'string') {
let xxx = '';
try{
xxx = JSON.parse(response)
xxx = JSON.parse(response);
if (xxx.errMsg) {
Toast.hide();
Modal.alert('', `${xxx.errMsg}`, [
......@@ -99,7 +99,14 @@ export default function request(url, options) {
return;
}
}catch(e){
}
}else if(response && (response.errMsg || response.errmsg)){
Toast.hide();
Modal.alert('', `${response.errMsg || response.errmsg}`, [
{ text: '知道了', onPress: () => console.log('ok') },
]);
return;
}
return response;
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论