优化
This commit is contained in:
@@ -436,6 +436,18 @@ class API extends HTTP {
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
//删除常用语列表
|
||||
delDoctorWords(params) {
|
||||
let doctor_words_id = params.doctor_words_id;
|
||||
params = {};
|
||||
return this.request({
|
||||
url: `${this.baseUrl}/doctor/words/`+doctor_words_id,
|
||||
method: 'DELETE',
|
||||
data: {
|
||||
...params
|
||||
}
|
||||
})
|
||||
}
|
||||
//搜索疾病分类-系统
|
||||
getBasicDiseaseSearch(params) {
|
||||
|
||||
@@ -46,16 +46,16 @@ class HTTP {
|
||||
url: app.globalData.login_url
|
||||
})
|
||||
} else {
|
||||
reject(res.data.message)
|
||||
reject(res.data.message);//向后传递错误信息,catch会拿到
|
||||
this._show_error(showLoading, res.data.message)
|
||||
}
|
||||
} else {
|
||||
reject(res.data)
|
||||
reject(res.data)//向后传递错误信息,catch会拿到
|
||||
this._show_error(showLoading, err.data.message)
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
reject()
|
||||
reject(err)//向后传递错误信息,catch会拿到
|
||||
this._show_error(showLoading, err.data.message)
|
||||
},
|
||||
complete: (res) => {
|
||||
@@ -70,6 +70,9 @@ class HTTP {
|
||||
|
||||
_show_error(showLoading, _message) {
|
||||
if(showLoading) wx.hideLoading();
|
||||
if(_message == undefined){
|
||||
_message = "网络错误";
|
||||
}
|
||||
wx.showToast({
|
||||
title: `${_message}`,
|
||||
icon: 'none',
|
||||
|
||||
Reference in New Issue
Block a user