This commit is contained in:
liuye
2021-12-23 17:42:50 +08:00
parent 2f5529cc2c
commit f9b22190fe
2 changed files with 49 additions and 54 deletions

View File

@@ -4,8 +4,8 @@
<div class="titles">{{data.title}}</div>
<div class="titles-bottom">
<span>类型</span>
<span>{{selectList[data.showIndex].categoryName}}</span>
<span v-if="selectList.length">类型</span>
<span v-if="selectList.length">{{data.categoryName}}</span>
<span class="to-left">浏览量</span>
<span>{{data.viewCount}}</span>
</div>
@@ -48,13 +48,6 @@ export default {
this.$http.post(`/app/appcontentinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.data = res.data
if(this.selectList.length) {
this.selectList.map((item, index) => {
if(item.id == res.data.categoryId) {
this.data.showIndex = index
}
})
}
}
})
},
@@ -63,8 +56,8 @@ export default {
if (res.code == 0) {
if(res.data && res.data[0].categoryList.length) {
this.selectList = res.data[0].categoryList
this.getDetail()
}
this.getDetail()
}
})
},