first commit

This commit is contained in:
2024-04-08 21:34:02 +08:00
commit a41a7f32ab
223 changed files with 44629 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
import http from '@/utils/http'
import type * as Common from './type'
const BASE_URL = '/captcha'
/** @desc 获取图片验证码 */
export function getImageCaptcha() {
return http.get<Common.ImageCaptchaResp>(`${BASE_URL}/img`)
}

20
src/apis/common/common.ts Normal file
View File

@@ -0,0 +1,20 @@
import http from '@/utils/http'
import type { LabelValueState } from '@/types/global'
import type { TreeNodeData } from '@arco-design/web-vue'
const BASE_URL = '/common'
/** @desc 查询部门树 */
export function listDeptTree(query: { description: string }) {
return http.get<TreeNodeData[]>(`${BASE_URL}/tree/dept`, query)
}
/** @desc 查询角色列表 */
export function listRoleDict(query?: { name: string; status: number }) {
return http.get<LabelValueState[]>(`${BASE_URL}/dict/role`, query)
}
/** @desc 查询字典列表 */
export function listCommonDict(code: string) {
return http.get<LabelValueState[]>(`${BASE_URL}/dict/${code}`)
}

2
src/apis/common/index.ts Normal file
View File

@@ -0,0 +1,2 @@
export * from './common'
export * from './captcha'

5
src/apis/common/type.ts Normal file
View File

@@ -0,0 +1,5 @@
/** 图形验证码类型 */
export interface ImageCaptchaResp {
uuid: string
img: string
}