Flatten nested repos
This commit is contained in:
52
test/vuex/one-sampling-v2/api/queue.js
Normal file
52
test/vuex/one-sampling-v2/api/queue.js
Normal file
@@ -0,0 +1,52 @@
|
||||
// API :
|
||||
// search bank
|
||||
// paramater : query , page , rowPerPage
|
||||
const URL =
|
||||
"/one-api/mockup/sampling/sampling/";
|
||||
|
||||
export async function call(token, order_id, station_id, act) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'queue/call_skip_process', {
|
||||
token: token,
|
||||
order_id: order_id,
|
||||
station_id: station_id,
|
||||
act: act
|
||||
});
|
||||
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 recall(token, order_id, station_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'queue/recall', {
|
||||
token: token,
|
||||
order_id: order_id,
|
||||
station_id: station_id
|
||||
});
|
||||
if (resp.status != 200) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: resp.statusText
|
||||
};
|
||||
}
|
||||
let data = resp.data;
|
||||
return data;
|
||||
} catch(e) {
|
||||
return {
|
||||
status: "ERR",
|
||||
message: e.message
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user