|
|
|
@ -6,9 +6,10 @@ export async function getapi(url, params = {}, config) { |
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
let loading = Loading.service({ |
|
|
|
lock: true, |
|
|
|
fontSize:"24px", |
|
|
|
text: "Loading...", |
|
|
|
spinner: "el-icon-loading", |
|
|
|
background: "rgba(0, 0, 0, 0.7)", |
|
|
|
background: "rgba(0, 0, 0, 0)", |
|
|
|
}); |
|
|
|
request |
|
|
|
.get(`${mm.apiurl}${url}`, { |
|
|
|
@ -34,7 +35,7 @@ export async function postapi(url, paramsdata = {}, config) { |
|
|
|
lock: true, |
|
|
|
text: "Loading...", |
|
|
|
spinner: "el-icon-loading", |
|
|
|
background: "rgba(0, 0, 0, 0.7)", |
|
|
|
background: "rgba(0, 0, 0, 0)", |
|
|
|
}); |
|
|
|
request |
|
|
|
.post(`${mm.apiurl}${url}`, paramsdata, config) |
|
|
|
@ -56,7 +57,7 @@ export async function deletapi(url, params = {}, config) { |
|
|
|
lock: true, |
|
|
|
text: "Loading...", |
|
|
|
spinner: "el-icon-loading", |
|
|
|
background: "rgba(0, 0, 0, 0.7)", |
|
|
|
background: "rgba(0, 0, 0, 0)", |
|
|
|
}); |
|
|
|
request |
|
|
|
.delete(`${mm.apiurl}${url}`, { |
|
|
|
@ -81,7 +82,7 @@ export async function putapi(url, params = {}, config) { |
|
|
|
lock: true, |
|
|
|
text: "Loading...", |
|
|
|
spinner: "el-icon-loading", |
|
|
|
background: "rgba(0, 0, 0, 0.7)", |
|
|
|
background: "rgba(0, 0, 0, 0)", |
|
|
|
}); |
|
|
|
request |
|
|
|
.put(`${mm.apiurl}${url}`, params, config) |
|
|
|
|