lixin-web
Version:
vue and bootstrap
69 lines (64 loc) • 2.73 kB
JavaScript
Will.ajax({},'api/vip/list-vip-config',function(data){
var config = {
"xul8oHn6":{title:"提款额度",data:''},
"gE2gJSHa":{title:"VIP升级奖励",data:''},
// "Lkwlepyo":{title:"VIP生日礼金",data:''},
// "fD22v1yi":{title:"免费筹码",data:''},
// "7YdivzRT":{title:"积分换礼金",data:''},
};
$.each(data,function(){
that = this;
$.each(config,function(k,v){
if(that.code==k) {
v.data = eval(that.rules);
if(k=="gE2gJSHa"){
$.each(v.data,function(){
this.rewardMoney01=this.rewardMoney;
});
}
}
});
});
var ZhuanHuan = {};
$.each(config,function(k,v){
// $tr = $('<tr>');
// if(k=="gE2gJSHa"){
// $.each(v.data,function(){
// $tr.append("<td>"+this.dayRecharge+"<td>");
// $tr.append("<td>"+this.totalRecharge+"<td>");
// $tr.append("<td>"+this.rewardMoney+"<td>");
// $tr.append("<td>"+this.vipCode+"</td>");
// })
// }
// if(k=="xul8oHn6"){
// $.each(v.data,function(){
// $tr.append("<td>"+this.singleDrawMoneny+"<td>");
// $tr.append("<td>"+this.totalDrawMoneny+"<td>");
// $tr.append("<td>"+this.drawCount+"<td>");
// })
// }
// $('tbody').append($tr);
// if(k=="xul8oHn6"){
// //tr02.append('<td>'+this.title+'</td>');
// $.each(v.data,function(){
// $('tbody').append('<td>'+this.totalDrawMoneny+'</td>');
// })
// }
// console.log(000)
$.each(v.data,function(kk,vv){
ZhuanHuan['no'+kk]=$.extend(ZhuanHuan['no'+kk],vv);
})
});
$.each(ZhuanHuan,function(k,v){
$tr = $('<tr>');
$tr.append("<td>"+this.dayRecharge+"</td>");
$tr.append("<td>"+this.totalRecharge+"</td>");
$tr.append("<td>"+this.drawCount+"</td>");
$tr.append("<td>"+this.singleDrawMoneny+"</td>");
$tr.append("<td>"+this.totalDrawMoneny+"</td>");
$tr.append("<td>"+this.vipCode+"</td>");
$tr.append("<td>"+this.rewardMoney+"</td>");
$('tbody').append($tr);
});
$('tbody tr:nth-child(1)').remove()
});