From ddcecad15d44dbb61736e494000cf16f13e13949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B7=A6=E6=96=87=E7=A5=BA?= Date: Tue, 6 Feb 2018 14:49:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/static/js/index.js | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/src/static/js/index.js b/src/static/js/index.js index c988d95..50e78b8 100644 --- a/src/static/js/index.js +++ b/src/static/js/index.js @@ -62,7 +62,7 @@ class Tag{ let html = [ ''); @@ -91,7 +91,6 @@ class Tag{ stop(){ TagCanvas.SetSpeed('myCanvas', Tag.speed()); TagCanvas.Reload('myCanvas'); - } } class Index { @@ -216,19 +215,23 @@ class Index { this.running = false; console.log(resp); if (resp.status === 200) { - this.svg3DTagCloud.stop(); - this.render(resp.data, 0); + this.stopLottery(resp.data); } }); }); + $(document).on('click',function () { + $('#result').hide(); + $('.holder').removeClass('mask'); + }); $('#luckyUsers').click(() => { this.list(); }); } - tips(){ - + stopLottery(data){ + this.svg3DTagCloud.stop(); + this.currentlist(data); } render(data, i) { @@ -283,21 +286,10 @@ class Index { DOM += `${user.name}
${user.uid}
`; } DOM += ``; - $('#result').css('display', 'block').html(DOM); + $('#result').show().html(DOM); setTimeout(function(){ $('.holder').addClass('mask'); }, 300); - /* layer.open({ - type: 1, - area: '800px', - skin: 'layui-layer-lan', //样式类名 - offset: [offset.top, offset.left], - closeBtn: 1, //不显示关闭按钮 - anim: 3, - title: '本次中奖名单', - shadeClose: false, //开启遮罩关闭 - content: `
${DOM}
` - });*/ } list() {