Bläddra i källkod

🎨 按要求修改问题

快乐的梦鱼 1 vecka sedan
förälder
incheckning
2a1091f611
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3 1
      src/pages/introduction/explore.vue

+ 3 - 1
src/pages/introduction/explore.vue

@@ -101,6 +101,7 @@ import Parse from '@/components/display/parse/Parse.vue';
 import TextEllipsis from '@/components/display/TextEllipsis.vue';
 import Box2LineRightShadow from '../parts/Box2LineRightShadow.vue';
 import Footer from '@/components/display/Footer.vue';
+import { DateUtils } from '@imengyu/imengyu-utils';
 
 const categoryDefine = [
   {
@@ -161,6 +162,7 @@ const categoryDefine = [
     title: '政策法规',
     content: PolicyContent,
     type: '',
+    noFrom: true,
     morePage: '/pages/home/laws',
   },
 ]
@@ -203,7 +205,7 @@ const categoryDatas = categoryDefine.map(item => ({
       .list.map(p => ({
         id: p.id,
         title: p.title, 
-        desc: `来源:${p.from || '暂无'}\n` + (p.desc || ''), 
+        desc: item.noFrom ? (p.desc || DateUtils.formatDate(p.publishAt, 'YYYY-MM-dd')) : `来源:${p.from || '暂无'}\n` + (p.desc || ''), 
         image: p.thumbnail || p.image,
         bottomTags: p.keywords as string[],
       }))