From db1b797b686093c10a55e7437875571d6dbaa6fe Mon Sep 17 00:00:00 2001
From: cbb <1055026847@qq.com>
Date: Wed, 14 Jan 2026 17:57:17 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9B=B4=E6=92=AD=E9=97=B4?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=EF=BC=8C=E7=9B=B4=E6=92=AD=E9=97=B4=E5=8F=B3?=
=?UTF-8?q?=E4=B8=8A=E8=A7=92=E4=BA=BA=E6=95=B0=E9=9C=80=E8=A6=81=E5=AE=8C?=
=?UTF-8?q?=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.env | 4 +-
api/tui-kit.js | 36 +-
constants/live-keys.js | 7 +
pages/anchor/components/activity.nvue | 29 +-
pages/anchor/index.nvue | 139 +++---
pages/audience/components/activity-info.vue | 414 ++++++++++++++++++
pages/audience/index.nvue | 50 ++-
pages/my-index/set-up/index.vue | 15 +-
.../components/BarrageList.nvue | 9 +-
utils/request.js | 16 +-
10 files changed, 632 insertions(+), 87 deletions(-)
create mode 100644 constants/live-keys.js
create mode 100644 pages/audience/components/activity-info.vue
diff --git a/.env b/.env
index 13d2589..83a9ced 100644
--- a/.env
+++ b/.env
@@ -1,5 +1,5 @@
# API
-VITE_SYSTEM_URL = "http://jb96776a.natappfree.cc"
+VITE_SYSTEM_URL = "http://w6972efb.natappfree.cc"
#文档地址
-VITE_DOC_URL = "http://k7986286.natappfree.cc"
\ No newline at end of file
+VITE_DOC_URL = "http://f69dbab6.natappfree.cc"
\ No newline at end of file
diff --git a/api/tui-kit.js b/api/tui-kit.js
index a6bc70c..2bdd937 100644
--- a/api/tui-kit.js
+++ b/api/tui-kit.js
@@ -91,7 +91,7 @@ export const imAddLive = (data, method = 'post') => {
}
/** 开始直播 */
-export const imDataStartLive = (roomId) => {
+export const imDataStartLive = roomId => {
return http({
url: `/api/service/imLiveRoom/start/${roomId}`,
method: 'post'
@@ -105,3 +105,37 @@ export const imDataEndLive = (roomId, viewers) => {
method: 'delete'
})
}
+
+/** 新增直播间活动 */
+export const addLiveActivity = (data, method = 'post') => {
+ return http({
+ url: '/api/service/imLiveActivity',
+ method,
+ data
+ })
+}
+
+/** 获取直播间活动详情 */
+export const getLiveActivityDetail = id => {
+ return http({
+ url: `/api/service/imLiveActivity/${id}`,
+ method: 'get'
+ })
+}
+
+/** 确认参加活动 */
+export const confirmLiveActivity = data => {
+ return http({
+ url: `/api/service/imLiveActivityRecord`,
+ method: 'post',
+ data
+ })
+}
+
+/** 查询活动参与状态 */
+export const getLiveActivityRecord = id => {
+ return http({
+ url: `/api/service/imLiveActivityRecord/partic/ipated/${id}`,
+ method: 'get'
+ })
+}
diff --git a/constants/live-keys.js b/constants/live-keys.js
new file mode 100644
index 0000000..14d9da7
--- /dev/null
+++ b/constants/live-keys.js
@@ -0,0 +1,7 @@
+/** 直播间 businessID 唯一值 */
+export const LIVE_BUSINESS = {
+ // 管理员
+ ADMIN: 'admin',
+ // 签到
+ SIGN: 'sign',
+}
diff --git a/pages/anchor/components/activity.nvue b/pages/anchor/components/activity.nvue
index e6c865c..fdbeb94 100644
--- a/pages/anchor/components/activity.nvue
+++ b/pages/anchor/components/activity.nvue
@@ -1,11 +1,12 @@
diff --git a/pages/anchor/index.nvue b/pages/anchor/index.nvue
index 4b90a67..2c4f7e3 100644
--- a/pages/anchor/index.nvue
+++ b/pages/anchor/index.nvue
@@ -75,7 +75,7 @@
主播pk
-->
-
+
活动
@@ -91,7 +91,7 @@
-
+
@@ -130,7 +130,7 @@
+
+
+
+
+
+
+
+
+ 结束时间
+
+ {{ countdown.value }} 秒
+
+
+
+
+ 奖励值(积分)
+
+
+ {{ formData.rewardValue }} 积分
+
+
+
+
+
+
+
+
diff --git a/pages/audience/index.nvue b/pages/audience/index.nvue
index 85652aa..197bf6d 100644
--- a/pages/audience/index.nvue
+++ b/pages/audience/index.nvue
@@ -16,7 +16,7 @@
- {{ currentLive?.liveOwner?.userName || currentLive?.liveOwner?.userID}}
+
@@ -94,7 +98,7 @@
@@ -30,6 +35,7 @@
v-for="(item, index) in basicSetting"
:key="index"
class="item"
+ @click="onItem(item)"
>
{{ item.name }}
@@ -44,6 +50,7 @@
v-for="(item, index) in systemSetting"
:key="index"
class="item"
+ @click="onItem(item)"
>
{{ item.name }}
diff --git a/uni_modules/tuikit-atomic-x/components/BarrageList.nvue b/uni_modules/tuikit-atomic-x/components/BarrageList.nvue
index c072857..09ba33f 100644
--- a/uni_modules/tuikit-atomic-x/components/BarrageList.nvue
+++ b/uni_modules/tuikit-atomic-x/components/BarrageList.nvue
@@ -21,9 +21,13 @@
主播
- 游客:
+ {{ message?.sender?.userName || message?.sender?.userID }}:
- {{ message?.textContent || '' }}
+ {{ JSON.parse(message?.data).title }}
+ 1
+ {{ message?.textContent || '' }}
@@ -53,6 +57,7 @@