a1300399510@qq.com 提交于 2023/04/03 -18:00:02
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
@click="allClick(index)">{{ item.name }}</span>
|
||||
</div>
|
||||
<div class="allSections-right">
|
||||
<div class="allSections-right-item" v-for="(i, k) in list[allActive].data" :key="k">
|
||||
<div class="allSections-right-item" @click="pitchPlate(i.fid)" v-for="(i, k) in list[allActive].data"
|
||||
:key="k">
|
||||
<div class="item-content">
|
||||
<div class="item-title">{{ i.name }}</div>
|
||||
<div v-if="i.description" class="item-text" v-html="i.description.replace(/<[^>]+>/g, '')"></div>
|
||||
@@ -24,7 +25,12 @@
|
||||
<div v-else style="margin-top:.64rem;">
|
||||
<plate-navigation stairname="寄托学术类备" subsectionsname="SAT、AP考试、海外本科申…"></plate-navigation>
|
||||
<div style="margin:.4rem 0.35rem">
|
||||
<index-list></index-list>
|
||||
<index-list :list="invitationList"></index-list>
|
||||
</div>
|
||||
<div v-if="invitationList.length != 0" class="paging flexcenter">
|
||||
<el-pagination small background layout="prev, pager, next" @current-change="currentChange"
|
||||
:current-page.sync="invitationPage" :page-size="invitationLimit" :total="invitationCount">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -43,6 +49,10 @@ export default {
|
||||
postCollectionState: false, // 收藏的请求的状态
|
||||
|
||||
fid: 0, // 是否有选中的板块id
|
||||
invitationList: [], // 选中板块帖子的列表
|
||||
invitationLimit: 10,
|
||||
invitationPage: 1, //
|
||||
invitationCount: 1, //
|
||||
}
|
||||
},
|
||||
|
||||
@@ -97,6 +107,35 @@ export default {
|
||||
},
|
||||
|
||||
|
||||
// 点击选中板块 并获取列表
|
||||
pitchPlate(fid) {
|
||||
this.fid = fid
|
||||
this.getInvitationList()
|
||||
},
|
||||
|
||||
// 获取帖子列表
|
||||
getInvitationList() {
|
||||
this.$http.post("/api/home/threadList", {
|
||||
page: this.invitationPage,
|
||||
limit: this.invitationLimit,
|
||||
fid: this.fid
|
||||
}).then(res => {
|
||||
console.log(res, "res");
|
||||
let data = res.data
|
||||
this.invitationList = data.data
|
||||
this.invitationCount = data.count
|
||||
this.invitationLimit = data.limit
|
||||
|
||||
document.documentElement.scrollTop = 0;
|
||||
document.body.scrollTop = 0;
|
||||
})
|
||||
},
|
||||
|
||||
// 点击页数
|
||||
currentChange(){
|
||||
this.getInvitationList()
|
||||
},
|
||||
|
||||
},
|
||||
mounted() {
|
||||
this.getAllForum()
|
||||
|
||||
Reference in New Issue
Block a user