+
-
{{ i.title }}
-
{{ i.text }}
+
{{ i.name }}
+
@@ -27,37 +27,7 @@ export default {
data() {
return {
allActive: 0,
- showStar: [],
- star: -1,
- list: [
- {
- title: "2023招生官"
- },
- {
- title: "香港澳门台湾留学版"
- },
- {
- title: "美国留学版"
- },
- {
- title: "加拿大留学版"
- },
- {
- title: "英国留学版"
- },
- {
- title: "欧洲留学版"
- },
- {
- title: "欧洲留学版"
- },
- {
- title: "欧洲留学版"
- },
- {
- title: "欧洲留学版"
- }
- ],
+ list: [],
starList: [
{
title: "2023招生季[你好 招生官]",
@@ -77,28 +47,36 @@ export default {
methods: {
allClick(index) {
this.allActive = index
+ console.log(index);
},
starClick(k) {
- this.star = k
- if (this.showStar[k].checked) {
- this.showStar[k].checked = false
- } else {
- this.showStar[k].checked = true
- }
+ if (this.starList[k].checked) this.starList[k].checked = false
+ else this.starList[k].checked = true
- console.log(this.showStar);
this.$forceUpdate()
+ },
+
+ // 获取全部板块
+ getAllForum() {
+ this.$http.post("/api/home/allForum").then((res) => {
+ console.log(res, "res");
+ if (res.code != 200) return;
+ this.list = res.data
+ }).catch(err => {
+ this.$message.error(err.message)
+ });
}
},
+
created() {
- console.log("starList", this.starList);
- for (var i = 0; i < this.starList.length; i++) {
- this.showStar.push({ ...this.starList[i], 'checked': false })
- }
- console.log(this.showStar);
- // for (let i in this.showStar) {
- // this.showStar[i].checked = false
- // }
+ console.log("dfgkljdflkdfgj");
+
+ this.starList.forEach(el => {
+ el.checked = false
+ })
+
+ this.getAllForum()
+
// https://forum.gter.net
}