function createCalendar(date_list1, month000) { // var date_list = res.data.t1 var date_list = date_list1 var tdate = {} var styles = { 'full-ball': [], 'left-ball': [], 'right-ball': [], 'zero-ball': [], } for (var i in date_list) { var item = date_list[i] switch (item.ball_status) { case 1: styles['full-ball'].push(item.tdate) break; case 2: styles['left-ball'].push(item.tdate) break; case 3: styles['right-ball'].push(item.tdate) break; case 4: styles['zero-ball'].push(item.tdate) break; } } console.log(styles) $.ajax({ url: 'php', type: 'post', data: { perid: perid, year: year, month: month000, styles: styles }, dataType: 'json', success: function (res) { console.log(res) if (res.status == 1) { $('#calendar').html(res.data.don); } } }) }
本文参与腾讯云自媒体分享计划,欢迎正在阅读的你也加入,一起分享。
我来说两句