修改bug
This commit is contained in:
		
							
								
								
									
										72
									
								
								src/api/message/config/index.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								src/api/message/config/index.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,72 @@ | ||||
| import request from '@/utils/request'; | ||||
| import { AxiosPromise } from 'axios'; | ||||
| import { ConfigVO, ConfigForm, ConfigQuery } from '@/api/message/config/types'; | ||||
|  | ||||
| /** | ||||
|  * 查询消息配置列表 | ||||
|  * @param query | ||||
|  * @returns {*} | ||||
|  */ | ||||
|  | ||||
| export const listConfig = (query?: ConfigQuery): AxiosPromise<ConfigVO[]> => { | ||||
|   return request({ | ||||
|     url: '/message/config/list', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }); | ||||
| }; | ||||
|  | ||||
| /** | ||||
|  * 查询消息配置详细 | ||||
|  * @param id | ||||
|  */ | ||||
| export const getConfig = (id: string | number): AxiosPromise<ConfigVO> => { | ||||
|   return request({ | ||||
|     url: '/message/config/' + id, | ||||
|     method: 'get' | ||||
|   }); | ||||
| }; | ||||
|  | ||||
| /** | ||||
|  * 新增消息配置 | ||||
|  * @param data | ||||
|  */ | ||||
| export const addConfig = (data: ConfigForm) => { | ||||
|   return request({ | ||||
|     url: '/message/config', | ||||
|     method: 'post', | ||||
|     data: data | ||||
|   }); | ||||
| }; | ||||
|  | ||||
| /** | ||||
|  * 修改消息配置 | ||||
|  * @param data | ||||
|  */ | ||||
| export const updateConfig = (data: ConfigForm) => { | ||||
|   return request({ | ||||
|     url: '/message/config', | ||||
|     method: 'put', | ||||
|     data: data | ||||
|   }); | ||||
| }; | ||||
|  | ||||
| /** | ||||
|  * 删除消息配置 | ||||
|  * @param id | ||||
|  */ | ||||
| export const delConfig = (id: string | number | Array<string | number>) => { | ||||
|   return request({ | ||||
|     url: '/message/config/' + id, | ||||
|     method: 'delete' | ||||
|   }); | ||||
| }; | ||||
|  | ||||
| /** 获取用户列表 */ | ||||
| export const listUser = (query?: any) => { | ||||
|   return request({ | ||||
|     url: '/system/user/list', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }); | ||||
| }; | ||||
							
								
								
									
										116
									
								
								src/api/message/config/types.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										116
									
								
								src/api/message/config/types.ts
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,116 @@ | ||||
| export interface ConfigVO { | ||||
|   /** | ||||
|    * 主键ID | ||||
|    */ | ||||
|   id: string | number; | ||||
|  | ||||
|   /** | ||||
|    * 项目ID | ||||
|    */ | ||||
|   projectId: string | number; | ||||
|  | ||||
|   /** | ||||
|    * 消息名称 | ||||
|    */ | ||||
|   msgName: number; | ||||
|  | ||||
|   /** | ||||
|    * 消息模板 | ||||
|    */ | ||||
|   msgContent: string; | ||||
|  | ||||
|   /** | ||||
|    * 消息标识 | ||||
|    */ | ||||
|   msgKey: string; | ||||
|  | ||||
|   /** | ||||
|    * 跳转路由 | ||||
|    */ | ||||
|   route: string; | ||||
|  | ||||
|   /** | ||||
|    * 通知人 | ||||
|    */ | ||||
|   userId: string | number; | ||||
|  | ||||
| } | ||||
|  | ||||
| export interface ConfigForm extends BaseEntity { | ||||
|   /** | ||||
|    * 主键ID | ||||
|    */ | ||||
|   id?: string | number; | ||||
|  | ||||
|   /** | ||||
|    * 项目ID | ||||
|    */ | ||||
|   projectId?: string | number; | ||||
|  | ||||
|   /** | ||||
|    * 消息名称 | ||||
|    */ | ||||
|   msgName?: number; | ||||
|  | ||||
|   /** | ||||
|    * 消息模板 | ||||
|    */ | ||||
|   msgContent?: string; | ||||
|  | ||||
|   /** | ||||
|    * 消息标识 | ||||
|    */ | ||||
|   msgKey?: string; | ||||
|  | ||||
|   /** | ||||
|    * 跳转路由 | ||||
|    */ | ||||
|   route?: string; | ||||
|  | ||||
|   /** | ||||
|    * 通知人 | ||||
|    */ | ||||
|   userId?: string | number; | ||||
|  | ||||
| } | ||||
|  | ||||
| export interface ConfigQuery extends PageQuery { | ||||
|  | ||||
|   /** | ||||
|    * 项目ID | ||||
|    */ | ||||
|   projectId?: string | number; | ||||
|  | ||||
|   /** | ||||
|    * 消息名称 | ||||
|    */ | ||||
|   msgName?: number; | ||||
|  | ||||
|   /** | ||||
|    * 消息模板 | ||||
|    */ | ||||
|   msgContent?: string; | ||||
|  | ||||
|   /** | ||||
|    * 消息标识 | ||||
|    */ | ||||
|   msgKey?: string; | ||||
|  | ||||
|   /** | ||||
|    * 跳转路由 | ||||
|    */ | ||||
|   route?: string; | ||||
|  | ||||
|   /** | ||||
|    * 通知人 | ||||
|    */ | ||||
|   userId?: string | number; | ||||
|  | ||||
|     /** | ||||
|      * 日期范围参数 | ||||
|      */ | ||||
|     params?: any; | ||||
| } | ||||
|  | ||||
|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user