소스 검색

feat(home): 更新首页组件,优化卡片渲染并修复任务卡片积分显示逻辑

EvilDragon 3 달 전
부모
커밋
20eb8c1cca
2개의 변경된 파일4개의 추가작업 그리고 14개의 파일을 삭제
  1. 3 14
      packages/app/src/pages/home/spread/index.vue
  2. 1 0
      packages/app/src/pages/mine/components/tasks-card.vue

+ 3 - 14
packages/app/src/pages/home/spread/index.vue

@@ -56,24 +56,13 @@ onMounted(async () => {
 </script>
 
 <template>
-  <view class="px-3.5 py-5.5">
-    <!-- <wd-swiper
-      custom-class="rounded-2xl overflow-hidden aspect-[2.71/1]"
-      width="100%"
-      height="100%"
-      :list="swiperList"
-      autoplay
-      v-model:current="current"
-      :indicator="{ type: 'dots-bar' } as any"
-      @click="handleClick"
-      @change="onChange"
-    ></wd-swiper> -->
+  <view class="px-3.5 py-5.5 flex-grow">
     <Banner :mode="BannerMode.Spread"></Banner>
 
     <view class="my-6 grid gap-2.5 grid-cols-2">
       <template v-for="it of menus" :key="it.title">
         <div :class="it.class" @click="router.push(it.path)">
-          <card :custom-class="['w-full h-full flex justify-between items-center']">
+          <Card :custom-class="'w-full h-full flex justify-between items-center'">
             <div
               class="my-3.5 text-black/40 text-base font-normal font-['PingFang_SC'] leading-[10.18px]"
             >
@@ -86,7 +75,7 @@ onMounted(async () => {
                 <wd-img :src="it.icon" width="23" height="23"></wd-img>
               </div>
             </view>
-          </card>
+          </Card>
         </div>
       </template>
     </view>

+ 1 - 0
packages/app/src/pages/mine/components/tasks-card.vue

@@ -59,6 +59,7 @@ onMounted(async () => {})
                 {{ taskKey }}
               </div>
               <div
+                v-if="Number(taskValue) !== 0"
                 class="ml-1 text-[#dc753a] text-xs font-normal font-['PingFang_SC'] leading-normal"
               >
                 +{{ taskValue }}积分