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)
			}
		})
	})
}
//获取dy报告list
export function dyrecord(identity) {
	return request({
		url: `http://8.131.93.145:54098/fd/sh05/record/${identity}`,
		method: 'get',
	})
}
//获取dz报告list
export function dzrecord(identity) {
	return request({
		url: `http://112.6.122.71:8009/fd/sh05/record/${identity}`,
		method: 'get',
	})
}
