We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
![QQ截图20200530010021](https://user-images.githubusercontent.com/14891398/83285638-252be980-a211-11ea-831a-a25c5af8af69.png)
![image](https://user-images.githubusercontent.com/14891398/83285900-a6837c00-a211-11ea-94de-94dd029e5e43.png)
<script> document.title = 'BiliBili直播弹幕抽奖' // import connect from "./websocketClient/BiliLiveWs"; import RoomChoosing from "./components/RoomChoosing"; import Recording from "./components/Recording"; import Lottery from "./components/Lottery"; import Result from "./components/Result"; import {LiveTCP} from "bilibili-live-ws"; export default { name: 'App', components: { Result, Lottery, Recording, RoomChoosing }, data: () => ({ currentStep: 1, roomid: 0, recording: false, involvedUid: [], // 所有参与用户的uid involvedUname: {}, // 所有参与用户的用户名 luckyDogs: [] }), methods: { enterRoom: function(rid) { this.involvedUid = []; this.involvedUname = {}; this.recording = true; this.roomid = parseInt(rid); this.connectWs(); this.currentStep++; }, stopRecording: function() { this.recording = false; this.currentStep++; }, onDanmu: function(userInfo) { if (this.recording && !this.involvedUid.includes(userInfo[2][0])) { this.involvedUid.push(userInfo[2][0].toString()); this.involvedUname[userInfo[2][0]] = userInfo[2][1]; } }, connectWs: function() { console.log(this.roomid) let live = new LiveTCP(this.roomid); live.on('open'); live.on('live', () => { live.on('heartbeat') live.on('DANMU_MSG', (data) => { this.onDanmu(data.info) }) }) } } } </script>The text was updated successfully, but these errors were encountered: