var fun = {
init:function () {
var myChart = echarts.init(document.getElementById('echart-main'));
// 指定图表的配置项和数据
var option = {
tooltip : {
trigger: 'axis',
formatter:'{a}:
{b}: {c}',
axisPointer: {
type: 'line',
label: {
backgroundColor: '#6a7985'
},
lineStyle:{
color:'#2abb9b'
}
},
},
grid: {
left: '0',
right: '3%',
bottom: '1%',
top:'3%',
containLabel: true
},
xAxis : [
{
boundaryGap: false,
type : 'category',
boundaryGap : false,
data : ['首页','支付','我的管理','余额','会员卡','车牌'],
axisTick:{
show:false,
},
axisLine:{
lineStyle:{
color:'#e5e5e5',
}
},
splitLine:{
show:false,
},
axisLabel: {
show: true,
textStyle: {
color: '#333'
}
}
}
],
yAxis : [
{
boundaryGap: false,
type : 'value',
axisTick:{
show:false,
},
axisLine:{
lineStyle:{
color:'#e5e5e5',
}
},
splitLine:{
show:false,
},
axisLabel: {
show: true,
textStyle: {
color: '#333'
}
}
}
],
series : [
{
smooth:true,
name:'接入接口统计',
// symbol:'image://./../image/symbol.png',
symbol:'image://image/symbol.png',
symbolOffset:[0,5],
symbolSize:26,
type:'line',
stack: '总量',
areaStyle: {normal: {
color:'rgba(38,190,150,.1)'
}},
lineStyle:{
normal: {
color:'#2abb9b',
width:3,
}
},
data:[4, 12, 14, 9, 8, 3, 8]
},
]
};
homePage();
queryApiList();
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
},
};
fun.init();
function homePage(){
var req = {
sysCode: sysComm.sysCode,
apiType: 1
};
sysAjax({
method: "post",
url: dataUrl.util.queryHomePage(),
data: JSON.stringify(req),
contentType: 'application/json; charset=utf-8',
dataType: 'json',
async: false,
success: function(res) {
$('#total_api_no').text(res.apiCount);
$('#total_api_hy__no').text(res.apiHYCount)
$.each(res.apiListDTO, function (index, domEle) {
if(index<3){
var str = '