|
@@ -10,26 +10,35 @@ interface ResponseType extends Promise<any> {
|
|
}
|
|
}
|
|
// 添加
|
|
// 添加
|
|
export const httpAdd = (data: object): ResponseType => {
|
|
export const httpAdd = (data: object): ResponseType => {
|
|
- return http.request("post", `${yewuApi}useradd`, { data });
|
|
|
|
|
|
+ return http.request("post", `${yewuApi}useradd`, {
|
|
|
|
+ data: {
|
|
|
|
+ ...data,
|
|
|
|
+ level: "1"
|
|
|
|
+ }
|
|
|
|
+ });
|
|
};
|
|
};
|
|
// 列表
|
|
// 列表
|
|
export const httpList = (data: object = {}): ResponseType => {
|
|
export const httpList = (data: object = {}): ResponseType => {
|
|
- return http.request("post", `${yewuApi}usersinglelist`, {data:{
|
|
|
|
|
|
+ return http.request("post", `${yewuApi}usersinglelist`, {
|
|
|
|
+ data: {
|
|
...data,
|
|
...data,
|
|
- level: "2"
|
|
|
|
- }});
|
|
|
|
|
|
+ level: "1"
|
|
|
|
+ }
|
|
|
|
+ });
|
|
};
|
|
};
|
|
|
|
|
|
-export const httpCompanyList = (data: object = {}): ResponseType => {
|
|
|
|
- return http.request("post", `${yewuApi}companylist`, { data });
|
|
|
|
-};
|
|
|
|
// 详情
|
|
// 详情
|
|
export const httpDetail = (data: object): ResponseType => {
|
|
export const httpDetail = (data: object): ResponseType => {
|
|
return http.request("post", `${yewuApi}userinfo`, { data });
|
|
return http.request("post", `${yewuApi}userinfo`, { data });
|
|
};
|
|
};
|
|
// 更新
|
|
// 更新
|
|
export const httpUpdate = (data: object): ResponseType => {
|
|
export const httpUpdate = (data: object): ResponseType => {
|
|
- return http.request("post", `${yewuApi}usersave`, { data });
|
|
|
|
|
|
+ return http.request("post", `${yewuApi}useradd`, {
|
|
|
|
+ data: {
|
|
|
|
+ ...data,
|
|
|
|
+ level: "1"
|
|
|
|
+ }
|
|
|
|
+ });
|
|
};
|
|
};
|
|
// 状态
|
|
// 状态
|
|
export const httpStatus = (data: object): ResponseType => {
|
|
export const httpStatus = (data: object): ResponseType => {
|