a1300399510@qq.com 提交于 2023/04/04 -19:20:02

This commit is contained in:
XiaoMo 2023-04-04 19:20:11 +08:00
parent d6a12b87c9
commit 4e0504cadc
3 changed files with 21 additions and 9 deletions

View File

@ -343,10 +343,7 @@ export default {
}, {
key: "wechatText",
name: "微信"
}
]
}]
};
},
@ -354,7 +351,6 @@ export default {
mounted() {
this.tid = this.$route.query['tid']
this.getDetail()
},
methods: {
@ -367,14 +363,12 @@ export default {
if (res.code != 200) return
let data = res.data
console.log("data", data);
let info = data.info
const reg = new RegExp("\r\n", "g")
info['message'] = info['message'].replaceAll(reg, '<br/>')
info['message'] = info['message'].replace(/<img[^>]*>/g, (match) => {
console.log("match", match);
return match.replace(/width="[^"]*"/g, '').replace(/height="[^"]*"/g, '');
});

View File

@ -54,6 +54,7 @@
<plate-navigation stairname="寄托学术类备" subsectionsname="SAT、AP考试、海外本科申…"></plate-navigation>
<!-- 内容区域 -->
<section>
<!-- <index-list :list=""></index-list> -->
<index-list></index-list>
</section>
</div>
@ -88,6 +89,9 @@ export default {
},
],
};
},
mounted() {
},
components: {
plateNavigation,
@ -105,7 +109,6 @@ export default {
settingClose() {
this.settingShow = false;
},
//
cancelFavoritesSection(index) {
this.list.splice(index, 1)

View File

@ -22,11 +22,26 @@ import HeaderNav from "@/components/HeaderNav";
export default {
name: "Index",
data() {
return {};
return {
favorite: [], //
recommend: [], //
};
},
mounted() {
this.init()
},
components: {
HeaderNav,
},
methods: {
init() {
this.$http.post("/api/home").then(res => {
let data = res.data
this.favorite = data.favorite
this.recommend = data.recommend
})
},
}
};
</script>