政策启用禁用功能开发
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
This commit is contained in:
@@ -8,6 +8,14 @@ export async function getPolicyInfoList(params?: API.PolicyInfo.Params) {
|
||||
});
|
||||
}
|
||||
|
||||
// 查询政策列表(门户端公开接口,仅返回启用状态的政策)
|
||||
export async function getPortalPolicyList(params?: API.PolicyInfo.Params) {
|
||||
return request<API.PolicyInfo.PolicyInfoResult>('/api/app/policyInfo/portalList', {
|
||||
method: 'GET',
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取政策详情 GET /cms/policyInfo/detail?id= */
|
||||
export async function getPolicyInfoDetail(id: number | string) {
|
||||
return request<API.PolicyInfo.PolicyInfoDetailResult>('/api/cms/policyInfo/detail', {
|
||||
@@ -16,6 +24,13 @@ export async function getPolicyInfoDetail(id: number | string) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取政策详情(门户端公开接口)GET /app/policyInfo/detail/:id */
|
||||
export async function getPortalPolicyDetail(id: number | string) {
|
||||
return request<API.PolicyInfo.PolicyInfoDetailResult>(`/api/app/policyInfo/detail/${id}`, {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
// 新增政策
|
||||
export async function addPolicyInfo(data: Partial<API.PolicyInfo.PolicyInfoItem>) {
|
||||
return request<API.Result>('/api/cms/policyInfo', {
|
||||
@@ -39,6 +54,14 @@ export async function deletePolicyInfo(ids: string) {
|
||||
});
|
||||
}
|
||||
|
||||
// 更新政策状态(启用/禁用)
|
||||
export async function changePolicyStatus(id: number | string, status: string) {
|
||||
return request<API.Result>(`/api/cms/policyInfo/changeStatus`, {
|
||||
method: 'PUT',
|
||||
params: { id, status },
|
||||
});
|
||||
}
|
||||
|
||||
// 上传政策文件
|
||||
export async function uploadPolicyFile(file: File) {
|
||||
const formData = new FormData();
|
||||
|
||||
Reference in New Issue
Block a user