From 6d1dcc10ab44269c442e0bd2f66f1eefa4d74c29 Mon Sep 17 00:00:00 2001 From: XiaoMo Date: Mon, 3 Apr 2023 19:00:10 +0800 Subject: [PATCH] =?UTF-8?q?a1300399510@qq.com=20=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E4=BA=8E=202023/04/03=20-19:00:01?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/detail/detail.vue | 24 ++----------------- src/views/detail/detailIndex.vue | 40 +++++++++++++++++++++----------- 2 files changed, 28 insertions(+), 36 deletions(-) diff --git a/src/views/detail/detail.vue b/src/views/detail/detail.vue index f42ab08..1135abd 100755 --- a/src/views/detail/detail.vue +++ b/src/views/detail/detail.vue @@ -15,35 +15,15 @@ export default { data() { return { - tid: 0, // 帖子id - info: {}, - type: 0, // - token: "" + }; }, mounted() { - console.log("ggmjgj", this.$route); - this.tid = this.$route.query['tid'] - this.getDetail() }, methods: { - // 获取详细信息 - getDetail() { - this.$http.post("/api/thread", { - tid: this.tid - }).then(res => { - if (res.code != 200) return - - let data = res.data - this.info = data.info - this.type = data.type - this.token = data.token - - - }) - }, + }, components: { HeaderNav, diff --git a/src/views/detail/detailIndex.vue b/src/views/detail/detailIndex.vue index 843b011..51ebac9 100755 --- a/src/views/detail/detailIndex.vue +++ b/src/views/detail/detailIndex.vue @@ -4,18 +4,18 @@
版块:香港澳门台湾留学申请
- 10378 + {{ info.views }}
- 16 + {{ info.replies }}
-
精华
-
生活贴士
- 香港永久居民的申请步骤和过程 +
精华
+
{{info.typename}}
+ {{info.subject}}
@@ -235,7 +235,6 @@ - @@ -261,11 +260,6 @@ export default { } }, - info: { - avatar: "https://oss.gter.net/avatar/97KwEWANd_4DHWiY6VbnSUFSCKroYWFjYQ~~/middle", - likenum: 1 - }, - islogin: true, prepareLiskeState: false, prepareLiskeAnimateState: false, @@ -282,8 +276,8 @@ export default { tid: 0, // 帖子id info: {}, type: 0, // 定位帖 1 面经 2 租房帖 3 总结 5 捷报 6 - token: "", - + token: "", + @@ -292,10 +286,28 @@ export default { }, mounted() { + this.tid = this.$route.query['tid'] + this.getDetail() }, methods: { - // 点击点赞 + + // 获取详细信息 + getDetail() { + this.$http.post("/api/thread", { + tid: this.tid + }).then(res => { + if (res.code != 200) return + + let data = res.data + this.info = data.info + this.type = data.type + this.token = data.token + + + }) + }, + // 点击点赞 tapLike() {