Flatten nested repos
This commit is contained in:
88
test/vuex/one-process-ref-out-status/api/order.js
Normal file
88
test/vuex/one-process-ref-out-status/api/order.js
Normal file
@@ -0,0 +1,88 @@
|
||||
const URL = "/one-api/mockup/refout/status/";
|
||||
|
||||
export async function search(search, is_internal, status) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'status/search', {
|
||||
search: search,
|
||||
is_internal: is_internal,
|
||||
status: status
|
||||
});
|
||||
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 search_sample(header_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'status/search_sample', {
|
||||
header_id: header_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
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export async function search_courier() {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'status/search_courier', {});
|
||||
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 send(token, header_id, ids, courier_id) {
|
||||
try {
|
||||
var resp = await axios.post(URL + 'status/send', {
|
||||
token: token,
|
||||
header_id: header_id,
|
||||
courier_id: courier_id,
|
||||
ids: ids
|
||||
});
|
||||
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