From 982c97ab82f3beb1b4febcf014562eda34b9fc05 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 29 九月 2026 17:59:41 +0800
Subject: [PATCH] feat(ui): 江苏商贸品牌视觉与首页/登录页改版

---
 src/api/wxcp/notice.ts |   94 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 94 insertions(+), 0 deletions(-)

diff --git a/src/api/wxcp/notice.ts b/src/api/wxcp/notice.ts
new file mode 100644
index 0000000..4f3f0a9
--- /dev/null
+++ b/src/api/wxcp/notice.ts
@@ -0,0 +1,94 @@
+import type { PageParam, PageResult } from '@vben/request';
+
+import { requestClient } from '#/api/request';
+
+export namespace WxCpNoticeApi {
+  /** 閫氱煡鐘舵�侊細0鑽夌 1宸插彂甯� 2宸叉挙鍥� */
+  export const NOTICE_STATUS = {
+    DRAFT: 0,
+    PUBLISHED: 1,
+    REVOKED: 2,
+  } as const;
+
+  /** 閫氱煡 */
+  export interface Notice {
+    id?: number;
+    title?: string;
+    content?: string;
+    status?: number;
+    statusName?: string;
+    pushScope?: number;
+    pushScopeName?: string;
+    pushTarget?: string;
+    pushStatus?: number;
+    pushTime?: string;
+    remark?: string;
+    createTime?: string;
+  }
+
+  /** 閫氱煡鍒嗛〉鏌ヨ鍙傛暟 */
+  export interface NoticePageParams extends PageParam {
+    title?: string;
+    status?: number;
+    pushStatus?: number;
+  }
+}
+
+/** 鑾峰緱閫氱煡鍒嗛〉 */
+export function getNoticePage(params: WxCpNoticeApi.NoticePageParams) {
+  return requestClient.get<PageResult<WxCpNoticeApi.Notice>>(
+    '/wxcp/notice/page',
+    { params },
+  );
+}
+
+/** 鑾峰緱閫氱煡璇︽儏 */
+export function getNotice(id: number) {
+  return requestClient.get<WxCpNoticeApi.Notice>('/wxcp/notice/get', {
+    params: { id },
+  });
+}
+
+/** 鍒涘缓閫氱煡锛堝瓨涓鸿崏绋匡級 */
+export function createNotice(data: WxCpNoticeApi.Notice) {
+  return requestClient.post<number>('/wxcp/notice/create', data);
+}
+
+/** 淇敼閫氱煡 */
+export function updateNotice(data: WxCpNoticeApi.Notice) {
+  return requestClient.put<boolean>('/wxcp/notice/update', data);
+}
+
+/** 鍒犻櫎閫氱煡 */
+export function deleteNotice(id: number) {
+  return requestClient.delete<boolean>('/wxcp/notice/delete', {
+    params: { id },
+  });
+}
+
+/** 鍙戝竷閫氱煡 */
+export function publishNotice(id: number) {
+  return requestClient.put<boolean>('/wxcp/notice/publish', null, {
+    params: { id },
+  });
+}
+
+/** 鎾ゅ洖閫氱煡 */
+export function revokeNotice(id: number) {
+  return requestClient.put<boolean>('/wxcp/notice/revoke', null, {
+    params: { id },
+  });
+}
+
+/** 鎺ㄩ�侀�氱煡缁欎紒涓氬井淇℃垚鍛� */
+export function pushNotice(data: {
+  id: number;
+  pushScope?: number;
+  pushTarget?: string;
+}) {
+  return requestClient.post<{
+    success: boolean;
+    errCode?: null | number;
+    message?: string;
+  }>('/wxcp/notice/push', data);
+}

--
Gitblit v1.9.3