if (url && url.length > 0) {
this.loading = true;
let param = {
accept: "text/html, text/plain"
};
this.axios.get(url, param)
.then(response => {
this.loading = false;
this.html = response.data;
let test = this.html.replace(/<.*?>/ig, "")
this.description = test.substring(0, 36)
})
.catch(() => {
this.loading = false;
this.html = "加载失败";
});
}
解析url
猜你喜欢
转载自blog.csdn.net/LR13567/article/details/105601225
今日推荐
周排行