From 2b695bfabdceccb0ee19c12c8e655bd7f47a6e2f Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 27 十月 2026 18:06:44 +0800
Subject: [PATCH] feat(wxcp): 通知前端支持图片/视频/Markdown/多图文与成员预览
---
src/api/wxcp/notice.ts | 72 ++++++++++++++++++++++++++++++++++++
1 files changed, 72 insertions(+), 0 deletions(-)
diff --git a/src/api/wxcp/notice.ts b/src/api/wxcp/notice.ts
index 4f3f0a9..de46b1c 100644
--- a/src/api/wxcp/notice.ts
+++ b/src/api/wxcp/notice.ts
@@ -10,11 +10,72 @@
REVOKED: 2,
} as const;
+ /** 閫氱煡妯℃澘绫诲瀷 */
+ export const NOTICE_TYPE = {
+ TEXT: 1,
+ CARD: 2,
+ FILE: 3,
+ NEWS: 4,
+ IMAGE: 5,
+ VIDEO: 6,
+ MARKDOWN: 7,
+ MULTI_NEWS: 8,
+ } as const;
+
+ /** 澶氬浘鏂囨潯鐩� */
+ export interface NoticeArticle {
+ id?: number;
+ title?: string;
+ description?: string;
+ linkUrl?: string;
+ coverBlobId?: number;
+ coverAttachment?: NoticeAttachment;
+ sortNo?: number;
+ }
+
+ /** 閫氱煡闄勪欢锛堝浘鐗�/鏂囦欢/瑙嗛閫氱敤锛� */
+ export interface NoticeAttachment {
+ id?: number;
+ name?: string;
+ originalFilename?: string;
+ contentType?: string;
+ byteSize?: number;
+ url?: string;
+ previewURL?: string;
+ downloadURL?: string;
+ }
+
/** 閫氱煡 */
export interface Notice {
id?: number;
title?: string;
content?: string;
+ noticeType?: number;
+ noticeTypeName?: string;
+ summary?: string;
+ linkUrl?: string;
+ linkBtnText?: string;
+ coverUrl?: string;
+ /** 鏃х増鍗曢檮浠跺瓧娈碉紝鍏煎鍘嗗彶鏁版嵁 */
+ fileBlobId?: number;
+ /** 鏃х増鍗曢檮浠舵枃浠跺悕 */
+ fileName?: string;
+ /** 鍥剧墖閫氱煡鐨勫浘鐗� blobId 鍒楄〃 */
+ imageBlobIds?: number[];
+ /** 鍥剧墖閫氱煡鐨勫浘鐗囬檮浠跺垪琛� */
+ imageAttachmentList?: NoticeAttachment[];
+ /** 闄勪欢閫氱煡鐨勯檮浠� blobId 鍒楄〃 */
+ fileBlobIds?: number[];
+ /** 闄勪欢閫氱煡鐨勯檮浠跺垪琛� */
+ fileAttachmentList?: NoticeAttachment[];
+ /** 瑙嗛閫氱煡鐨勮棰� blobId 鍒楄〃 */
+ videoBlobIds?: number[];
+ /** 瑙嗛閫氱煡鐨勮棰戝垪琛� */
+ videoAttachmentList?: NoticeAttachment[];
+ /** 澶氬浘鏂囨秷鎭殑鍥炬枃鍒楄〃 */
+ articleList?: NoticeArticle[];
+ /** 鎴愬憳棰勮椤靛湴鍧� */
+ previewUrl?: string;
status?: number;
statusName?: string;
pushScope?: number;
@@ -85,6 +146,17 @@
id: number;
pushScope?: number;
pushTarget?: string;
+ noticeType?: number;
+ summary?: string;
+ linkUrl?: string;
+ linkBtnText?: string;
+ coverUrl?: string;
+ fileBlobId?: number;
+ fileName?: string;
+ imageBlobIds?: number[];
+ fileBlobIds?: number[];
+ videoBlobIds?: number[];
+ articleList?: WxCpNoticeApi.NoticeArticle[];
}) {
return requestClient.post<{
success: boolean;
--
Gitblit v1.9.3