Quellcode durchsuchen

feat: 更新离线活动项组件,优化图片展示逻辑,动态显示活动期数,调整时间格式展示

EvilDragon vor 3 Monaten
Ursprung
Commit
f5f5f5bc34

+ 17 - 10
packages/app/src/pages/home/components/offline-activity-item.vue

@@ -22,20 +22,26 @@ const router = useRouter()
   <div @click="router.push(`/pages/home/classmates-detail/index?id=${options.id}`)">
     <card :custom-class="[customClass, 'p-0!']">
       <view class="relative">
-        <img
-          class="w-[347px] h-[202px] rounded-tl-2xl rounded-tr-2xl vertical-bottom"
+        <wd-img
+          width="100%"
+          custom-class="vertical-bottom"
+          class="w-[347px] h-[202px] rounded-tl-2xl rounded-tr-2xl"
           :src="options.bannerUrl"
         />
-        <div class="absolute top-4 right-4 px-2.5 bg-black/30 rounded-[20px] backdrop-blur-[15px]">
-          <div class="text-white text-xs font-normal font-['PingFang_SC'] leading-relaxed">
-            已结束
+        <template v-if="dayjs().isAfter(dayjs(options?.hostDate).add(1, 'd'))">
+          <div
+            class="absolute top-4 right-4 px-2.5 bg-black/30 rounded-[20px] backdrop-blur-[15px]"
+          >
+            <div class="text-white text-xs font-normal font-['PingFang_SC'] leading-relaxed">
+              已结束
+            </div>
           </div>
-        </div>
+        </template>
         <div
           class="absolute top-4 left-4 px-2.5 rounded-md border border-solid border-white justify-center items-center gap-2.5 inline-flex"
         >
           <div class="text-white text-xs font-normal font-['PingFang_SC'] leading-normal">
-            第18
+            第{{ options.periodsCount }}
           </div>
         </div>
       </view>
@@ -48,12 +54,13 @@ const router = useRouter()
           <div
             class="flex items-center text-black/60 text-sm font-normal font-['PingFang_SC'] leading-[34px]"
           >
-            <div class="">{{ dayjs(options.studyStartDate).format('MM-DD') }}</div>
+            <!-- <div class="">{{ dayjs(options.studyStartDate).format('MM-DD') }}</div>
             <wd-img custom-class="mx-1" width="5" height="5" :src="polygon16" />
-            <div>{{ dayjs(options.studyEndDate).format('MM-DD') }}</div>
+            <div>{{ dayjs(options.studyEndDate).format('MM-DD') }}</div> -->
+            {{ dayjs(options?.hostDate).format('MM.DD HH:mm') }}
           </div>
         </view>
-        <view class="flex">
+        <view class="flex gap-4">
           <div
             class="inline-block px-2.5 rounded-md border border-solid border-black/30 backdrop-blur-[6px] flex justify-center items-center"
           >

+ 2 - 6
packages/app/src/pages/mine/orders/detail/index.vue

@@ -66,12 +66,8 @@ onLoad((query: { id: string }) => {
       size="sm"
       :end-text="`¥ ${data.orderMoney}`"
     ></SectionHeading>
-    <SectionHeading title="总积分" size="sm" :end-text="`¥ ${data.points}`"></SectionHeading>
-    <SectionHeading
-      title="实际支付积分"
-      size="sm"
-      :end-text="`¥ ${data.payPoints}`"
-    ></SectionHeading>
+    <SectionHeading title="总积分" size="sm" :end-text="`${data.points}`"></SectionHeading>
+    <SectionHeading title="实际支付积分" size="sm" :end-text="`${data.payPoints}`"></SectionHeading>
     <SectionHeading title="订单号" size="sm" :end-text="data.orderNo"></SectionHeading>
     <SectionHeading
       title="支付时间"