&& res.data.baidupc.baidupcChart.topuv && res.data.baidupc.baidupcChart.knum && p==1){
var ctx = document.getElementById('myChart-pc').getContext('2d');
document.getElementById('myChart-pc').style.height = '410px';
var chart = Chart.getChart(ctx);
if (chart) {
chart.destroy();
}
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: res.data.baidupc.baidupcChart.days, // X轴标签
datasets: [{
label: '关键词数', // 数据集名称
data: res.data.baidupc.baidupcChart.knum, // 数据点
borderColor: 'rgba(255, 99, 132, 1)', // 线条颜色
borderWidth: 2,
fill: false // 是否填充曲线下方区域
}, {
label: '百度来路IP',
data: res.data.baidupc.baidupcChart.topip,
borderColor: 'rgba(54, 162, 235, 1)',
borderWidth: 2,
fill: false,
hidden: true
}, {
label: '百度访问PV',
data: res.data.baidupc.baidupcChart.topuv,
borderColor: 'rgb(240, 123, 63)',
borderWidth: 2,
fill: false,
hidden: true
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
hoverMode: 'index',
stacked: false,
scales: {
x: {
display: true,
ticks: {
maxTicksLimit: 10,
}
},
y: {
display: true,
}
}
}
});
}
}
if(fm == 'wap'){
$('#mkwinfo').html(res.data.list);
$('#mobile-pane').attr('data-tr',1);
if(res.data.baidumobile.baidumobileChart.days && res.data.baidumobile.baidumobileChart.topip && res.data.baidumobile.baidumobileChart.topuv && res.data.baidumobile.baidumobileChart.knum && p==1){
var ctx = document.getElementById('myChart-m').getContext('2d');
document.getElementById('myChart-m').style.height = '410px';
var chart = Chart.getChart(ctx);
if (chart) {
chart.destroy();
}
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: res.data.baidumobile.baidumobileChart.days, // X轴标签
datasets: [{
label: '关键词数', // 数据集名称
data: res.data.baidumobile.baidumobileChart.knum, // 数据点
borderColor: 'rgba(255, 99, 132, 1)', // 线条颜色
borderWidth: 2,
fill: false // 是否填充曲线下方区域
}, {
label: '百度来路IP',
data: res.data.baidumobile.baidumobileChart.topip,
borderColor: 'rgba(54, 162, 235, 1)',
borderWidth: 2,
fill: false,
hidden: true
}, {
label: '百度访问PV',
data: res.data.baidumobile.baidumobileChart.topuv,
borderColor: 'rgb(240, 123, 63)',
borderWidth: 2,
fill: false,
hidden: true
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
hoverMode: 'index',
stacked: false,
scales: {
x: {
display: true,
ticks: {
maxTicksLimit: 10,
}
},
y: {
display: true,
}
}
}
});
}
}
}
}
})
}
function login() {
layer.open({
type: 1,
area: [width, 'auto'],
title: '用户登陆',
shade: 0.6,
shadeClose: false,
anim: 0,
content: $('#loginmod'),
success: function(layero, index, that) {
$('#loginmod').show();
},
cancel: function(index, layero, that) {
$('#loginmod').hide();
}
});
}
})