12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- import { http } from "/@/utils/http";
- import { loadEnv } from "@build/index";
- const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL } = loadEnv();
- const userAPi = VITE_PROXY_DOMAIN_REAL;
- const yewuApi = VITE_PROXY_USER_REAL + "/admin/";
- interface ResponseType extends Promise<any> {
- data?: object;
- code?: number;
- msg?: string;
- }
- // 添加
- export const httpAdd = (data: object): ResponseType => {
- return http.request("post", `${yewuApi}supplierAccountAdd`, { data });
- };
- // 列表
- export const httpList = (data: object = {}): ResponseType => {
- return http.request("post", `${yewuApi}usersinglelist`, { data : {
- ...data,
- level: "3"
- }});
- };
- // 详情
- export const httpDetail = (data: object): ResponseType => {
- return http.request("post", `${yewuApi}userinfo`, { data });
- };
- // 更新
- export const httpUpdate = (data: object): ResponseType => {
- return http.request("post", `${yewuApi}usersave`, { data });
- };
- // 状态
- export const httpStatus = (data: object): ResponseType => {
- return http.request("post", `${yewuApi}setstatus`, { data });
- };
- // 删除
- export const httpDelete = (data: object): ResponseType => {
- return http.request("post", `${yewuApi}menustatus`, { data });
- };
- // 重置密码
- export const httpSetPwd = (data: object): ResponseType => {
- return http.request("post", `${yewuApi}setpwd`, { data });
- };
- // 全部角色
- export const httpRoleAll = (data: object): ResponseType => {
- return http.request("post", `${yewuApi}roleall`, { data });
- };
- // 设置角色
- export const httpSetRole = (data: object): ResponseType => {
- return http.request("post", `${yewuApi}setrole`, { data });
- };
|