11 changed files with 106 additions and 57 deletions
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
/** |
||||
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||
* author entfrm开发团队-王翔 |
||||
*/ |
||||
import type { PushFileParams, PushFileResult } from '/@/api/platform/common/entity/pushFile'; |
||||
import { defHttp } from '/@/utils/http/axios'; |
||||
import { UploadFileParams } from '/#/axios'; |
||||
import { UploadResult } from '/@/api/platform/core/entity/upload'; |
||||
|
||||
enum Api { |
||||
list = '/common_proxy/common/pushFile/list', |
||||
upload = '/common_proxy/common/pushFile/upload', |
||||
del = '/common_proxy/common/pushFile/remove' |
||||
} |
||||
|
||||
export const listPushFile = (params?: Partial<PushFileParams>) => defHttp.get<PushFileResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||
|
||||
export const commonUpload = (params: UploadFileParams, onUploadProgress: (progressEvent: ProgressEvent) => void) => |
||||
defHttp.uploadFile<UploadResult>({ url: Api.upload, onUploadProgress }, params); |
||||
|
||||
export const delPushFile = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
/** |
||||
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||
* author entfrm开发团队-王翔 |
||||
*/ |
||||
import type { PushMessageParams, PushMessageResult, PushMessage } from '/@/api/platform/common/entity/pushMessage'; |
||||
import { defHttp } from '/@/utils/http/axios'; |
||||
|
||||
enum Api { |
||||
list = '/common_proxy/common/pushMessage/list', |
||||
add = '/common_proxy/common/pushMessage/save', |
||||
get = '/common_proxy/common/pushMessage', |
||||
edit = '/common_proxy/common/pushMessage/update', |
||||
del = '/common_proxy/common/pushMessage/remove' |
||||
} |
||||
|
||||
export const listPushMessage = (params?: Partial<PushMessageParams>) => defHttp.get<PushMessageResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||
|
||||
export const addPushMessage = (params: Partial<PushMessage>) => defHttp.post({ url: Api.add, data: params }); |
||||
|
||||
export const editPushMessage = (params: Partial<PushMessage>) => defHttp.put({ url: Api.edit, data: params }); |
||||
|
||||
export const getPushMessage = (id: string) => defHttp.get<PushMessage>({ url: `${Api.get}/${id}` }); |
||||
|
||||
export const delPushMessage = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -1,25 +0,0 @@
@@ -1,25 +0,0 @@
|
||||
/** |
||||
* 提供api模板规范代码参考,请尽量保证编写代码风格跟模板规范代码一致 |
||||
* Copyright © 2020-2022 <a href="http://www.entfrm.com/">entfrm</a> All rights reserved. |
||||
* author entfrm开发团队-王翔 |
||||
*/ |
||||
import type { PushThirdPartyManage, PushThirdPartyManageParams, PushThirdPartyManageResult } from '/@/api/platform/common/entity/pushThirdPartyManage'; |
||||
import { defHttp } from '/@/utils/http/axios'; |
||||
|
||||
enum Api { |
||||
list = '/common_proxy/common/pushThirdPartyManage/list', |
||||
add = '/common_proxy/common/pushThirdPartyManage/save', |
||||
get = '/common_proxy/common/pushThirdPartyManage', |
||||
edit = '/common_proxy/common/pushThirdPartyManage/update', |
||||
del = '/common_proxy/common/pushThirdPartyManage/remove', |
||||
} |
||||
|
||||
export const listPushThirdPartyManage = (params?: Partial<PushThirdPartyManageParams>) => defHttp.get<PushThirdPartyManageResult>({ url: Api.list, params }, { isReturnResultResponse: true }); |
||||
|
||||
export const addPushThirdPartyManage = (params: Partial<PushThirdPartyManage>) => defHttp.post({ url: Api.add, data: params }); |
||||
|
||||
export const editPushThirdPartyManage = (params: Partial<PushThirdPartyManage>) => defHttp.put({ url: Api.edit, data: params }); |
||||
|
||||
export const getPushThirdPartyManage = (id: string) => defHttp.get<PushThirdPartyManage>({ url: `${Api.get}/${id}` }); |
||||
|
||||
export const delPushThirdPartyManage = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` }); |
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
import type { R } from '/#/axios'; |
||||
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||
|
||||
export type PushFileParams = Page & PushFile; |
||||
|
||||
export interface PushFile extends CommonEntity { |
||||
id: string; |
||||
fileUrl: string; |
||||
fileName: string; |
||||
bucketName: string; |
||||
original: string; |
||||
type: string; |
||||
fileSize: number; |
||||
[key: string]: any; |
||||
} |
||||
|
||||
export type PushFileResult = R<PushFile[]>; |
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
import type { R } from '/#/axios'; |
||||
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||
|
||||
export type PushMessageParams = Page & PushMessage; |
||||
|
||||
export interface PushMessage extends CommonEntity { |
||||
id: string; |
||||
fromUserId: string; |
||||
type: string; |
||||
customTypeId: string; |
||||
status: string; |
||||
aliasType: string; |
||||
alias: string; |
||||
displayType: string; |
||||
title: string; |
||||
text: string; |
||||
sound: string; |
||||
playVibrate: string; |
||||
playLights: string; |
||||
playSound: string; |
||||
customPlayFileName: string; |
||||
custom: string; |
||||
[key: string]: any; |
||||
} |
||||
|
||||
export type PushMessageResult = R<PushMessage[]>; |
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
import type { R } from '/#/axios'; |
||||
import type { CommonEntity, Page } from '/@/api/common/data/entity'; |
||||
|
||||
export type PushThirdPartyManageParams = Page & PushThirdPartyManage; |
||||
|
||||
export interface PushThirdPartyManage extends CommonEntity { |
||||
id: string; |
||||
thirdPartyId: string; |
||||
enterpName: string; |
||||
pushTypeId: string; |
||||
isVibration: string; |
||||
isSound: string; |
||||
customSound: string; |
||||
} |
||||
|
||||
export type PushThirdPartyManageResult = R<PushThirdPartyManage[]>; |
Loading…
Reference in new issue