Commit c4b0c4013918cbbfea7c2d68441dd54924562769

Authored by zouyang0921
1 parent 71cbccbb

[年会抽奖]优化细节

Showing 1 changed file with 1 additions and 1 deletions
server.js
... ... @@ -53,7 +53,7 @@ io.on('connection', function(socket) {
53 53 io.emit('barrage', msg);
54 54 clearInterval(timer);
55 55 timer = setInterval(function() {
56   - var msg = defaultMsgs[Math.floor(Math.random() * (19 - 0 + 1))];
  56 + var msg = defaultMsgs[Math.floor(Math.random() * (defaultMsgs.length - 1 - 0 + 1))];
57 57 io.emit('barrage', msg);
58 58 }, 25000);
59 59 });
... ...