From 2190944d21a2270c444282996d0cc77be2fd1017 Mon Sep 17 00:00:00 2001 From: king <2229249788@qq.com> Date: Mon, 28 Aug 2023 08:42:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 -- src/pages/home/components/feature_recommended.tsx | 2 +- src/pages/preview/profession/profession.tsx | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.env b/.env index a11710a..86e2b46 100644 --- a/.env +++ b/.env @@ -3,5 +3,3 @@ TARO_APP_API=https://mooc.yaojiankang.top #TARO_APP_API=https://shopfix.yaojiankang.top #TARO_APP_API=https://playedu.yaojiankang.top TARO_APP_LGOIN=true - - diff --git a/src/pages/home/components/feature_recommended.tsx b/src/pages/home/components/feature_recommended.tsx index 0145a83..936de39 100644 --- a/src/pages/home/components/feature_recommended.tsx +++ b/src/pages/home/components/feature_recommended.tsx @@ -117,7 +117,7 @@ const FeatureRecommended: FC = (props) => { return props.illness.map(d => ({ id: d.id, imageUrl: '', - description: d.description, + description: d.description?.replace(/[^\u4e00-\u9fa5]/gi,"") ?? '暂无描述', title: d.name, path: `?id=${d.id}` })) diff --git a/src/pages/preview/profession/profession.tsx b/src/pages/preview/profession/profession.tsx index 7382144..e3516b7 100644 --- a/src/pages/preview/profession/profession.tsx +++ b/src/pages/preview/profession/profession.tsx @@ -92,7 +92,7 @@ const Profession = () => { data.data.map(d => jump(d)}> - {d.resource.name} + {d?.resource?.name} ) }