From 2e6b2d6c629531e562048ca1eef0362478cb9fe7 Mon Sep 17 00:00:00 2001 From: LinCyJang Date: Mon, 23 Jun 2025 00:03:04 +0800 Subject: [PATCH] =?UTF-8?q?Feat=EF=BC=9A=E5=BA=97=E9=93=BA=E8=B5=84?= =?UTF-8?q?=E8=AE=AF=E8=AF=84=E8=AE=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/rooms.js | 28 +++++ assets/css/v12-style.less | 4 +- pages.json | 7 ++ pkg_common/views/message.vue | 226 ++++++++++++++++++++++++++++++++++ pkg_common/views/roomLogs.vue | 61 +++++++-- 5 files changed, 316 insertions(+), 10 deletions(-) create mode 100644 api/rooms.js create mode 100644 pkg_common/views/message.vue diff --git a/api/rooms.js b/api/rooms.js new file mode 100644 index 0000000..3d32078 --- /dev/null +++ b/api/rooms.js @@ -0,0 +1,28 @@ +import request from "@/utils/request"; +/** + * 获取未读消息数量 + */ +export function getUnreadMessageCount() { + return request.get("/user/reply/messages/unreadCount", {}, {login: true}) +} + +/** + * 标记消息为已读 + */ +export function markMessagesAsRead() { + return request.post("/user/reply/messages/readAll", {}, {login: true}) +} + +/** + * 获取消息列表 + */ +export function getMessageList(params) { + return request.get("/user/reply/messages", params, {login: true}) +} + +/** + * 回复消息 + */ +export function replyMessage(data) { + return request.post("/user/reply/add", data, {login: true}) +} \ No newline at end of file diff --git a/assets/css/v12-style.less b/assets/css/v12-style.less index a27ff1f..6d5da64 100644 --- a/assets/css/v12-style.less +++ b/assets/css/v12-style.less @@ -3,8 +3,8 @@ @dark-color: #333333; @white-color: #fff; -@colors: #C52733, #333333, #fff, #666, #F0F0F0, #999999, #E92727, #FFC543, #69C573; -@classnames: primary, dark, white, secondary-dark, grey, dark1, red, yellow, success; +@colors: #C52733, #333333, #fff, #666, #F0F0F0, #999999, #E92727, #FFC543, #69C573, #A5A5A5; +@classnames: primary, dark, white, secondary-dark, grey, dark1, red, yellow, success, dark2; /*=====================================*/ each(@colors, { diff --git a/pages.json b/pages.json index bcfd1e5..d1c5fe5 100644 --- a/pages.json +++ b/pages.json @@ -509,6 +509,13 @@ "navigationBarTitleText": "历史会话" } }, + { + "path": "views/message", + "style": { + "navigationBarTitleText": "互动消息", + "navigationBarBackgroundColor": "#FFFFFF" + } + }, { "path": "views/xiaoZhi", "style": { diff --git a/pkg_common/views/message.vue b/pkg_common/views/message.vue new file mode 100644 index 0000000..323e759 --- /dev/null +++ b/pkg_common/views/message.vue @@ -0,0 +1,226 @@ + + + + + \ No newline at end of file diff --git a/pkg_common/views/roomLogs.vue b/pkg_common/views/roomLogs.vue index 3fafe72..b91a3af 100644 --- a/pkg_common/views/roomLogs.vue +++ b/pkg_common/views/roomLogs.vue @@ -1,8 +1,18 @@