|
@@ -10,11 +10,24 @@ interface ResponseType extends Promise<any> {
|
|
|
}
|
|
|
// 添加
|
|
|
export const httpAdd = (data: object): ResponseType => {
|
|
|
- return http.request("post", `${yewuApi}useradd`, { data });
|
|
|
+ return http.request("post", `${yewuApi}useradd`, {
|
|
|
+ data: {
|
|
|
+ ...data,
|
|
|
+ level: "2"
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
// 列表
|
|
|
export const httpList = (data: object): ResponseType => {
|
|
|
- return http.request("post", `${yewuApi}userlist`, { data });
|
|
|
+ return http.request("post", `${yewuApi}usersinglelist`, {
|
|
|
+ data: {
|
|
|
+ ...data,
|
|
|
+ level: "2"
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
+export const httpCompanyList = (data: object = {}): ResponseType => {
|
|
|
+ return http.request("post", `${yewuApi}companylist`, { data });
|
|
|
};
|
|
|
// 详情
|
|
|
export const httpDetail = (data: object): ResponseType => {
|
|
@@ -22,7 +35,12 @@ export const httpDetail = (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: "2"
|
|
|
+ }
|
|
|
+ });
|
|
|
};
|
|
|
// 状态
|
|
|
export const httpStatus = (data: object): ResponseType => {
|