kevin.T 3 weeks ago
parent
commit
00e6f5f896

+ 3 - 3
packages/app/src/components/hot-activity-item.vue

@@ -39,14 +39,14 @@ const { listItemButtonText, statusText, status, difference, startAt, endAt, refr
           mode="scaleToFill"
         />
         <div
-          class=" px-2 h-4 bg-black/60 rounded-[20px] backdrop-blur-[15px] absolute top-2.5 left-[7px] flex items-center justify-center"
+          class="px-2 h-4 bg-black/60 rounded-[20px] backdrop-blur-[15px] absolute top-2.5 left-[7px] flex items-center justify-center"
         >
           <div class="text-white text-[9px] font-normal font-['PingFang_SC']">
-            {{statusText}}
+            {{ statusText }}
           </div>
         </div>
         <div
-          class="w-[202px] left-[119px] top-0 absolute text-black text-base font-normal font-['PingFang_SC'] leading-relaxed"
+          class="w-[202px] left-[119px] top-0 absolute text-black text-base fw-600 font-['PingFang_SC'] leading-relaxed"
         >
           <!-- 活动预告 | 日本研学·东京艺术大学设计游学 -->
           {{ options?.name }}

+ 2 - 2
packages/app/src/pages-sub/home/activity/detail/index.vue

@@ -100,8 +100,8 @@ const infos = computed(() => [
     icon: clock,
     title: '报名时间',
     content: [
-      dayjs(data.value.applyStartTime).format('YYYY.MM.DD'),
-      dayjs(data.value.applyEndTime).format('YYYY.MM.DD'),
+      dayjs(data.value.applyStartTime).format('YYYY.MM.DD HH:mm'),
+      // dayjs(data.value.applyEndTime).format('YYYY.MM.DD'),
     ],
     visable: true,
   },

+ 4 - 1
packages/app/src/pages-sub/home/components/info-card.vue

@@ -8,7 +8,10 @@ const props = defineProps<{
 </script>
 <template>
   <card custom-class="my-6">
-    <div class="my-7.5 text-black text-xl font-normal font-['PingFang_SC'] leading-[10.18px]" style="line-height: 20rpx;">
+    <div
+      class="my-20px text-black text-xl fw-500 font-['PingFang_SC'] leading-[10.18px]"
+      style="line-height: 20rpx"
+    >
       {{ props.title }}
     </div>
     <div

+ 11 - 22
packages/app/src/pages-sub/home/mall/index.vue

@@ -96,7 +96,7 @@ onShareTimeline(() => ({
           <wd-img width="95" height="25" :src="textGreatMoney"></wd-img>
           <div class="flex-1"></div>
           <div
-            class="flex gap-1 text-center text-white text-base font-normal font-['PingFang_SC'] leading-relaxed"
+            class="flex gap-1 text-center items-center text-white text-base font-normal font-['PingFang_SC'] leading-relaxed"
           >
             <wd-count-down :time="time">
               <template #default="{ current }">
@@ -140,8 +140,7 @@ onShareTimeline(() => ({
                 </div>
               </template>
             </wd-count-down>
-            <!-- 17:02:18 -->
-            结束
+            <div>结束</div>
           </div>
         </div>
       </div>
@@ -160,7 +159,7 @@ onShareTimeline(() => ({
               />
               <div class="flex-1">
                 <div
-                  class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-normal line-clamp-1 text-ellipsis overflow-hidden"
+                  class="text-black/90 text-base font-normal pt-10px font-['PingFang_SC'] leading-normal line-clamp-1 text-ellipsis overflow-hidden"
                 >
                   <!-- 海蓝之谜精华面霜60ml -->
                   {{ it.prodcutName }}
@@ -168,10 +167,6 @@ onShareTimeline(() => ({
                 <div class="flex items-center gap-2.5">
                   <template v-if="Number(it.isRestrict)">
                     <div class="flex-1">
-                      <!-- {{ (it.exchangeCount || 0 / it.productRepertory || 0) * 100 }} -->
-                      <!--                      1-->
-                      <!--                      {{ it.isRestrict }}-->
-
                       <ProgressEvo
                         :height="6"
                         :model-value="
@@ -187,22 +182,16 @@ onShareTimeline(() => ({
                     </div>
                   </template>
                   <template v-else>
-                    <div class="flex-1 h-6">
-                      <!--                      <ProgressEvo-->
-                      <!--                        :height="6"-->
-                      <!--                        :model-value="(it.exchangeCount || 0 / it.productRepertory || 0) * 100"-->
-                      <!--                        color="black"-->
-                      <!--                      ></ProgressEvo>-->
-                    </div>
+                    <div class="flex-1 h-6"></div>
                     <div
                       class="text-black/40 text-[10px] font-normal font-['PingFang_SC'] leading-normal"
                     >
-                      <!--                      还剩{{ it.productRepertory - it.exchangeCount }}件-->
+                      {{ it.exchangeDesc }}
                     </div>
                   </template>
                 </div>
-                <div class="flex items-end gap-1 mt-5">
-                  <div class="flex items-center gap-1 pb-3">
+                <div class="flex items-end gap-1 mt-12px">
+                  <div class="flex items-center gap-1 pb-10px">
                     <div class="text-[#ef4343] text-[22px] font-normal font-['D-DIN_Exp']">
                       {{ it.favourablePoints }}
                     </div>
@@ -216,17 +205,17 @@ onShareTimeline(() => ({
                       router.push(`/pages-sub/home/mall/detail/index?id=${it.productId}`)
                     "
                   >
-                    <wd-img width="106" height="40" :src="grabNow"></wd-img>
+                    <wd-img width="97" height="35" :src="grabNow"></wd-img>
                   </div>
                 </div>
-                <div class="flex gap-4">
+                <div class="flex gap-4 mt--8px">
                   <div
-                    class="text-black/30 text-[10px] font-normal font-['PingFang_SC'] line-through leading-normal"
+                    class="text-black/30 text-[12px] font-normal font-['PingFang_SC'] line-through leading-normal"
                   >
                     {{ it.showFavourable ? it.favourablePoints : it.points }} 积分
                   </div>
                   <div
-                    class="text-black/30 text-[10px] font-normal font-['PingFang_SC'] line-through leading-normal"
+                    class="text-black/30 text-[12px] font-normal font-['PingFang_SC'] line-through leading-normal"
                     v-if="it.productPrice"
                   >
                     ¥{{ it.productPrice }}

+ 1 - 1
packages/app/src/pages-sub/home/moment/index.vue

@@ -516,7 +516,7 @@ const handleClick = async (value: boolean) => {
             <template v-else>
               <wd-img width="18" height="18" :src="likeBlack"></wd-img>
             </template>
-            <view>{{ data.upvoteCount }}</view>
+            <view>{{ data.upvoteCount ?? 0 }}</view>
           </view>
         </view>
       </div>

+ 31 - 31
packages/app/src/pages-sub/home/offline-activity/index.vue

@@ -48,7 +48,7 @@ const { data: levels, run: setLevels } = useRequest(() => getAppMemberLevelConfi
   initialData: [],
 })
 const handleSwiperChange = ({ detail: { current } }) => {
-  currentBanner.value = current 
+  currentBanner.value = current
 }
 const levelsByMemberLevel = computed(() =>
   levels.value.reduce((acc, item) => {
@@ -79,26 +79,26 @@ onMounted(async () => {
       end-text="查看全部"
     ></section-heading>
     <view class="relative">
-		<template v-if="activities.list?.length">
-		  <swiper class="aspect-[0.75/1] rounded-[20px] overflow-hidden" @change="handleSwiperChange">
-		    <template v-for="(it, i) in activities.list" :key="i">
-		      <swiper-item>
-		        <RegisterCard :options="{ ...it, levelsByMemberLevel }"></RegisterCard>
-		      </swiper-item>
-		    </template>
-		  </swiper>
-		  <div class="absolute flex gap-1 dots">
-		    <template v-for="(it, i) in activities.list" :key="i">
-		      <div
-		        class="w-1 h-1 rounded-full"
-		        :class="`${currentBanner === i ? 'bg-white bg-active' : 'bg-white/40'}`"
-		      ></div>
-		    </template>
-		  </div>
-		</template>
-	</view>
+      <template v-if="activities.list?.length">
+        <swiper class="aspect-[0.75/1] rounded-[20px] overflow-hidden" @change="handleSwiperChange">
+          <template v-for="(it, i) in activities.list" :key="i">
+            <swiper-item>
+              <RegisterCard :options="{ ...it, levelsByMemberLevel }"></RegisterCard>
+            </swiper-item>
+          </template>
+        </swiper>
+        <div class="absolute flex gap-1 dots">
+          <template v-for="(it, i) in activities.list" :key="i">
+            <div
+              class="w-1 h-1 rounded-full"
+              :class="`${currentBanner === i ? 'bg-white bg-active' : 'bg-white/40'}`"
+            ></div>
+          </template>
+        </div>
+      </template>
+    </view>
     <card custom-class="">
-      <div class="my-7.5 text-black text-xl font-normal font-['PingFang_SC'] leading-[10.18px]">
+      <div class="my-10px text-black text-xl fw-500 font-['PingFang_SC'] leading-[10.18px]">
         筑巢荟-活动营
       </div>
       <div
@@ -142,15 +142,15 @@ onMounted(async () => {
 </template>
 
 <style scoped lang="scss">
-	.dots{
-		bottom: 20rpx;
-		left: 50%;
-		transform: translateX(-50%);
-	}
-	.bg-active{
-		width:40rpx;
-	}
-	:deep(.wd-tabs.is-slide .wd-tabs__nav-item){
-		padding:0 12px !important;
-	}
+.dots {
+  bottom: 20rpx;
+  left: 50%;
+  transform: translateX(-50%);
+}
+.bg-active {
+  width: 40rpx;
+}
+:deep(.wd-tabs.is-slide .wd-tabs__nav-item) {
+  padding: 0 12px !important;
+}
 </style>

+ 1 - 1
packages/app/src/pages-sub/home/study-tour/index.vue

@@ -173,7 +173,7 @@ onShow(async () => {
       </div>
     </card> -->
     <card custom-class="">
-      <div class="my-7.5 text-black text-xl font-normal font-['PingFang_SC'] leading-[10.18px]">
+      <div class="my-10px text-black text-xl fw-500 font-['PingFang_SC'] leading-[10.18px]">
         筑巢荟-设计游学
       </div>
       <div

+ 4 - 3
packages/app/src/pages-sub/mine/honors/detail/collection.vue

@@ -11,11 +11,11 @@ import NavbarEvo from '@/components/navbar-evo.vue'
 import { getCollectionBadge } from '../../../../core/libs/requests'
 import { Collection, CollectionDetail } from '../../../../core/libs/models'
 import { NetImages } from '../../../../core/libs/net-images'
-import dayjs from 'dayjs'
 
 const id = ref<string | number>()
+const badgeId = ref<string | number>()
 const { data: collectionBadges, run: setCollectionBadges } = useRequest(
-  () => getCollectionBadge({ badgeId: id.value }),
+  () => getCollectionBadge({ badgeId: badgeId.value, userId: id.value }),
   {
     initialData: {
       badgeList: [],
@@ -49,9 +49,10 @@ const data = ref<CollectionDetail>({
   userSize: '',
   badgeSize: '',
 })
-onLoad(async (query: Record<string | 'id', string>) => {
+onLoad(async (query: Record<string | 'id' | 'badgeId', string>) => {
   if (query?.id) {
     id.value = query.id
+    badgeId.value = query.badgeId
     await setCollectionBadges()
     data.value = collectionBadges.value
     console.log('data', data.value)

+ 1 - 16
packages/app/src/pages-sub/mine/honors/index.vue

@@ -83,7 +83,7 @@ const save = async (filePath: string) => {
 
 const handleGetCondition = (badge: any) => {
   uni.navigateTo({
-    url: `/pages-sub/mine/honors/detail/collection?id=${badge}`,
+    url: `/pages-sub/mine/honors/detail/collection?badgeId=${badge}&id=${id.value}`,
   })
 }
 
@@ -161,11 +161,6 @@ onLoad(async (query?: Record<string | 'active' | 'id' | 'isShared', string>) =>
       </div>
     </div>
     <NavbarEvo dark fixed transparent></NavbarEvo>
-    <!-- <wd-tabs v-model="active">
-      <template v-for="(it, i) in tabs" :key="i">
-        <wd-tab :title="it.label" :name="it.value"></wd-tab>
-      </template>
-    </wd-tabs> -->
     <div class="flex items-center justify-around">
       <template v-for="(it, i) in tabs" :key="i">
         <div class="flex flex-col items-center gap-1" @click="active = it.value">
@@ -194,15 +189,6 @@ onLoad(async (query?: Record<string | 'active' | 'id' | 'isShared', string>) =>
                     )
                   "
                 >
-                  <!-- <wd-img
-                    width="90"
-                    height="90"
-                    :src="
-                      item.userSize === item.badgeSize
-                        ? item.badgeYesObtainedImage
-                        : item.badgeNotObtainedImage
-                    "
-                  ></wd-img> -->
                   <wd-img width="90" height="90" :src="item.badgeYesObtainedImage"></wd-img>
                 </div>
                 <div class="row-start-1 col-start-2 flex items-center justify-between">
@@ -308,7 +294,6 @@ onLoad(async (query?: Record<string | 'active' | 'id' | 'isShared', string>) =>
               </div>
             </template>
           </div>
-          <!-- {{ it }} -->
         </Card>
       </template>
     </template>

+ 0 - 11
packages/app/src/pages/home/index.vue

@@ -189,21 +189,10 @@ onHide(() => {
   homeBannerRef.value?.[swiperCurrent.value]?.videoContext.pause()
 })
 onShareAppMessage(shareAppMessage)
-// onShareTimeline(async ({from, target}) => {
-//   const res: Page.ShareTimelineContent = {}
-//   if (from === 'button') {
-//     // await shareCircle(target.dataset.options.id)
-//     // res.path = `/pages-sub/home/moment/index?id=${target.dataset.options.id}&isShared=true`
-//   }
-//   return res
-// })
 </script>
 
 <template>
   <view class="">
-    <!-- <view class="official">
-		<official-account @load="offLoad" @error="offError"></official-account>
-	</view>  -->
     <view class="bg-black w-full relative aspect-[1.26/1]">
       <swiper :autoplay="autoplay" @change="handleSwiperChange">
         <template

+ 18 - 67
packages/app/src/pages/material/detail/index.vue

@@ -18,6 +18,7 @@ import router from '@designer-hub/assets/src/assets/svgs/router'
 import { isVideoUrl } from 'wot-design-uni/components/common/util'
 import { useUserStore } from '@/store'
 import { AnalysisEventType, useAnalysis } from '@/composables/analysis'
+import BottomAppBar from '@/components/bottom-app-bar.vue'
 import { usePermissions } from '@/composables/permissions'
 const dealerPanelState = ref(false)
 const { clickByPermission } = usePermissions()
@@ -126,7 +127,7 @@ onShareTimeline(() => ({
     <NavbarEvo transparent></NavbarEvo>
     <div class="flex flex-col gap-6 relative top--14 px-3.5">
       <Card>
-        <div class="flex flex-col gap-4">
+        <div class="flex flex-col gap-3">
           <div class="flex gap-5">
             <wd-img
               round
@@ -135,28 +136,14 @@ onShareTimeline(() => ({
               custom-class="border border-[#f2f2f2] border-solid"
               :src="data?.logoUrl"
             ></wd-img>
-            <div class="flex flex-col gap-2.5">
-              <div class="flex gap-2 items-center">
+            <div class="flex flex-col gap-1.5">
+              <div class="flex gap-1 items-center">
                 <div class="text-black/90 text-lg font-normal font-['PingFang_SC']">
                   <!-- IMOLA瓷砖 -->
                   {{ data?.materialsName }}
                 </div>
-
-                <!--                <div-->
-                <!--                  class="w-[52px] h-[17px] px-2 bg-[#ef4343] rounded-[3px] justify-center items-center gap-2.5 inline-flex"-->
-                <!--                >-->
-                <!--                  <div-->
-                <!--                    class="text-white text-[10px] font-normal font-['PingFang_SC'] leading-normal"-->
-                <!--                  >-->
-                <!--                    &lt;!&ndash; 自营品牌 &ndash;&gt;-->
-                <!--                    {{-->
-                <!--                      materialBrandLevels.find(({ value }) => value === String(data.materialsType))-->
-                <!--                        ?.label-->
-                <!--                    }}-->
-                <!--                  </div>-->
-                <!--                </div>-->
               </div>
-              <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[10.18px]">
+              <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[10px]">
                 {{
                   materialBrandTypes.find(({ value }) => value === String(data?.brandType))?.label
                 }}
@@ -167,13 +154,11 @@ onShareTimeline(() => ({
                 }}
               </div>
               <div>
-                <span
-                  class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[10.18px]"
-                >
+                <span class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[10px]">
                   经营品牌:
                 </span>
                 <span
-                  class="text-black/40 text-xs font-normal font-['PingFang_SC'] uppercase leading-[10.18px]"
+                  class="text-black/40 text-xs font-normal font-['PingFang_SC'] uppercase leading-[10px]"
                 >
                   <!-- imola / chedit -->
                   {{
@@ -182,26 +167,6 @@ onShareTimeline(() => ({
                   }}
                 </span>
               </div>
-              <!--              <div class="flex gap-2.5">-->
-              <!--                <div-->
-              <!--                  class="w-[77px] h-5 px-2 py-px bg-neutral-100 rounded-[3px] justify-center items-center gap-2.5 inline-flex"-->
-              <!--                >-->
-              <!--                  <div-->
-              <!--                    class="text-black/60 text-[10px] font-normal font-['PingFang_SC'] leading-normal"-->
-              <!--                  >-->
-              <!--                    积分比例:{{ data?.pointsExchangeRate }}%-->
-              <!--                  </div>-->
-              <!--                </div>-->
-              <!--                <div-->
-              <!--                  class="w-[92px] h-5 px-2 py-px bg-neutral-100 rounded-[3px] justify-center items-center gap-2.5 inline-flex"-->
-              <!--                >-->
-              <!--                  <div-->
-              <!--                    class="text-black/60 text-[10px] font-normal font-['PingFang_SC'] leading-normal"-->
-              <!--                  >-->
-              <!--                    门店打卡:{{ data?.clockPoints }}积分-->
-              <!--                  </div>-->
-              <!--                </div>-->
-              <!--              </div>-->
             </div>
           </div>
           <template
@@ -260,20 +225,13 @@ onShareTimeline(() => ({
             v-if="(materialHomePageData.brandAdvantageUrl ?? '') !== ''"
             class="rounded-2xl overflow-hidden aspect-[1.72/1] whitespace-pre-wrap"
           >
-            <!-- <wd-img
-              width="100%"
-              height="100%"
-              :src="materialHomePageData.brandAdvantageUrl"
-              mode="aspectFill"
-              custom-class=""
-            ></wd-img> -->
             <template v-if="isVideoUrl(materialHomePageData.brandAdvantageUrl)">
-              <video class="w-full h-full" :src="materialHomePageData.brandAdvantageUrl"></video>
+              <video class="w-full h-194px" :src="materialHomePageData.brandAdvantageUrl"></video>
             </template>
             <template v-else>
               <wd-img
                 width="100%"
-                height="100%"
+                height="194"
                 :src="materialHomePageData.brandAdvantageUrl"
                 mode="aspectFill"
                 custom-class=""
@@ -328,22 +286,15 @@ onShareTimeline(() => ({
           </div>
         </div>
       </template>
-
-      <!-- <wd-button
-        custom-class="w-full! rounded-lg!"
-        :disabled="(data?.agreementFileUrl ?? '') === ''"
-        :loading="downloading"
-        @click="clickByPermission('download', () => handleDownload())"
-      >
-        {{ downloading ? '下载中...' : '下载所有素材包' }}
-      </wd-button> -->
-      <wd-button
-        custom-class="w-full! rounded-lg!"
-        :disabled="(data?.agreementFileUrl ?? '') === ''"
-        @click="clickByPermission('download', () => (dealerPanelState = true))"
-      >
-        下载所有素材包
-      </wd-button>
+      <BottomAppBar fixed>
+        <wd-button
+          custom-class="w-full! rounded-lg!"
+          :disabled="(data?.agreementFileUrl ?? '') === ''"
+          @click="clickByPermission('download', () => (dealerPanelState = true))"
+        >
+          下载所有素材包
+        </wd-button>
+      </BottomAppBar>
     </div>
     <wd-overlay :show="dealerPanelState" @click="dealerPanelState = false">
       <view class="wrapper flex flex-col justify-end h-full">

+ 8 - 23
packages/app/src/pages/messages/components/message-card.vue

@@ -109,37 +109,23 @@ onMounted(async () => {
 
       <div class="row-start-1 col-start-2 text-start relative">
         <div class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-[30px]">
-          <!--          {{-->
-          <!--            String(options.messageSubType) === '5'-->
-          <!--              ? getMessageType(options.messageSubType)?.desc-->
-          <!--              : options.title-->
-          <!--          }}-->
           {{ options.title }}
         </div>
       </div>
 
-      <div class="row-start-1 col-start-3 text-end" style="white-space: nowrap">
-        <div class="text-black/30 text-sm font-normal font-['PingFang_SC'] leading-[8.18px]">
-          <template v-if="String(options.isRead) === '0'">
-            <wd-img width="16" height="16" src="/static/svgs/red.svg"></wd-img>
-          </template>
+      <div
+        class="row-start-1 col-start-3 text-right text-black/30 flex items-center justify-center"
+        style="white-space: nowrap"
+      >
+        <template v-if="String(options.isRead) === '0'">
+          <wd-img width="16" height="16" src="/static/svgs/red.svg"></wd-img>
+        </template>
+        <div>
           {{ beforeNow(dayjs(options.createTime).toDate()) }}
-          <!--          <div class="absolute top-[2px] right-[50px] z-10">-->
-          <!--            <wd-img width="16" height="20" src="/static/svgs/red.svg"></wd-img>-->
-          <!--          </div>-->
-          <!--          <wd-img width="16" height="10" src="/static/svgs/red.svg"></wd-img>-->
         </div>
       </div>
       <div class="row-start-2 col-start-2 col-end-4">
         <div class="my-3 text-black/40 text-sm font-normal font-['PingFang_SC'] leading-[25px]">
-          <!-- {{ options.detailBody }} -->
-          <!--          <div-->
-          <!--            v-if="-->
-          <!--              [MessageType.Integral, MessageType.System].includes(options.messageType) &&-->
-          <!--              String(options.messageSubType) !== '5'-->
-          <!--            "-->
-          <!--            v-html="options.detailBody"-->
-          <!--          ></div>-->
           <div v-if="String(options.messageSubType) !== '5'" v-html="options.detailBody"></div>
           <div class="grid grid-cols-[auto_1fr] gap-x-1 gap-y-4.5">
             <template
@@ -161,7 +147,6 @@ onMounted(async () => {
                   class="text-sm font-normal font-['PingFang_SC']"
                   :class="`${options.availableCouponsNum > 0 ? 'text-[#ef4343]' : 'text-black/60'}`"
                 >
-                  <!--                  {{ `${coupons.length > 0 ? `${coupons.length}张可用` : '无可用'}` }}-->
                   {{ couponSelectText }}
                 </div>
                 <div class="h-5.5 flex items-center overflow-hidden">

+ 18 - 0
packages/merchant/README.md

@@ -26,3 +26,21 @@
 - web平台: `pnpm build:h5`,打包后的文件在 `dist/build/h5`,可以放到web服务器,如nginx运行。如果最终不是放在根目录,可以在 `manifest.config.ts` 文件的 `h5.router.base` 属性进行修改。
 - weixin平台:`pnpm build:mp-weixin`, 打包后的文件在 `dist/build/mp-weixin`,然后通过微信开发者工具导入,并点击右上角的“上传”按钮进行上传。
 - APP平台:`pnpm build:app`, 然后打开 `HBuilderX`,导入刚刚生成的`dist/build/app` 文件夹,选择发行 - APP云打包。
+
+## 📝 配置
+
+```
+"mp-weixin": {
+    "appid": "wxfbe1df95a05d1912",
+    "setting": {
+      "urlCheck": false
+    },
+    "usingComponents": true,
+    "requiredPrivateInfos": ["chooseLocation", "getLocation", "chooseAddress"],
+    "permission": {
+      "scope.userLocation": {
+        "desc": "你的位置信息将用于小程序位置接口的效果展示"
+      }
+    }
+  },
+```