Files
ClassContent/项目合集/校园失物招领/min-tpl/service/indexService.js
2024-09-27 02:06:13 +08:00

56 lines
1.4 KiB
JavaScript

import Http from "../http/index";
import config from "../config/index"
import utils from "../utils/index"
export default class indexService {
async token (data = {}, headers = {}) {
return await (new Http()).post({
url: config.apiList.token,
data: data,
headers: headers
})
}
async notice (data = {}, headers = {}) {
return await (new Http()).post({
url: config.apiList.notice,
data: data,
headers: headers
})
}
async push (data = {}, headers = {}) {
return await (new Http()).post({
url: config.apiList.push,
data: data,
headers: headers
})
}
async info (data = {}, headers = {}) {
let res = await (new Http()).post({
url: config.apiList.info,
data: data,
headers: headers
});
res.thing_createdtime = utils.time(res.thing_createdtime)
return res;
}
async tab (data = {}, headers = {}) {
return await (new Http()).post({
url: config.apiList.tab,
data: data,
headers: headers
})
}
async search (data = {}, headers = {}) {
return await (new Http()).post({
url: config.apiList.search,
data: data,
headers: headers
})
}
}