|
|
|
@ -41,10 +41,18 @@
|
|
|
|
|
elem: '#sourceTable',
|
|
|
|
|
url: '/api/sources',
|
|
|
|
|
page: true,
|
|
|
|
|
parseData: function(res) { // 新增parseData函数处理返回数据
|
|
|
|
|
return {
|
|
|
|
|
"code": res.code,
|
|
|
|
|
"msg": res.msg,
|
|
|
|
|
"count": res.data.total,
|
|
|
|
|
"data": res.data.list
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
cols: [[
|
|
|
|
|
{field: 'id', title: 'ID', width:80},
|
|
|
|
|
{field: 'name', title: '简称'},
|
|
|
|
|
{field: 'type', title: '名称'},
|
|
|
|
|
{field: 'name', title: '账号名称'},
|
|
|
|
|
{field: 'type', title: '来源类型'},
|
|
|
|
|
{field: 'update_time', title: '更新时间'}
|
|
|
|
|
]]
|
|
|
|
|
});
|
|
|
|
@ -54,6 +62,14 @@
|
|
|
|
|
elem: '#articleTable',
|
|
|
|
|
url: '/api/articles',
|
|
|
|
|
page: true,
|
|
|
|
|
parseData: function(res) {
|
|
|
|
|
return {
|
|
|
|
|
"code": res.code,
|
|
|
|
|
"msg": res.msg,
|
|
|
|
|
"count": res.data.total,
|
|
|
|
|
"data": res.data.list
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
cols: [[
|
|
|
|
|
{field: 'id', title: 'ID', width:80},
|
|
|
|
|
{field: 'title', title: '标题'},
|
|
|
|
|