31 lines
802 B
TypeScript
31 lines
802 B
TypeScript
import { http } from "@/utils/http";
|
|
import type { Res } from "@/utils/http/types";
|
|
|
|
/**
|
|
* @description 获取枚举下拉
|
|
* @param {string} type 枚举类型 type=StatusEnum
|
|
* @return {object}
|
|
*/
|
|
export function getenum(type) {
|
|
return http.request<Res<any>>("get", `public/enum/${type}`);
|
|
}
|
|
/**
|
|
* @description 获取枚举对象
|
|
* @param {string} type 枚举类型 type=StatusEnum
|
|
* @return {object}
|
|
*/
|
|
export function getenumDic(type) {
|
|
return http.request<Res<any>>("get", `public/enum/${type}/Dic`);
|
|
}
|
|
|
|
export function getProvince() {
|
|
return http.request<Res<any>>("get", `address/province`);
|
|
}
|
|
export function getcity(c) {
|
|
return http.request<Res<any>>("get", `address/${c}/city`);
|
|
}
|
|
export function getregion(r) {
|
|
return http.request<Res<any>>("get", `address/${r}/region`);
|
|
}
|
|
|