feat: 添加结束活动和直播记录详情功能,优化直播页面跳转

This commit is contained in:
2026-03-07 15:19:23 +07:00
parent 67495ea864
commit 047ea3a77a
7 changed files with 68 additions and 22 deletions

View File

@@ -290,6 +290,7 @@
margin-top: 20rpx;
font-size: 28rpx;
text-align: right;
color: white;
}
}

View File

@@ -274,7 +274,8 @@
imAddLive,
imDataStartLive,
getLiveActivityDetail,
imDataEndLive
imDataEndLive,
endLiveActivity
} from '@/api/tui-kit'
import BeforeLivePanel from '../../components/BeforeLivePanel.nvue'
import LiveStatusInfoCard from '@/uni_modules/tuikit-atomic-x/components/LiveStatusInfoCard.nvue'
@@ -723,13 +724,25 @@
// 添加活动
const userAddActivity = () => {
getLiveActivityDetail(roomDataId.value).then(res => {
console.log("活动数据=======",res.data)
if (res?.data && res.data.status === 1) {
// status: 0-未开始 1-进行中 2-已结束 3-已取消
uni.showModal({
title: `提示`,
content: '您有一个活动正在进行中,请勿重复添加活动',
showCancel: false,
content: '您有一个活动正在进行中,是否提前结束?',
confirmText: '确定'
}).then(()=>{
endLiveActivity(res.data.activityId).then(res=>{
uni.showToast({
title: '结束成功',
icon: 'none'
})
}).catch(()=>{
uni.showToast({
title: '结束失败',
icon: 'none'
})
})
})
} else {
isShowActivity.value = true