xinelu-applet-ui/api/pagesC/testreport/index.js
2023-11-13 11:54:26 +08:00

45 lines
1.3 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var request = function(config) {
return new Promise((resolve, rejected) => {
if (config.url != '/nurseApplet/chatRecord/updateReadStatus' && config.url !=
"/nurseApplet/chatRecord/sendMessage" && config.url !=
`/applet/sign/apply/checkSignApply/` + uni.getStorageSync('userinfo').cardNo) {
uni.showLoading({
title: ''
});
}
uni.request({
url: config.url,
data: config.data,
method: config.method,
timeout: 60000,
header: config.header,
success(res) {
uni.hideLoading();
resolve(res.data)
},
fail(err) {
uni.hideLoading();
rejected(err)
}
})
})
}
//获取东营报告list
// 东营驿站记录接口http://218.58.213.15:8009/fd/sh05/record/{identity}
// 东营获取驿站报告接口http://218.58.213.15:8009/fd/sh05/report/view/{reportId}
export function dyrecord(identity) {
return request({
url: `http://218.58.213.15:8009/fd/sh05/record/${identity}`,
method: 'get',
})
}
//获取德州报告list
// 德州驿站记录接口: http: //112.6.122.71:8009/fd/sh05/record/{identity}
// 德州获取驿站报告接口: http: //112.6.122.71:8009/fd/sh05/report/view/{reportId}
export function dzrecord(identity) {
return request({
url: `http://112.6.122.71:8009/fd/sh05/record/${identity}`,
method: 'get',
})
}