first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
class CarServe {
}
new CarServe();

View File

@@ -0,0 +1,56 @@
class IndexServe {
//首页
async index(data = {}) {
var ajax = new Ajax()
var res = await ajax.get({
url: config.apiList.index,
data: data,
});
ajax = null;
return res
} //
//每一页
async classListArr(data = {}) {
return await (new Ajax()).get({
url: config.apiList.classListArr,
data: data,
});
}
//导航菜单
async classList(data = {}) {
var res = await (new Ajax()).get({
url: config.apiList.classList,
data: data,
});
res.principal.unshift({
id: -1,
page: 1,
title: "首页",
}) //向res.principal数组前面追加数据(unshift)添加首页
res.principal.forEach(v => {
v.content = []; //为每条对象动态添加了content用来保存数据 默认值为空
v.page = 1;
v.total_page = 0
})
return res;
}
//详情
async info(data = {}) {
return await (new Ajax()).get({
url: config.apiList.info,
data: data,
});
}
}
var indexServe = new IndexServe()