From 2fb8c7e04e54e4e921ac38df47b899637c5be8f8 Mon Sep 17 00:00:00 2001 From: xulu Date: Wed, 8 Sep 2021 11:06:22 +0800 Subject: [PATCH] 1 --- src/components/page/you_thed.vue | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/components/page/you_thed.vue b/src/components/page/you_thed.vue index 33f5165..aa7b7b8 100644 --- a/src/components/page/you_thed.vue +++ b/src/components/page/you_thed.vue @@ -177,6 +177,7 @@ this.query.journal_id = this.cate_jour[0].journal_id; this.getData(); + this.getPete(); } else { this.$message.error(res.msg); @@ -230,6 +231,28 @@ this.$message.error(err); }); }, + + getPete() { + this.$api + .post('api/Board/getBoardPendArticle', this.query) + .then(res => { + if (res.code == 0) { + for (let i = 0; i < res.data.articles.length; i++) { + let date = new Date(parseInt(res.data.articles[i].ctime) * 1000); + let Y = date.getFullYear() + '-'; + let M = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) + '-' : date.getMonth() + 1 + '-'; + let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate(); + res.data.articles[i].ctime = Y + M + D; + } + this.tableData3 = res.data.articles; + } else { + this.$message.error(res.msg); + } + }) + .catch(err => { + this.$message.error(err); + }); + }, // 分页导航 handlePageChange2(val) { @@ -245,7 +268,7 @@ localStorage.setItem('journal_id', command.journal_id); this.head_line = command.title; this.query.journal_id = command.journal_id; - this.getData(); + this.getPete(); } }, computed: {