Files
FE_CPONE/test/vuex/one-online-queue-monitor/api/queue.js
2026-04-27 10:13:31 +07:00

59 lines
1.4 KiB
JavaScript

const URL = "/one-api/mockup/antrian-online/";
export async function search(prm) {
try {
var resp = await axios.post(URL + 'Antrianonlinemonitoring/search', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function getSubService(prm) {
try {
var resp = await axios.post(URL + 'Antrianonlinemonitoring/getsubservice', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}
export async function followup(prm) {
try {
var resp = await axios.post(URL + 'Antrianonlinemonitoring/followup', prm);
if (resp.status != 200) {
return {
status: "ERR",
message: resp.statusText
};
}
let data = resp.data;
return data;
} catch (e) {
return {
status: "ERR",
message: e.message
};
}
}