const getArticle = (id) => { reqViewShareArticle(id) .then((res) => { if (res?.data?.article) { setArticle(res.data.article); } if (res?.data?.user) { setUserInfo(res.data.user); } }) .catch((err) => { message.destroy(); setIsEmpty(true); document.title = '抱歉,你访问的页面不存在'; }); };