a1300399510@qq.com 提交于 2023/04/03 -11:40:01
This commit is contained in:
parent
89d304c584
commit
5a4bbd7df2
@ -7,16 +7,17 @@
|
||||
</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" v-for="(i, k) in showList" :key="k">
|
||||
<div class="item-content">
|
||||
<div class="item-title">{{ i.name }}</div>
|
||||
<div class="item-text" v-html="i.description"></div>
|
||||
<div v-if="i.description" class="item-text" v-html="i.description"></div>
|
||||
</div>
|
||||
<div class="item-star" @click="starClick(k)">
|
||||
<img v-if="!i.iscollection" src="~assets/img/allSections/nullStar.png" alt="空星">
|
||||
<img v-else src="~assets/img/allSections/star.png" alt="实星">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -27,7 +28,9 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
allActive: 0,
|
||||
list: [],
|
||||
list: [{
|
||||
|
||||
}],
|
||||
starList: [
|
||||
{
|
||||
title: "2023招生季[你好 招生官]",
|
||||
@ -41,7 +44,8 @@ export default {
|
||||
title: "2023招生季[你好 招生官]",
|
||||
text: "[权威、官方]的第一手信息。"
|
||||
}
|
||||
]
|
||||
],
|
||||
showList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -50,8 +54,8 @@ export default {
|
||||
console.log(index);
|
||||
},
|
||||
starClick(k) {
|
||||
if (this.starList[k].checked) this.starList[k].checked = false
|
||||
else this.starList[k].checked = true
|
||||
// if (this.starList[k].checked) this.starList[k].checked = false
|
||||
// else this.starList[k].checked = true
|
||||
|
||||
this.$forceUpdate()
|
||||
},
|
||||
@ -59,7 +63,6 @@ export default {
|
||||
// 获取全部板块
|
||||
getAllForum() {
|
||||
this.$http.post("/api/home/allForum").then((res) => {
|
||||
console.log(res, "res");
|
||||
if (res.code != 200) return;
|
||||
this.list = res.data
|
||||
}).catch(err => {
|
||||
@ -67,15 +70,15 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getAllForum()
|
||||
|
||||
},
|
||||
|
||||
|
||||
created() {
|
||||
console.log("dfgkljdflkdfgj");
|
||||
|
||||
this.starList.forEach(el => {
|
||||
el.checked = false
|
||||
})
|
||||
|
||||
this.getAllForum()
|
||||
console.log(this.allActive);
|
||||
|
||||
|
||||
// https://forum.gter.net
|
||||
@ -193,7 +196,8 @@ export default {
|
||||
align-items: center;
|
||||
|
||||
img {
|
||||
width: 20px;
|
||||
width: .48rem;
|
||||
height: .46rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user