Pārlūkot izejas kodu

🐛 修改错误的栏目

imengyu 4 nedēļas atpakaļ
vecāks
revīzija
b1546926e1

+ 1 - 7
src/pages/discover.vue

@@ -180,13 +180,7 @@ const categories = [
   { 
     name: '闽南美食', 
     icon: CategoryIcon4 , 
-    onClick: () => navTo('/pages/article/common/list', {
-      title: '闽南美食',
-      mainBodyColumnId: 103,
-      modelId: 8,
-      itemType: 'article-common',
-      detailsPage: '/pages/article/details',
-    })  
+    onClick: () => navTo('/pages/introduction/food/')
   },
   { 
     name: '戏剧曲艺', 

+ 4 - 1
src/pages/home/introduction.vue

@@ -31,6 +31,7 @@
             titleColor="title-text"
             :image="item.image"
             :title="item.title"
+            :desc="item.desc"
             @click="goDetail(item.id)"
           />
         </view>
@@ -66,7 +67,8 @@ const listLoader = useSimplePageListLoader<{
   id: number,
   image: string,
   title: string,
-  date: string
+  desc: string,
+  date: string,
 }, {
   modelId: number|undefined, 
   mainBodyColumnId: number|undefined,
@@ -80,6 +82,7 @@ const listLoader = useSimplePageListLoader<{
       id: item.id,
       image: item.thumbnail || item.image,
       title: item.title,
+      desc: item.desc,
       date: DataDateUtils.formatDate(item.publishAt, 'YYYY-MM-dd'),
     }
   }), total: res.total }

+ 8 - 3
src/pages/parts/StatsText.vue

@@ -11,6 +11,7 @@
         v-for="(item, i) in data"
         :key="i"
         class="item"
+        :style="{ width }"
         @click="item.onClick"
       >
         <text class="number">{{ item.value }}</text>
@@ -35,7 +36,11 @@ defineProps({
       onClick?: () => void
     }[]>,
     default: () => ([])
-  }	
+  }	,
+  width: {
+    type: [Number, String],
+    default: ''
+  },
 })
 </script>
 
@@ -61,7 +66,7 @@ $color-text: map.get($colors, "text");
     display: flex;
     flex-direction: row;
     align-items: center;
-    justify-content: center;
+    justify-content: space-around;
     flex-wrap: wrap;
     color: $color-text;
 
@@ -69,7 +74,7 @@ $color-text: map.get($colors, "text");
       display: flex;
       flex-direction: column;
       text-align: center;
-      margin: 10rpx 40rpx;
+      margin: 10rpx 0;
 
       .sub-title {
         font-size: 24rpx;