You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
1.6 KiB
JavaScript

import {
$post
} from '@/lu/axios.js'
let url_ = "https://bjgk-api.sixinyun.com";
const dev = 0
if (dev === 1) {
url_ = "http://beijingguokang"
}
export const HospitalExtraReportStatusAction = async (data) => await $post({
url: 'HospitalExtraReportStatus',
data
})
export const ReportDownAction = async (data) => await $post({
url: 'ReportDown',
data
})
export const ReportAnalysisAction = async (data) => await $post({
url: 'ReportAnalysis',
data
})
export const PrepareCheckReportAction = async (data) => await $post({
url: 'PrepareCheckReport',
data
})
export const AnalysisTypeListAction = async () => await $post({
url: 'AnalysisTypeList'
})
export const ReportContrastAction = async (data) => await $post({
url: 'ReportContrast',
data
})
export const ReportInfoAction = async (data) => await $post({
url: 'ReportInfo',
data
})
export const ReportListAction = async (data) => await $post({
url: 'ReportList',
data
})
export const ConfigGetAction = async (data) => await $post({
url: 'ConfigGet',
data
})
export const yo = async (data) => await $post({
url: 'YO',
data
})
export const $image = (path) => {
return `${url_}${path}`
}
export const $response = (response, then, error = () => {}) => {
if (response) {
if (response.code != 200) {
let showModals = [200099]
if (!!showModals.includes(response.code)) {
uni.hideLoading()
uni.showModal({
title: '提示',
content: response.message,
showCancel: false,
success: function(res) {
}
});
} else {
uni.$lu.toast(response.message);
}
uni.$lu.toast(response.message);
error()
return
}
then()
}
}