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 @@ <div class="detail-section">版块:<span class="section-name">香港澳门台湾留学申请</span></div> <div class="detail-data flexacenter"> <div class="detail-data-item flexacenter"> - <img class="detail-data-eye" src="@/assets/img/detail/eye.png">10378 + <img class="detail-data-eye" src="@/assets/img/detail/eye.png">{{ info.views }} </div> <div class="detail-data-item flexacenter"> - <img class="detail-data-comment" src="@/assets/img/detail/comment.png">16 + <img class="detail-data-comment" src="@/assets/img/detail/comment.png">{{ info.replies }} </div> </div> </div> <div class="detail-title-box"> - <div class="detail-title-item detail-title-jinghua flexcenter" v-if="">精华</div> - <div class="detail-title-item detail-title-label flexcenter">生活贴士</div> - 香港永久居民的申请步骤和过程 + <div class="detail-title-item detail-title-jinghua flexcenter" v-if="info.digest>0">精华</div> + <div class="detail-title-item detail-title-label flexcenter" v-if="info.typename">{{info.typename}}</div> + {{info.subject}} </div> <!-- --> @@ -235,7 +235,6 @@ </div> </div> - <detail-reply :two-comment-data="twoCommentData" :pop-state="popState"></detail-reply> <coins :coin-config="coinConfig" :pop-state="popState"></coins> </div> @@ -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() {