251 lines
5.9 KiB
JavaScript
251 lines
5.9 KiB
JavaScript
const URL = "/one-api/cpone/mcuoffline/packet/packetcponev6";
|
|
|
|
// cpone start
|
|
export async function copypacket(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + '/copypacket', 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 xdeletev0(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + '/deletev0', 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 getGroupPemeriksaan(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + '/getGroupPemeriksaan', 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 getPacketById(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + '/getPaketById', 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 savesetupv0(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + '/savesetupv0', 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 getTTestByTPriceHeaderCurrent(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + '/getTTestByTPriceHeaderCurrent', 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 getTPriceHeaderCurrent(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + '/getTPriceHeaderCurrent', 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 searchTPriceHeader(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + '/searchTPriceHeader', 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 getTPriceHeader(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + '/getTPriceHeader', 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 searchv0(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + '/searchv0', 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 validatePacket(params) {
|
|
try {
|
|
var resp = await axios.post(URL + '/validatePacket', params);
|
|
if (resp.status != 200) {
|
|
return {
|
|
status: "ERR",
|
|
message: resp.statusText
|
|
};
|
|
}
|
|
|
|
let data = resp.data
|
|
return data;
|
|
} catch (error) {
|
|
return {
|
|
status: "ERR",
|
|
message: error.message
|
|
}
|
|
}
|
|
}
|
|
|
|
export async function unvalidatePacket(params) {
|
|
try {
|
|
var resp = await axios.post(URL + '/unValidatePacket', params)
|
|
if (resp.status != 200) {
|
|
return {
|
|
status: "ERR",
|
|
message: resp.statusText
|
|
}
|
|
}
|
|
let data = resp.data
|
|
return data
|
|
} catch (error) {
|
|
return {
|
|
status: "ERR",
|
|
message: error.message
|
|
}
|
|
}
|
|
}
|
|
|
|
export async function getPacketLogs(prm) {
|
|
try {
|
|
var resp = await axios.post(URL + '/getPacketLogs', 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
|
|
};
|
|
}
|
|
} |