From fdca595a49bc3c885341f86fc3b2535c50ab07f2 Mon Sep 17 00:00:00 2001 From: clay <20932067@zju.edu.cn> Date: Sat, 26 Feb 2022 13:57:26 +0800 Subject: [PATCH] 11 --- src/views/content/components/list.vue | 11 +++++------ src/views/content/index.vue | 3 ++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/views/content/components/list.vue b/src/views/content/components/list.vue index debb8e7..5ade1d8 100644 --- a/src/views/content/components/list.vue +++ b/src/views/content/components/list.vue @@ -75,12 +75,8 @@ export default { value: { type: Object, default: { - data: [{ - content: "", - title: "", - publishTime: "2022-01-15 17:02:13", - imgurl: "http://sistfile.hchyun.cn/2022/01/15/b0904e59-25d4-433e-bd0f-e23940d6267d.png", - }] + //生命周期初始化问题 + data: [] }, }, }, @@ -124,7 +120,10 @@ export default { this.type = this.$route.query && this.$route.query.type if (this.type != null&&this.type!=0){ data.id = this.value.secondId + }else { + console.log(this.value); } + console.log(data); getNode(data).then(res => { this.value.data = res.rows this.value.total = res.total diff --git a/src/views/content/index.vue b/src/views/content/index.vue index 9ceb91a..5159c41 100644 --- a/src/views/content/index.vue +++ b/src/views/content/index.vue @@ -359,12 +359,13 @@ export default { } getNode(data).then(res => { console.log(res, "res值") + console.log(this.type); if (this.type == 2 || this.type == 4) { this.contextData = { data: res.rows, total: res.total, pageNum: data.pageNum, - navId: this.navId, + navId: menu.encodeId, secondId: this.secondId, } } else if (this.type == 1) {