|
@@ -77,19 +77,10 @@ export default {
|
|
|
columnName: '',
|
|
|
displays: '0',
|
|
|
// 列表
|
|
|
- list: [
|
|
|
- {
|
|
|
- title: '标题',
|
|
|
- date: '2020-02-02',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '十四数据',
|
|
|
- date: '2020-02-02',
|
|
|
- },
|
|
|
- ],
|
|
|
+ list: [],
|
|
|
// 总数
|
|
|
total: 0,
|
|
|
- limit: 1,
|
|
|
+ limit: 10,
|
|
|
// 详情
|
|
|
details: {
|
|
|
title: '信息标题',
|
|
@@ -138,21 +129,25 @@ export default {
|
|
|
this.menuIndex = index;
|
|
|
this.columnName = name;
|
|
|
let res = await this.newsQuery({ skip: 0, limit: 14, col_name: name, status: 2 });
|
|
|
- if (this.$checkRes(res)) this.$set(this, `list`, res.data);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ console.log(res);
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
this.menuColor = 'rgb(5,73,130)';
|
|
|
this.$set(this, `displays`, 0);
|
|
|
},
|
|
|
async search({ skip, limit }) {
|
|
|
- console.log(skip);
|
|
|
- console.log(limit);
|
|
|
let res = await this.newsQuery({ skip, limit: 14, col_name: this.columnName, status: 2 });
|
|
|
- if (this.$checkRes(res)) this.$set(this, `list`, res.data);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ console.log(res);
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
// 点击详情
|
|
|
async detailBtn(item) {
|
|
|
- console.log(item);
|
|
|
if (item.url) {
|
|
|
window.open(item.url);
|
|
|
} else {
|
|
@@ -161,16 +156,16 @@ export default {
|
|
|
this.$set(this, `displays`, 1);
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
async newsearch() {
|
|
|
- console.log(this.id);
|
|
|
-
|
|
|
if (this.id) {
|
|
|
let res = await this.newsFetch(this.id);
|
|
|
if (this.$checkRes(res)) this.$set(this, `details`, res.data);
|
|
|
} else {
|
|
|
let res = await this.newsQuery({ skip: 0, limit: 14, col_name: this.columnName, status: 2 });
|
|
|
- if (this.$checkRes(res)) this.$set(this, `list`, res.data);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `list`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
async detail() {
|