直播间需要添加签到功能
This commit is contained in:
@@ -550,14 +550,16 @@
|
||||
clearAudioEffectSet()
|
||||
clearBeautyPanelSet()
|
||||
uni.$summaryData = summaryData.value
|
||||
console.warn(` 退出直播 imDataEndLive`);
|
||||
|
||||
endLive({
|
||||
success: () => {
|
||||
console.warn(` 退出直播 imDataEndLive`);
|
||||
uni.redirectTo({ url: '/pages/liveend/index' });
|
||||
},
|
||||
});
|
||||
console.warn(` 退出直播===直播间人数`, audienceCount.value);
|
||||
imDataEndLive(roomDataId.value, audienceCount.value).then(() => {
|
||||
uni.redirectTo({ url: '/pages/liveend/index' });
|
||||
})
|
||||
// endLive({
|
||||
// success: () => {
|
||||
// console.warn(` 退出直播 imDataEndLive`);
|
||||
// uni.redirectTo({ url: '/pages/liveend/index' });
|
||||
// },
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -569,60 +571,67 @@
|
||||
isShowLiveMoreActionsPanel.value = true;
|
||||
};
|
||||
|
||||
const roomDataId = ref('')
|
||||
const startLive = async () => {
|
||||
// try {
|
||||
// console.log('点击开始直播')
|
||||
// const data = {
|
||||
// coverUrl: coverURL.value,
|
||||
// roomName: liveTitle.value,
|
||||
// groupId: groupId.value
|
||||
// }
|
||||
// const roomData = await imAddLive(data)
|
||||
// const res = await imDataStartLive(roomData.data.roomId)
|
||||
// console.log(res)
|
||||
// const params = {
|
||||
// cursor: "", // 首次拉起传空(不能是null),然后根据回调数据的cursor确认是否拉完
|
||||
// count: 20, // 分页拉取的个数
|
||||
// };
|
||||
// fetchLiveList(params);
|
||||
// openLocalCamera({ isFront: isFrontCamera.value });
|
||||
// openLocalMicrophone();
|
||||
// setLocalVideoMuteImage();
|
||||
// isStartLive.value = true;
|
||||
// } catch (err) {
|
||||
// console.log(err, '====22')
|
||||
// }
|
||||
|
||||
createLive({
|
||||
liveInfo: {
|
||||
liveID: uni?.$liveID,
|
||||
liveName: liveTitle.value,
|
||||
coverURL: coverURL.value,
|
||||
isSeatEnabled: true,
|
||||
seatMode: 'APPLY',
|
||||
maxSeatCount: 0,
|
||||
isPublicVisible: liveMode.value === '公开',
|
||||
keepOwnerOnSeat: true,
|
||||
seatLayoutTemplateID: templateLayout.value,
|
||||
},
|
||||
success: () => {
|
||||
const params = {
|
||||
cursor: "", // 首次拉起传空(不能是null),然后根据回调数据的cursor确认是否拉完
|
||||
count: 20, // 分页拉取的个数
|
||||
};
|
||||
fetchLiveList(params);
|
||||
try {
|
||||
console.log('点击开始直播')
|
||||
const data = {
|
||||
coverUrl: coverURL.value,
|
||||
roomName: liveTitle.value,
|
||||
groupId: groupId.value
|
||||
}
|
||||
const roomData = await imAddLive(data)
|
||||
const roomId = roomData.data.roomId
|
||||
uni.$liveID = roomId
|
||||
liveID.value = roomId
|
||||
const res = await imDataStartLive(roomId)
|
||||
console.log(roomData, '========11111')
|
||||
console.log(res, '========22222')
|
||||
roomDataId.value = roomId
|
||||
const params = {
|
||||
cursor: "", // 首次拉起传空(不能是null),然后根据回调数据的cursor确认是否拉完
|
||||
count: 20, // 分页拉取的个数
|
||||
};
|
||||
joinLive({ liveID: roomId })
|
||||
fetchLiveList(params);
|
||||
openLocalCamera({ isFront: isFrontCamera.value });
|
||||
openLocalMicrophone();
|
||||
setLocalVideoMuteImage();
|
||||
isStartLive.value = true;
|
||||
} catch (err) {
|
||||
console.log(err, '====22')
|
||||
}
|
||||
|
||||
openLocalCamera({ isFront: isFrontCamera.value });
|
||||
openLocalMicrophone();
|
||||
setLocalVideoMuteImage();
|
||||
},
|
||||
fail: (errCode, errMsg) => {
|
||||
uni.showToast({
|
||||
title: '创建直播间失败',
|
||||
});
|
||||
},
|
||||
});
|
||||
isStartLive.value = true;
|
||||
// createLive({
|
||||
// liveInfo: {
|
||||
// liveID: uni?.$liveID,
|
||||
// liveName: liveTitle.value,
|
||||
// coverURL: coverURL.value,
|
||||
// isSeatEnabled: true,
|
||||
// seatMode: 'APPLY',
|
||||
// maxSeatCount: 0,
|
||||
// isPublicVisible: liveMode.value === '公开',
|
||||
// keepOwnerOnSeat: true,
|
||||
// seatLayoutTemplateID: templateLayout.value,
|
||||
// },
|
||||
// success: () => {
|
||||
// const params = {
|
||||
// cursor: "", // 首次拉起传空(不能是null),然后根据回调数据的cursor确认是否拉完
|
||||
// count: 20, // 分页拉取的个数
|
||||
// };
|
||||
// fetchLiveList(params);
|
||||
|
||||
// openLocalCamera({ isFront: isFrontCamera.value });
|
||||
// openLocalMicrophone();
|
||||
// setLocalVideoMuteImage();
|
||||
// },
|
||||
// fail: (errCode, errMsg) => {
|
||||
// uni.showToast({
|
||||
// title: '创建直播间失败',
|
||||
// });
|
||||
// },
|
||||
// });
|
||||
// isStartLive.value = true;
|
||||
};
|
||||
|
||||
const ShowAnchorViewClickPanel = (userInfo) => {
|
||||
|
||||
Reference in New Issue
Block a user