Browse Source

功能迁移

master
左文祺 8 years ago
parent
commit
ddcecad15d
  1. 28
      src/static/js/index.js

28
src/static/js/index.js

@ -62,7 +62,7 @@ class Tag{ @@ -62,7 +62,7 @@ class Tag{
let html = [ '<ul>' ];
$(this.entries).each((i, val) => {
let color = (val.role===2||val.role===3)? 'yellow' : 'white';
html.push(`<li><a href="javascript:void(0)" style="color: ${color};" data-uid="${val.uid}" data-role="${val.role}">${val.name}</a></li>`);
html.push(`<li><a href="javascript:void(0)" style="color: ${color};" data-uid="${val.uid}" data-role="${val.name}">${val.uid}</a></li>`);
// html.push(`<li><a href="#" style="color:${color};">' + item.name + '</a></li>`);
});
html.push('</ul>');
@ -91,7 +91,6 @@ class Tag{ @@ -91,7 +91,6 @@ class Tag{
stop(){
TagCanvas.SetSpeed('myCanvas', Tag.speed());
TagCanvas.Reload('myCanvas');
}
}
class Index {
@ -216,19 +215,23 @@ 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 { @@ -283,21 +286,10 @@ class Index {
DOM += `<span>${user.name}<br>${user.uid}</span>`;
}
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: `<div class="luckerList">${DOM}</div>`
});*/
}
list() {

Loading…
Cancel
Save