|
@@ -164,22 +164,8 @@ export default {
|
|
total: 1,
|
|
total: 1,
|
|
limit: 16,
|
|
limit: 16,
|
|
details: {},
|
|
details: {},
|
|
- list: [
|
|
|
|
- {
|
|
|
|
- title: '标题',
|
|
|
|
- date: '2020-02-02',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '16条数据',
|
|
|
|
- date: '2020-02-02',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- details: {
|
|
|
|
- title: '信息标题',
|
|
|
|
- source: '信息部',
|
|
|
|
- date: '2020-02-02',
|
|
|
|
- content: '信息内容',
|
|
|
|
- },
|
|
|
|
|
|
+ list: [],
|
|
|
|
+ details: {},
|
|
}),
|
|
}),
|
|
created() {
|
|
created() {
|
|
this.search();
|
|
this.search();
|
|
@@ -200,13 +186,11 @@ export default {
|
|
...news({ newsQuery: 'query', newsFetch: 'fetch' }),
|
|
...news({ newsQuery: 'query', newsFetch: 'fetch' }),
|
|
async search() {
|
|
async search() {
|
|
this.columnName = this.col_name;
|
|
this.columnName = this.col_name;
|
|
- console.log(this.columnName);
|
|
|
|
if (this.display == '0') {
|
|
if (this.display == '0') {
|
|
let res = await this.newsQuery({ skip: 0, limit: 16, col_name: this.col_name, status: 2 });
|
|
let res = await this.newsQuery({ skip: 0, limit: 16, col_name: this.col_name, 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);
|
|
this.$set(this, `total`, res.total);
|
|
} else {
|
|
} else {
|
|
- console.log('sdada');
|
|
|
|
let res = await this.newsFetch(this.id);
|
|
let res = await this.newsFetch(this.id);
|
|
if (this.$checkRes(res)) this.$set(this, `details`, res.data);
|
|
if (this.$checkRes(res)) this.$set(this, `details`, res.data);
|
|
this.$set(this, `displays`, this.display);
|
|
this.$set(this, `displays`, this.display);
|
|
@@ -232,8 +216,6 @@ export default {
|
|
|
|
|
|
//分页
|
|
//分页
|
|
async searchinfo({ skip, limit }) {
|
|
async searchinfo({ skip, limit }) {
|
|
- console.log(skip);
|
|
|
|
- console.log(limit);
|
|
|
|
let res = await this.newsQuery({ skip, limit: 16, col_name: this.columnName, status: 2 });
|
|
let res = await this.newsQuery({ skip, limit: 16, 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);
|
|
this.$set(this, `total`, res.total);
|