34 lines
818 B
JavaScript
34 lines
818 B
JavaScript
import Http from "@/http";
|
|
import config from "@/config"
|
|
|
|
export default class indexService {
|
|
async home (data = {}, headers = {}) {
|
|
return await (new Http()).get({
|
|
url: config.apiList.home,
|
|
data: data,
|
|
headers: headers
|
|
})
|
|
}
|
|
|
|
async classList (data = {}, headers = {}) {
|
|
return await (new Http()).get({
|
|
url: config.apiList.classList,
|
|
data: data,
|
|
headers: headers
|
|
})
|
|
}
|
|
|
|
async type (data = {}, headers = {}) {
|
|
let res = await (new Http()).get({
|
|
url: config.apiList.type,
|
|
data: data,
|
|
headers: headers
|
|
});
|
|
res.principal.forEach((v,i) => {
|
|
v.into = `title${i}`
|
|
v.content = []
|
|
});
|
|
return res;
|
|
}
|
|
|
|
} |