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

View File

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

View File

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