20
This commit is contained in:
@@ -83,7 +83,11 @@ define(['lightyear','multitabs', '../libs/Chart','form','bootstrap'], function (
|
||||
setTheme = function (input_name, data_name) {
|
||||
$("input[name='" + input_name + "']").click(function () {
|
||||
$('body').attr(data_name, $(this).val());
|
||||
localStorage.setItem(data_name,$(this).val());
|
||||
});
|
||||
if(Config.development){
|
||||
$('body').attr(data_name, localStorage.getItem(data_name) || 'color_8');
|
||||
}
|
||||
}
|
||||
setTheme('logo_bg', 'data-logobg');
|
||||
setTheme('header_bg', 'data-headerbg');
|
||||
@@ -167,47 +171,7 @@ define(['lightyear','multitabs', '../libs/Chart','form','bootstrap'], function (
|
||||
});
|
||||
},
|
||||
dashboard: function () {
|
||||
// new Chart(
|
||||
// document.getElementsByClassName('js-chartjs-bars'),
|
||||
// {
|
||||
// type: 'bar',
|
||||
// data: {
|
||||
// labels: recharge_labels,
|
||||
// datasets: [
|
||||
// {
|
||||
// label: '充值统计',
|
||||
// data: recharge_values,
|
||||
// borderColor: '#358ed7',
|
||||
// backgroundColor: 'rgba(53, 142, 215, 0.175)',
|
||||
// borderWidth: 1,
|
||||
// fill: false,
|
||||
// lineTension: 0.5
|
||||
// },
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
// new Chart(
|
||||
// document.getElementsByClassName('js-chartjs-lines'),
|
||||
// {
|
||||
// type: 'bar',//line
|
||||
// data: {
|
||||
// labels: withdrawl_labels,
|
||||
// datasets: [
|
||||
// {
|
||||
// label: '提现统计',
|
||||
// data: withdrawl_values,
|
||||
// borderColor: '#358ed7',
|
||||
// backgroundColor: 'rgba(53, 142, 215, 0.175)',
|
||||
// borderWidth: 1,
|
||||
// fill: false,
|
||||
// lineTension: 0.5
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
$.getJSON('index/money_lines',function(res){
|
||||
$.getJSON('index/lines_data?items=withdrawl,recharge&days=7',function(res){
|
||||
res = res.data;
|
||||
var labels=[];
|
||||
var withdrawl_values=[];
|
||||
@@ -248,17 +212,13 @@ define(['lightyear','multitabs', '../libs/Chart','form','bootstrap'], function (
|
||||
}
|
||||
);
|
||||
});
|
||||
$.getJSON('index/role_buy_lines',function(res){
|
||||
$.getJSON('index/lines_data?items=register&days=7',function(res){
|
||||
res = res.data;
|
||||
var amount=[];
|
||||
var reward=[];
|
||||
var residual=[];
|
||||
var register=[];
|
||||
var labels=[];
|
||||
for (let date in res) {
|
||||
labels.push(date);
|
||||
amount.push(res[date].amount);
|
||||
reward.push(res[date].reward);
|
||||
residual.push(res[date].residual);
|
||||
register.push(res[date].register);
|
||||
}
|
||||
new Chart(document.getElementsByClassName('js-role_buy_lines'),{
|
||||
type: 'line',
|
||||
@@ -266,32 +226,32 @@ define(['lightyear','multitabs', '../libs/Chart','form','bootstrap'], function (
|
||||
labels: labels,
|
||||
datasets: [
|
||||
{
|
||||
label: '总购买金额',
|
||||
data: amount,
|
||||
label: '注册统计',
|
||||
data: register,
|
||||
borderColor: 'rgba(43, 191, 232, 0.7)',
|
||||
backgroundColor: 'rgba(43, 191, 232, 0.7)',
|
||||
borderWidth: 2,
|
||||
fill: false,
|
||||
lineTension: 0.5
|
||||
},
|
||||
{
|
||||
label: '奖励统计',
|
||||
data: reward,
|
||||
borderColor: 'rgba(166, 53, 215, 0.7)',
|
||||
backgroundColor: 'rgba(166, 53, 215, 0.7)',
|
||||
borderWidth: 2,
|
||||
fill: false,
|
||||
lineTension: 0.5
|
||||
},
|
||||
{
|
||||
label: '沉淀统计',
|
||||
data: residual,
|
||||
borderColor: 'rgba(59, 199, 8, 0.7)',
|
||||
backgroundColor: 'rgba(59, 199, 8, 0.7)',
|
||||
borderWidth: 2,
|
||||
fill: false,
|
||||
lineTension: 0.5
|
||||
}
|
||||
// {
|
||||
// label: '奖励统计',
|
||||
// data: reward,
|
||||
// borderColor: 'rgba(166, 53, 215, 0.7)',
|
||||
// backgroundColor: 'rgba(166, 53, 215, 0.7)',
|
||||
// borderWidth: 2,
|
||||
// fill: false,
|
||||
// lineTension: 0.5
|
||||
// },
|
||||
// {
|
||||
// label: '沉淀统计',
|
||||
// data: residual,
|
||||
// borderColor: 'rgba(59, 199, 8, 0.7)',
|
||||
// backgroundColor: 'rgba(59, 199, 8, 0.7)',
|
||||
// borderWidth: 2,
|
||||
// fill: false,
|
||||
// lineTension: 0.5
|
||||
// }
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user