match.js
1.2 KB
define(['jquery', 'bootstrap', 'frontend', 'form', 'template', 'swiper', 'layer'], function($, undefined, Frontend, Form, Template, Swiper, Layer) {
var Controller = {
index:function () {
var type = Config.type;
var lis = $(".double_choose ul li");
$.each(lis,function(index,item) {
if($(this).attr('id') == type) {
$(this).addClass('li_active');
}else{
$(this).removeClass('li_active');
}
});
$(document).on("click",".stage",function(){
var matchId = $(this).attr('data-id');
layer.open({
type: 2,
area: ['70%', '70%'],
content: '/index/match/match/getRemark?id='+matchId, //这里content是一个URL,如果你不想让iframe出现滚动条,你还可以content: ['http://sentsin.com', 'no']
});
});
$(document).on("click","#prize_view",function(){
var item_id = $(this).attr('data-id');
Fast.api.open('/index/match/match/prize_view?item_id='+item_id, '获奖信息');
});
}
}
return Controller;
});