From 36793c5c5a0f222ba9eb5324deee77cfb59eaae1 Mon Sep 17 00:00:00 2001 From: xingyy <64720302+Concur-max@users.noreply.github.com> Date: Sat, 8 Feb 2025 15:21:00 +0800 Subject: [PATCH] =?UTF-8?q?feat(live):=20=E5=AE=9E=E7=8E=B0=E7=9B=B4?= =?UTF-8?q?=E6=92=AD=E9=97=B4=E7=AB=9E=E6=8B=8D=E5=8A=9F=E8=83=BD=E5=B9=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9B=B8=E5=85=B3=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 artworkBuy API 实现艺术品购买功能 - 重构 WebSocket连接逻辑,优化消息处理- 更新直播间页面,支持实时竞拍和消息提示 -调整艺术详情和用户中心页面样式 - 优化消息组件样式和展示逻辑 --- app/api/goods/index.js | 8 ++ app/components/x-message/message/index.vue | 4 +- app/components/x-message/useMessage.js | 1 + app/pages/artDetail/index.vue | 2 +- app/pages/liveRoom/index.client.vue | 18 +++- app/pages/profile/index.vue | 4 +- app/plugins/websocket.ts | 2 +- app/stores/live/index.js | 101 ++++++++++++++++++--- app/utils/websocket.ts | 65 +++++++++++++ 9 files changed, 180 insertions(+), 25 deletions(-) create mode 100644 app/utils/websocket.ts diff --git a/app/api/goods/index.js b/app/api/goods/index.js index 9760a4d..0c12b80 100644 --- a/app/api/goods/index.js +++ b/app/api/goods/index.js @@ -37,4 +37,12 @@ export async function userArtwork(data) { method: 'POST', data }) +} +export async function artworkBuy(data) { + + return await request( { + url:'/api/v1/m/artwork/buy', + method: 'POST', + data + }) } \ No newline at end of file diff --git a/app/components/x-message/message/index.vue b/app/components/x-message/message/index.vue index c28f333..ed8086a 100644 --- a/app/components/x-message/message/index.vue +++ b/app/components/x-message/message/index.vue @@ -86,7 +86,7 @@ const typeConfig = {