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,7 @@
import http from "@/http";
import config from "@/config";
export default class BaseServe {
http = new http();
config = config;
}

View File

@@ -0,0 +1,85 @@
import BaseServe from "./BaseServe";
export default class CarServe extends BaseServe {
constructor() {
super();
}
async addCar (data = {}, headers = {}) {
return await this.http.post({
url: this.config.urlList.addCar,
data: data,
headers: headers
});
}
async checkCar (data = {}, headers = {}) {
return await this.http.post({
url: this.config.urlList.checkCar,
data: data,
headers: headers
});
}
async getCarList (data = {}, headers = {}) {
var res =await this.http.post({
url: this.config.urlList.getCarList,
data: data,
headers: headers
});
if(Array.isArray(res)){
res.forEach(v=>{
v.wares_masterimg = JSON.parse(v.wares_masterimg)
})
}else {
res=[]
}
return res
}
async updateCarNum (data = {}, headers = {}) {
return await this.http.post({
url: this.config.urlList.updateCarNum,
data: data,
headers: headers
});
}
async deleteCar (data = {}, headers = {}) {
return await this.http.post({
url: this.config.urlList.deleteCar,
data: data,
headers: headers
});
}
async submitCar (data = {}, headers = {}) {
return await this.http.post({
url: this.config.urlList.submitCar,
data: data,
headers: headers
});
}
async allOrder (data = {}, headers = {}) {
let res = await this.http.post({
url: this.config.urlList.allOrder,
data: data,
headers: headers
});
if(Array.isArray(res)){
res.forEach(v=>{
v.wares_masterimg=JSON.parse(v.wares_masterimg)
})
return res
}else {
return []
}
}
async buyOrder (data = {}, headers = {}) {
return await this.http.post({
url: this.config.urlList.buyOrder,
data: data,
headers: headers
});
}
}

View File

@@ -0,0 +1,56 @@
import BaseServe from "./BaseServe";
export default class IndexServe extends BaseServe {
constructor() {
super();
}
async banner (data = {}, headers = {}) {
return await this.http.post({
url: this.config.urlList.banner,
data: data,
headers: headers
});
}
async activity (data = {}, headers = {}) {
let res =await this.http.post({
url: this.config.urlList.activity,
data: data,
headers: headers
});
res.forEach(v=>{
v.wares_masterimg=JSON.parse(v.wares_masterimg)
})
return res
}
async list (data = {}, headers = {}) {
return await this.http.post({
url: this.config.urlList.list,
data: data,
headers: headers
});
}
async info (data = {}, headers = {}) {
let res = await this.http.post({
url: this.config.urlList.info,
data: data,
headers: headers
});
res.wares_infoimg = JSON.parse(res.wares_infoimg)
res.wares_masterimg = JSON.parse(res.wares_masterimg)
return res;
}
async home (data = {}, headers = {}) {
var res = await this.http.post({
url: this.config.urlList.index,
data: data,
headers: headers
});
res.forEach(v => {
v.wares_masterimg = JSON.parse(v.wares_masterimg)
});
return res
}
}

View File

@@ -0,0 +1,19 @@
import BaseServe from "./BaseServe";
export default class searchServe extends BaseServe {
constructor() {
super();
}
async search (data = {}, headers = {}) {
let res = await this.http.post({
url: this.config.urlList.search,
data: data,
headers: headers
});
res.forEach(v=>{
v.wares_masterimg=JSON.parse(v.wares_masterimg)
})
return res
}
}

View File

@@ -0,0 +1,23 @@
import BaseServe from "./BaseServe";
export default class UserServe extends BaseServe {
constructor() {
super();
}
async login (data = {}, headers = {}) {
return await this.http.post({
url: this.config.urlList.login,
data: data,
headers: headers
});
}
async add (data = {}, headers = {}) {
return await this.http.post({
url: this.config.urlList.add,
data: data,
headers: headers
});
}
}

View File

@@ -0,0 +1,11 @@
import IndexServe from "./IndexServe";
import CarServe from "./CarServe";
import UserServe from "./UserServe";
import SearchServe from "./SearchServe";
export default {
index: new IndexServe(),
car: new CarServe(),
user: new UserServe(),
Search: new SearchServe(),
}