Browse Source

分包2期

purui 2 months ago
parent
commit
875872f3bd

+ 41 - 32
packages/app/src/pages-sub/home/mall/detail/index.vue

@@ -1,34 +1,34 @@
 <route lang="json5">
 {
-style: {
-navigationBarTitleText: '品质商城',
-navigationBarBackgroundColor: '#fff',
-},
+  style: {
+    navigationBarTitleText: '品质商城',
+    navigationBarBackgroundColor: '#fff',
+  },
 }
 </route>
 
 <script setup lang="ts">
-import {useRouter} from '../../../../core/utils/router'
-import {createProductItemBuy, getProduct, productPlacing} from '../../../../core/libs/requests'
-import {requestToast} from '../../../../core/utils/common'
-import {useUserStore} from '../../../../store'
-import {storeToRefs} from 'pinia'
+import { useRouter } from '../../../../core/utils/router'
+import { createProductItemBuy, getProduct, productPlacing } from '../../../../core/libs/requests'
+import { requestToast } from '../../../../core/utils/common'
+import { useUserStore } from '../../../../store'
+import { storeToRefs } from 'pinia'
 import BottomAppBar from '@/components/bottom-app-bar.vue'
 import ButtonEvo from '@/components/button-evo.vue'
-import {usePermissions} from '../../../../composables/permissions'
+import { usePermissions } from '../../../../composables/permissions'
 import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html.vue'
-import {useToast} from 'wot-design-uni'
+import { useToast } from 'wot-design-uni'
 
 const toast = useToast()
-const {clickByPermission} = usePermissions()
+const { clickByPermission } = usePermissions()
 const userStore = useUserStore()
 const router = useRouter()
-const {userInfo} = storeToRefs(userStore)
+const { userInfo } = storeToRefs(userStore)
 const id = ref()
 const show = ref(false)
 const nums = ref(1)
 const type = ref<'add2Cart' | 'orderNow'>()
-const {data, run: setData} = useRequest(() => getProduct(id.value))
+const { data, run: setData } = useRequest(() => getProduct(id.value))
 
 const handleConfirm = async () => {
   // 积分
@@ -50,7 +50,7 @@ const handleConfirm = async () => {
       ],
       couponList: [],
     }
-    const {data: res, code} = await requestToast(() => productPlacing(body))
+    const { data: res, code } = await requestToast(() => productPlacing(body))
     if (code !== 0) return
     await router.push(`/pages-sub/home/mall/confirm-order/index?data=${JSON.stringify(body)}`)
   }
@@ -67,7 +67,7 @@ const handleConfirm = async () => {
             },
           ],
         }),
-      {success: true, successTitle: '加入购物车成功'},
+      { success: true, successTitle: '加入购物车成功' },
     )
     show.value = false
   }
@@ -75,19 +75,19 @@ const handleConfirm = async () => {
 
 const handleClick = (product) => {
   if (product?.isRestrict === 1 && product?.productRepertory === 0) {
-    toast.show("库存不足")
+    toast.show('库存不足')
     return null
   }
-  let levelIds = product.memberLevelIds.split(",");
+  const levelIds = product.memberLevelIds.split(',')
   if (!levelIds.includes(String(userInfo.value.level.level))) {
-    toast.show("您当前会员等级不符合兑换条件")
+    toast.show('您当前会员等级不符合兑换条件')
     return null
   }
   // 否则,执行原来的点击逻辑
   clickByPermission('mallExchange', () => {
-    show.value = true;
-    type.value = 'orderNow';
-  });
+    show.value = true
+    type.value = 'orderNow'
+  })
 }
 onLoad(async (query: { id: string }) => {
   id.value = query.id
@@ -138,7 +138,7 @@ onShareTimeline(() => ({
           class="w-[66px] text-black/30 text-xs font-normal font-['PingFang_SC'] leading-3"
         >
           <!-- ¥60 -->
-          <span style="text-decoration: line-through;">¥{{ data?.productPrice }}</span>
+          <span style="text-decoration: line-through">¥{{ data?.productPrice }}</span>
         </div>
         <div class="flex-1"></div>
         <template v-if="String(data?.needPoints) !== '1'">
@@ -155,7 +155,9 @@ onShareTimeline(() => ({
       <div class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-normal">
         积分兑换说明:
       </div>
-      <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[23px]">
+      <div
+        class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[23px] whitespace-pre-wrap"
+      >
         {{ data?.exchangeDesc }}
         <!--        · 不限制兑换个数-->
         <!--        <br />-->
@@ -192,7 +194,12 @@ onShareTimeline(() => ({
             <ButtonEvo
               block
               size="lg"
-              :disabled="(data?.isRestrict === 1 && data?.productRepertory == 0) || (!data?.memberLevelIds.split(',').includes(String(userInfo.level.level))) ? 'isDisabled': null"
+              :disabled="
+                (data?.isRestrict === 1 && data?.productRepertory == 0) ||
+                !data?.memberLevelIds.split(',').includes(String(userInfo.level.level))
+                  ? 'isDisabled'
+                  : null
+              "
               @click="handleClick(data)"
             >
               立即兑换
@@ -222,13 +229,15 @@ onShareTimeline(() => ({
               <div class="flex-1"></div>
               <wd-input-number
                 v-model="nums"
-                :max="data?.isRestrict === 1 && data?.purchaseLimit
-    ? Math.min(data?.purchaseQuantity, data?.productRepertory)
-    : data?.isRestrict === 1 && !data?.purchaseLimit
-    ? data?.productRepertory
-    : data?.isRestrict === 2 && data?.purchaseLimit
-    ? data?.purchaseQuantity
-    : 100"
+                :max="
+                  data?.isRestrict === 1 && data?.purchaseLimit
+                    ? Math.min(data?.purchaseQuantity, data?.productRepertory)
+                    : data?.isRestrict === 1 && !data?.purchaseLimit
+                      ? data?.productRepertory
+                      : data?.isRestrict === 2 && data?.purchaseLimit
+                        ? data?.purchaseQuantity
+                        : 100
+                "
               />
             </div>
           </div>

+ 3 - 1
packages/app/src/pages-sub/home/offline-activity/list/index.vue

@@ -29,13 +29,14 @@ onShareTimeline(() => ({
 </script>
 <template>
   <div class="flex-grow flex flex-col gap-6 mx-3.5">
-    <div class="mx--3.5">
+    <div class="mx--3.5 fixed left-4 w-full bg-white z-10">
       <wd-tabs v-model="tab" custom-class="" :slidable-num="4">
         <block v-for="(it, item) in tabs" :key="item">
           <wd-tab :title="it.label"></wd-tab>
         </block>
       </wd-tabs>
     </div>
+    <div class="mt-[50px]">
     <PageHelper
       v-if="tabs.length"
       :request="getActivities"
@@ -143,5 +144,6 @@ onShareTimeline(() => ({
         </div>
       </template>
     </PageHelper>
+    </div>
   </div>
 </template>

+ 32 - 9
packages/app/src/pages-sub/home/spread/product-detail/index.vue

@@ -58,7 +58,7 @@ const handleConfirm = async () => {
     } else {
       await router.push(`/pages-sub/home/mall/confirm-order/index?data=${JSON.stringify(body)}`)
     }
-    // router.push(`/pages-sub/home/mall/confirm-order/index?data=${JSON.stringify(res)}`)
+    // router.push(`/pages/home/mall/confirm-order/index?data=${JSON.stringify(res)}`)
   }
 }
 onLoad(async (query: { id: string; title: string; item: string }) => {
@@ -134,33 +134,56 @@ onShareTimeline(() => ({
       <div class="absolute aspect-[1.26/1] top-0 w-full">
         <!--        <wd-img width="100%" height="100%" :src="data?.productDetailsImgUrl" />-->
         <swiper>
-          <template v-for="(it, index) in data?.productDetailsImgUrl?.split(',')" :key="index">
-            <swiper-item>
-              <wd-img width="100%" height="100%" mode="aspectFill" :src="it" />
-            </swiper-item>
-          </template>
+<!--          <template v-for="(it, index) in data?.productDetailsImgUrl?.split(',')" :key="index">-->
+<!--            <swiper-item>-->
+<!--              <wd-img width="100%" height="100%" mode="aspectFill" :src="it" />-->
+<!--            </swiper-item>-->
+<!--          </template>-->
+          <wd-swiper
+            custom-class="rounded-1xl overflow-hidden aspect-[1.29/1]"
+            width="100%"
+            height="100%"
+            :list="data?.productDetailsImgUrl?.split(',')"
+            autoplay
+            v-model:current="current"
+            :indicator="{ type: 'dots-bar' } as any"
+            @click="handleClick"
+          ></wd-swiper>
         </swiper>
       </div>
     </div>
     <div class="relative flex-1 bg-white p-7 flex flex-col gap-6 rounded-tl-2xl rounded-tr-2xl">
       <div
         v-if="String(data?.needPoints) === '1'"
-        class="text-black text-xl font-normal font-['PingFang_SC'] leading-[10.18px] mr-1"
+        class="text-black/60 text-base font-normal font-['PingFang_SC'] leading-4"
       >
-        {{ data?.points }}折
+        <span style="color: red;">{{ data?.points }}</span> 
       </div>
       <div class="flex">
         <div class="text-black text-xl font-normal font-['PingFang_SC'] leading-[10.18px]">
           {{ data?.prodcutName }}
         </div>
       </div>
-      <div class="text-black/60 text-sm font-normal font-['PingFang_SC']">
+      <div class="h-0.25 bg-[#f6f6f6]"></div>
+      <div class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-normal">
+        兑换说明:
+      </div>
+      <div class="text-black/60 text-sm font-normal font-['PingFang_SC'] whitespace-pre-wrap">
         {{ data?.exchangeDesc }}
       </div>
+
       <!--      <div-->
       <!--        class="text-justify text-black/40 text-base font-normal font-['PingFang_SC'] leading-relaxed"-->
       <!--        v-html="data?.contentDesc"-->
       <!--      ></div>-->
+      <div class="mx--4 h-2.5 bg-neutral-100"></div>
+      <wd-divider>
+        <div
+          class="text-center text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal"
+        >
+          商品详情
+        </div>
+      </wd-divider>
       <mpHtml :content="data?.contentDesc"></mpHtml>
     </div>
 

+ 19 - 3
packages/app/src/pages-sub/mine/homepage/index.vue

@@ -35,6 +35,9 @@ import ImageEvo from '@/components/image-evo.vue'
 import more from '@designer-hub/assets/src/libs/assets/more'
 import qrCode from '@designer-hub/assets/src/libs/assets/qrCode'
 import { useShare } from '@/composables/share'
+import { useMemberLevelsStore } from '../../../store/member-levles'
+const memberLevelsStore = useMemberLevelsStore()
+const { getMemberAvatarFrame } = memberLevelsStore
 
 const { features, clickByPermission } = usePermissions()
 const { shareAppMessage } = useShare()
@@ -181,12 +184,19 @@ defineExpose({
       <div class="absolute bottom-0 left-0 right-0">
         <div class="bg-gradient-to-t from-black to-transparent">
           <div class="flex min-h-27 px-3.5 gap-3.5">
-            <div class="w-18 h-18 border-white border border-solid rounded-full overflow-hidden">
+            <div class="relative">
               <wd-img
-                width="100%"
-                height="100%"
+                :width="72"
+                :height="72"
                 :src="memberInfo?.avatar || NetImages.DefaultAvatar"
               ></wd-img>
+			  <wd-img
+			    v-if="getMemberAvatarFrame(memberInfo?.levelId)"
+			    custom-class="vertical-bottom absolute! level-circle"
+			    :width="79"
+			    :height="82"
+			    :src="getMemberAvatarFrame(memberInfo?.levelId) || ''"
+			  ></wd-img>
             </div>
             <div class="pb-8 flex-1 overflow-hidden">
               <div class="flex items-center justify-between">
@@ -414,3 +424,9 @@ defineExpose({
     </BottomAppBar>
   </div>
 </template>
+<style scoped>
+	:deep(.level-circle){
+		top: -20rpx;
+		left:-10rpx;
+	}
+</style>

+ 4 - 3
packages/app/src/pages-sub/mine/homepage/statistics/index.vue

@@ -8,13 +8,14 @@ import {
   getBrowseHistories,
   getReserveHistory,
   countThisYear,
-} from '../../../../core/libs/requests'
-import { useUserStore } from '../../../../store'
+} from '@/core/libs/requests'
+import { useUserStore } from '@/store'
 import { storeToRefs } from 'pinia'
 import Card from '@/components/card.vue'
 import PageHelper from '@/components/page-helper.vue'
 import dayjs from 'dayjs'
 import PageHelperEvo from '@/components/page-helper-evo.vue'
+import { secondToMinute } from '@/utils/date-util'
 
 const userStore = useUserStore()
 const { userInfo } = storeToRefs(userStore)
@@ -158,7 +159,7 @@ onMounted(async () => {
                   <div
                     class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal"
                   >
-                    浏览时长:{{ (Number(it.duration) / 60).toFixed(2) }}分钟
+                    浏览时长:{{ secondToMinute(it.duration) }}
                   </div>
                 </div>
                 <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal">

+ 0 - 32
packages/app/src/pages.json

@@ -635,38 +635,6 @@
         "navigationBarTitleText": "详情",
         "navigationBarBackgroundColor": "#fff"
       }
-    },
-    {
-      "path": "pages/home/mall/detail/index",
-      "type": "page",
-      "style": {
-        "navigationBarTitleText": "品质商城",
-        "navigationBarBackgroundColor": "#fff"
-      }
-    },
-    {
-      "path": "pages/home/offline-activity/list/index",
-      "type": "page",
-      "style": {
-        "navigationBarTitleText": "线下活动",
-        "navigationBarBackgroundColor": "#fff"
-      }
-    },
-    {
-      "path": "pages/home/spread/product-detail/index",
-      "type": "page",
-      "style": {
-        "navigationBarTitleText": "",
-        "navigationBarBackgroundColor": "#fff"
-      }
-    },
-    {
-      "path": "pages/mine/homepage/statistics/index",
-      "type": "page",
-      "style": {
-        "navigationBarTitleText": "主页数据",
-        "navigationBarBackgroundColor": "#fff"
-      }
     }
   ]
 }

+ 0 - 251
packages/app/src/pages/home/mall/detail/index.vue

@@ -1,251 +0,0 @@
-<route lang="json5">
-{
-  style: {
-    navigationBarTitleText: '品质商城',
-    navigationBarBackgroundColor: '#fff',
-  },
-}
-</route>
-
-<script setup lang="ts">
-import { useRouter } from '../../../../core/utils/router'
-import { createProductItemBuy, getProduct, productPlacing } from '../../../../core/libs/requests'
-import { requestToast } from '../../../../core/utils/common'
-import { useUserStore } from '../../../../store'
-import { storeToRefs } from 'pinia'
-import BottomAppBar from '@/components/bottom-app-bar.vue'
-import ButtonEvo from '@/components/button-evo.vue'
-import { usePermissions } from '../../../../composables/permissions'
-import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html.vue'
-import { useToast } from 'wot-design-uni'
-
-const toast = useToast()
-const { clickByPermission } = usePermissions()
-const userStore = useUserStore()
-const router = useRouter()
-const { userInfo } = storeToRefs(userStore)
-const id = ref()
-const show = ref(false)
-const nums = ref(1)
-const type = ref<'add2Cart' | 'orderNow'>()
-const { data, run: setData } = useRequest(() => getProduct(id.value))
-
-const handleConfirm = async () => {
-  // 积分
-  const points = data.value?.showFavourable ? data.value?.favourablePoints : data.value?.points
-  if (type.value === 'orderNow') {
-    const body = {
-      isShoppingCart: 0,
-      userId: userInfo.value.userId,
-      item: 3,
-      list: [
-        {
-          productId: id.value,
-          points,
-          nums: nums.value,
-          productName: data.value.prodcutName,
-          orderImgUrl: data.value.productCoverImgUrl,
-          vendorId: data.value.vendorId,
-        },
-      ],
-      couponList: [],
-    }
-    const { data: res, code } = await requestToast(() => productPlacing(body))
-    if (code !== 0) return
-    await router.push(`/pages/home/mall/confirm-order/index?data=${JSON.stringify(body)}`)
-  }
-  if (type.value === 'add2Cart') {
-    await requestToast(
-      () =>
-        createProductItemBuy({
-          doList: [
-            {
-              userId: userInfo.value.userId,
-              productId: data.value?.productId || '',
-              points,
-              nums: nums.value,
-            },
-          ],
-        }),
-      { success: true, successTitle: '加入购物车成功' },
-    )
-    show.value = false
-  }
-}
-
-const handleClick = (product) => {
-  if (product?.isRestrict === 1 && product?.productRepertory === 0) {
-    toast.show('库存不足')
-    return null
-  }
-  const levelIds = product.memberLevelIds.split(',')
-  if (!levelIds.includes(String(userInfo.value.level.level))) {
-    toast.show('您当前会员等级不符合兑换条件')
-    return null
-  }
-  // 否则,执行原来的点击逻辑
-  clickByPermission('mallExchange', () => {
-    show.value = true
-    type.value = 'orderNow'
-  })
-}
-onLoad(async (query: { id: string }) => {
-  id.value = query.id
-  await setData()
-})
-onShareAppMessage(() => ({
-  title: data.value?.prodcutName,
-}))
-onShareTimeline(() => ({
-  title: data.value?.prodcutName,
-}))
-</script>
-
-<template>
-  <view class="flex-grow flex flex-col">
-    <div class="aspect-[1.34/1] relative">
-      <div class="absolute aspect-[1.26/1] top-0 w-full">
-        <swiper>
-          <wd-swiper
-            custom-class="rounded-1xl overflow-hidden aspect-[1.29/1]"
-            width="100%"
-            height="100%"
-            :list="data?.productDetailsImgUrl?.split(',')"
-            autoplay
-            v-model:current="current"
-            :indicator="{ type: 'dots-bar' } as any"
-            @click="handleClick"
-          ></wd-swiper>
-        </swiper>
-      </div>
-    </div>
-    <div class="relative flex-1 bg-white p-4 flex flex-col gap-4 rounded-tl-2xl rounded-tr-2xl">
-      <div class="flex items-end gap-1">
-        <div class="text-[#ef4343] text-[26px] font-normal font-['D-DIN_Exp'] leading-[20px]">
-          <!-- 1000 -->
-          {{ data?.showFavourable ? data?.favourablePoints : data?.points }}
-        </div>
-        <template v-if="String(data?.needPoints) === '0'">
-          <div class="text-black/60 text-base font-normal font-['PingFang_SC'] leading-4">积分</div>
-        </template>
-        <template v-if="String(data?.needPoints) === '1'">
-          <div class="text-black/60 text-base font-normal font-['PingFang_SC'] leading-4">
-            折(积分结算)
-          </div>
-        </template>
-        <div
-          v-if="Number(data?.productPrice)"
-          class="w-[66px] text-black/30 text-xs font-normal font-['PingFang_SC'] leading-3"
-        >
-          <!-- ¥60 -->
-          <span style="text-decoration: line-through">¥{{ data?.productPrice }}</span>
-        </div>
-        <div class="flex-1"></div>
-        <template v-if="String(data?.needPoints) !== '1'">
-          <div class="text-[#999999] text-xs font-normal font-['PingFang_SC']">
-            {{ data?.isRestrict === 0 ? '不限库存' : `库存:${data?.productRepertory || 0}` }}
-          </div>
-        </template>
-      </div>
-      <div class="text-black text-xl font-normal font-['PingFang_SC']">
-        <!-- 阿芙佳朵 -->
-        {{ data?.prodcutName }}
-      </div>
-      <div class="h-0.25 bg-[#f6f6f6]"></div>
-      <div class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-normal">
-        积分兑换说明:
-      </div>
-      <div
-        class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[23px] whitespace-pre-wrap"
-      >
-        {{ data?.exchangeDesc }}
-        <!--        · 不限制兑换个数-->
-        <!--        <br />-->
-        <!--        · 兑换后不支持退换货,如有问题可联系官方客户-->
-        <!--        <br />-->
-        <!--        · 规格:件-->
-        <!--        <br />-->
-        <!--        · 配送方式:到店自取-->
-      </div>
-      <div class="mx--4 h-2.5 bg-neutral-100"></div>
-      <wd-divider>
-        <div
-          class="text-center text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal"
-        >
-          商品详情
-        </div>
-      </wd-divider>
-      <mpHtml :content="data?.contentDesc"></mpHtml>
-    </div>
-    <template v-if="String(data?.needPoints) === '0'">
-      <BottomAppBar fixed placeholder>
-        <div class="h-[63px] bg-white backdrop-blur-[20px] flex items-center justify-between gap-2">
-          <div class="flex-1">
-            <ButtonEvo
-              block
-              color="white"
-              location="right"
-              @click="((show = true), (type = 'add2Cart'))"
-            >
-              <span class="text-black/80">加入购物车</span>
-            </ButtonEvo>
-          </div>
-          <div class="flex-1">
-            <ButtonEvo
-              block
-              size="lg"
-              :disabled="
-                (data?.isRestrict === 1 && data?.productRepertory == 0) ||
-                !data?.memberLevelIds.split(',').includes(String(userInfo.level.level))
-                  ? 'isDisabled'
-                  : null
-              "
-              @click="handleClick(data)"
-            >
-              立即兑换
-            </ButtonEvo>
-          </div>
-        </div>
-      </BottomAppBar>
-    </template>
-    <wd-action-sheet v-model="show">
-      <view class="px-7 py-11">
-        <div class="flex gap-3 mb-13.5">
-          <div class="w-[110px] h-[110px] bg-[#f6f6f6] rounded-2xl">
-            <wd-img width="100%" height="100%" :src="data?.productCoverImgUrl"></wd-img>
-          </div>
-          <div class="flex flex-col justify-between flex-1">
-            <div class="text-black/40 text-base font-normal font-['PingFang_SC'] leading-normal">
-              {{ data?.prodcutName }}
-            </div>
-            <div class="flex items-end gap-1">
-              <div class="text-[#ef4343] text-[22px] font-normal font-['D-DIN_Exp'] leading-4">
-                <!--                {{ data?.points }}-->
-                {{ data?.showFavourable ? data?.favourablePoints : data?.points }}
-              </div>
-              <div class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-3">
-                积分
-              </div>
-              <div class="flex-1"></div>
-              <wd-input-number
-                v-model="nums"
-                :max="
-                  data?.isRestrict === 1 && data?.purchaseLimit
-                    ? Math.min(data?.purchaseQuantity, data?.productRepertory)
-                    : data?.isRestrict === 1 && !data?.purchaseLimit
-                      ? data?.productRepertory
-                      : data?.isRestrict === 2 && data?.purchaseLimit
-                        ? data?.purchaseQuantity
-                        : 100
-                "
-              />
-            </div>
-          </div>
-        </div>
-        <wd-button block :round="false" @click="handleConfirm">确认</wd-button>
-      </view>
-    </wd-action-sheet>
-  </view>
-</template>
-
-<style scoped lang="scss"></style>

+ 0 - 149
packages/app/src/pages/home/offline-activity/list/index.vue

@@ -1,149 +0,0 @@
-<route lang="json">
-{ "style": { "navigationBarTitleText": "线下活动", "navigationBarBackgroundColor": "#fff" } }
-</route>
-<script setup lang="ts">
-import { getActivities, getByDictType } from '../../../../core/libs/requests'
-import Card from '@/components/card.vue'
-import PageHelper from '@/components/page-helper.vue'
-import TiltedButton from '@/components/tilted-button.vue'
-import { useRouter } from '../../../../core/utils/router'
-import dayjs from 'dayjs'
-import ActivityCountDown from '../../components/activity-count-down.vue'
-import { getActivityStatus, getActivityStatusButtonText } from '../../../../core/utils/common'
-import { DictType } from '../../../../core/libs/models'
-
-const tab = ref<number>(0)
-const router = useRouter()
-const { data: tabs, run: setTabs } = useRequest(() => getByDictType(DictType.MemberActivityType), {
-  initialData: [],
-})
-onMounted(async () => {
-  await setTabs()
-})
-onShareAppMessage(() => ({
-  title: '线下活动',
-}))
-onShareTimeline(() => ({
-  title: '线下活动',
-}))
-</script>
-<template>
-  <div class="flex-grow flex flex-col gap-6 mx-3.5">
-    <div class="mx--3.5 fixed left-4 w-full bg-white z-10">
-      <wd-tabs v-model="tab" custom-class="" :slidable-num="4">
-        <block v-for="(it, item) in tabs" :key="item">
-          <wd-tab :title="it.label"></wd-tab>
-        </block>
-      </wd-tabs>
-    </div>
-    <div class="mt-[50px]">
-    <PageHelper
-      v-if="tabs.length"
-      :request="getActivities"
-      :query="{ activityType: tabs[tab].value, showStatus: 1 }"
-      class="flex flex-col flex-grow"
-    >
-      <template #default="{ source }">
-        <div class="flex flex-col gap-6">
-          <template v-for="(it, index) in source.list" :key="index">
-            <!-- <offline-activity-item class="" :options="it"></offline-activity-item> -->
-            <div
-              @click="router.push(`/pages/home/activity/detail/index?id=${it.id}&type=activity`)"
-            >
-              <Card>
-                <div class="flex flex-col gap-5">
-                  <div class="flex gap-4 mb-2">
-                    <wd-img
-                      width="110px"
-                      height="88px"
-                      class="rounded-[10px]"
-                      :src="it.thumbnailUrl"
-                    ></wd-img>
-                    <div class="flex flex-col justify-between">
-                      <div
-                        class="w-[168px] text-black text-base font-normal font-['PingFang_SC'] leading-relaxed"
-                      >
-                        {{ it.name }}
-                      </div>
-                      <div class="flex">
-                        <div
-                          class="w-[70px] text-black/40 text-sm font-normal font-['PingFang_SC'] leading-[34px]"
-                        >
-                          活动时间:
-                        </div>
-                        <div
-                          class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-[34px] flex items-center"
-                        >
-                          {{ dayjs(it.activityStartTime).format('MM.DD') }}
-                          <wd-icon name="play" size="22px"></wd-icon>
-                          {{ dayjs(it.activityEndTime).format('MM.DD') }}
-                        </div>
-                      </div>
-                      <div class="flex items-end">
-                        <div
-                          class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-[34px]"
-                        >
-                          兑换积分:
-                        </div>
-                        <div
-                          class="text-[#ef4343] text-xl font-normal font-['D-DIN_Exp'] leading-[34px]"
-                        >
-                          {{ it.needPointsCount }}
-                        </div>
-                      </div>
-                    </div>
-                  </div>
-                  <view class="flex items-center justify-between mb-1.5">
-                    <view
-                      class="flex items-center text-black/40 text-sm font-normal font-['PingFang_SC'] leading-[34px]"
-                    >
-                      <!-- <wd-count-down
-                        :time="dayjs(it.applyStartTime).diff(new Date(), 'millisecond')"
-                      >
-                        <template #default="{ current }">
-                          <div class="flex items-center gap-1.25 text-black/40 text-sm">
-                            <div>距结束还剩</div>
-                            <div
-                              class="w-4 h-4 bg-black/90 rounded text-white text-2.5 flex items-center justify-center"
-                            >
-                              {{ current.days }}
-                            </div>
-                            <span class="custom-count-down-colon">天</span>
-                            <div
-                              class="w-4 h-4 bg-black/90 rounded text-white text-2.5 flex items-center justify-center"
-                            >
-                              {{ current.hours }}
-                            </div>
-                            <span class="custom-count-down-colon">时</span>
-                            <div
-                              class="w-4 h-4 bg-black/90 rounded text-white text-2.5 flex items-center justify-center"
-                            >
-                              {{ current.minutes }}
-                            </div>
-                            <span class="custom-count-down-colon">分</span>
-                          </div>
-                        </template>
-                      </wd-count-down> -->
-                      <ActivityCountDown
-                        :start-at="it.applyStartTime"
-                        :end-at="it.applyEndTime"
-                      ></ActivityCountDown>
-                    </view>
-                    <tilted-button>
-                      {{
-                        it.ifSingnUp
-                          ? '已报名'
-                          : getActivityStatusButtonText(it.applyStartTime, it.applyEndTime)
-                      }}
-                    </tilted-button>
-                  </view>
-                </div>
-              </Card>
-            </div>
-          </template>
-        </div>
-      </template>
-    </PageHelper>
-    </div>
-  </div>
-</template>

+ 0 - 241
packages/app/src/pages/home/spread/product-detail/index.vue

@@ -1,241 +0,0 @@
-<route lang="json5">
-{
-  style: {
-    navigationBarTitleText: '',
-    navigationBarBackgroundColor: '#fff',
-  },
-}
-</route>
-
-<script setup lang="ts">
-import TiltedButton from '@/components/tilted-button.vue'
-import Product from '../components/product.vue'
-import { useRouter } from '../../../../core/utils/router'
-import { getProduct, productPlacing } from '../../../../core/libs/requests'
-import { requestToast } from '../../../../core/utils/common'
-import { useUserStore } from '../../../../store'
-import { storeToRefs } from 'pinia'
-import BottomAppBar from '@/components/bottom-app-bar.vue'
-import { usePermissions } from '../../../../composables/permissions'
-import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html.vue'
-
-const userStore = useUserStore()
-const router = useRouter()
-
-const { userInfo } = storeToRefs(userStore)
-const { clickByPermission } = usePermissions()
-const id = ref()
-const show = ref(false)
-const a = ref(1)
-const item = ref()
-const type = ref<'add2Cart' | 'orderNow'>()
-const { data, run: setData } = useRequest(() => getProduct(id.value))
-
-const handleConfirm = async () => {
-  if (type.value === 'orderNow') {
-    const body = {
-      isShoppingCart: 0,
-      userId: userInfo.value.userId,
-      item: item.value,
-      list: [
-        {
-          productId: id.value,
-          points: data.value.showFavourable ? data.value.favourablePoints : data.value.points,
-          nums: 1,
-          productName: data.value.prodcutName,
-          orderImgUrl: data.value.productCoverImgUrl,
-          vendorId: data.value.vendorId,
-        },
-      ],
-      couponList: [],
-    }
-    const { data: res, code, msg } = await requestToast(() => productPlacing(body))
-    if (code !== 0) {
-      await uni.showToast({
-        title: msg,
-        icon: 'none',
-      })
-    } else {
-      await router.push(`/pages/home/mall/confirm-order/index?data=${JSON.stringify(body)}`)
-    }
-    // router.push(`/pages/home/mall/confirm-order/index?data=${JSON.stringify(res)}`)
-  }
-}
-onLoad(async (query: { id: string; title: string; item: string }) => {
-  id.value = query.id
-  item.value = query.item
-  uni.setNavigationBarTitle({ title: query.title })
-  await setData()
-})
-onShareAppMessage(() => ({
-  title: data.value?.prodcutName,
-}))
-onShareTimeline(() => ({
-  title: data.value?.prodcutName,
-}))
-</script>
-
-<template>
-  <!-- <view class="flex-grow flex flex-col">
-    <div class="aspect-[1.34/1] relative">
-      <div class="absolute aspect-[1.26/1] top-0 w-full">
-        <wd-img width="100%" height="100%" :src="data?.productCoverImgUrl" />
-      </div>
-    </div>
-    <div class="relative flex-1 bg-white p-4 flex flex-col gap-4 rounded-tl-2xl rounded-tr-2xl">
-      <div class="flex items-center gap-1">
-        <div class="text-[#ef4343] text-[26px] font-normal font-['D-DIN_Exp'] leading-normal">
-          {{ data?.points }}
-        </div>
-        <div class="text-black/60 text-base font-normal font-['PingFang_SC'] leading-[34px]">
-          积分
-        </div>
-        <div
-          class="w-[66px] text-black/30 text-xs font-normal font-['PingFang_SC'] line-through leading-normal"
-        >
-          ¥{{ data?.productPrice }}
-        </div>
-        <div class="flex-1"></div>
-        <div class="text-[#999999] text-xs font-normal font-['PingFang_SC'] leading-[10.18px]">
-          已售{{ data?.exchangeCount || 0 }}件
-        </div>
-      </div>
-      <div class="h-4 text-black text-xl font-normal font-['PingFang_SC'] leading-[10.18px]">
-        {{ data?.prodcutName }}
-      </div>
-      <div class="h-0.25 bg-[#f6f6f6]"></div>
-      <div class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-normal">
-        积分兑换说明:
-      </div>
-      <div
-        class="w-[346px] h-[95px] text-black/40 text-xs font-normal font-['PingFang_SC'] leading-[23px]"
-      >
-        · 不限制兑换个数
-        <br />
-        · 兑换后不支持退换货,如有问题可联系官方客户
-        <br />
-        · 规格:件
-        <br />
-        · 配送方式:到店自取
-      </div>
-      <div class="mx--4 h-2.5 bg-neutral-100"></div>
-      <wd-divider>
-        <div
-          class="text-center text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal"
-        >
-          商品详情
-        </div>
-      </wd-divider>
-      <wd-img width="100%" mode="widthFix" :src="data?.productDetailsImgUrl"></wd-img>
-    </div>
-  </view> -->
-  <div class="flex-grow flex flex-col">
-    <div class="aspect-[1.34/1] relative">
-      <div class="absolute aspect-[1.26/1] top-0 w-full">
-        <!--        <wd-img width="100%" height="100%" :src="data?.productDetailsImgUrl" />-->
-        <swiper>
-<!--          <template v-for="(it, index) in data?.productDetailsImgUrl?.split(',')" :key="index">-->
-<!--            <swiper-item>-->
-<!--              <wd-img width="100%" height="100%" mode="aspectFill" :src="it" />-->
-<!--            </swiper-item>-->
-<!--          </template>-->
-          <wd-swiper
-            custom-class="rounded-1xl overflow-hidden aspect-[1.29/1]"
-            width="100%"
-            height="100%"
-            :list="data?.productDetailsImgUrl?.split(',')"
-            autoplay
-            v-model:current="current"
-            :indicator="{ type: 'dots-bar' } as any"
-            @click="handleClick"
-          ></wd-swiper>
-        </swiper>
-      </div>
-    </div>
-    <div class="relative flex-1 bg-white p-7 flex flex-col gap-6 rounded-tl-2xl rounded-tr-2xl">
-      <div
-        v-if="String(data?.needPoints) === '1'"
-        class="text-black/60 text-base font-normal font-['PingFang_SC'] leading-4"
-      >
-        <span style="color: red;">{{ data?.points }}</span> 折
-      </div>
-      <div class="flex">
-        <div class="text-black text-xl font-normal font-['PingFang_SC'] leading-[10.18px]">
-          {{ data?.prodcutName }}
-        </div>
-      </div>
-      <div class="h-0.25 bg-[#f6f6f6]"></div>
-      <div class="text-black/90 text-base font-normal font-['PingFang_SC'] leading-normal">
-        兑换说明:
-      </div>
-      <div class="text-black/60 text-sm font-normal font-['PingFang_SC'] whitespace-pre-wrap">
-        {{ data?.exchangeDesc }}
-      </div>
-
-      <!--      <div-->
-      <!--        class="text-justify text-black/40 text-base font-normal font-['PingFang_SC'] leading-relaxed"-->
-      <!--        v-html="data?.contentDesc"-->
-      <!--      ></div>-->
-      <div class="mx--4 h-2.5 bg-neutral-100"></div>
-      <wd-divider>
-        <div
-          class="text-center text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal"
-        >
-          商品详情
-        </div>
-      </wd-divider>
-      <mpHtml :content="data?.contentDesc"></mpHtml>
-    </div>
-
-    <BottomAppBar fixed placeholder v-if="String(data?.needPoints) !== '1'">
-      <div
-        class="bg-white/90 backdrop-blur-[20px] flex px-10 py-2.5 border-t-1 border-t-solid border-t-[#ececec]"
-      >
-        <div class="text-[#ef4343] text-2xl font-normal font-['D-DIN_Exp'] leading-normal">
-          <!--          {{ data?.points }}-->
-          {{ data?.showFavourable ? data?.favourablePoints : data?.points }}
-        </div>
-        <div class="text-black/40 text-base font-normal font-['PingFang_SC'] leading-[34px]">
-          积分
-        </div>
-        <div class="flex-1"></div>
-        <div
-          @click="
-            clickByPermission('mallExchange', () => {
-              show = true
-              type = 'orderNow'
-            })
-          "
-        >
-          <TiltedButton size="large">立即兑换</TiltedButton>
-        </div>
-      </div>
-    </BottomAppBar>
-    <wd-action-sheet v-model="show">
-      <view class="px-7 py-11">
-        <div class="flex gap-3 mb-13.5">
-          <div class="w-[110px] h-[110px] bg-[#f6f6f6] rounded-2xl">
-            <wd-img width="100%" height="100%" :src="data?.productCoverImgUrl"></wd-img>
-          </div>
-          <div class="flex flex-col justify-between flex-1">
-            <div class="text-black/40 text-base font-normal font-['PingFang_SC'] leading-normal">
-              {{ data?.prodcutName }}
-            </div>
-            <div class="flex items-center">
-              <div class="text-[#ef4343] text-[22px] font-normal font-['D-DIN_Exp'] leading-normal">
-                {{ data?.showFavourable ? data?.favourablePoints : data?.points }}
-              </div>
-              <div class="text-black/40 text-sm font-normal font-['PingFang_SC'] leading-[34px]">
-                积分
-              </div>
-              <div class="flex-1"></div>
-            </div>
-          </div>
-        </div>
-        <wd-button block :round="false" @click="handleConfirm">确认</wd-button>
-      </view>
-    </wd-action-sheet>
-  </div>
-</template>
-
-<style scoped lang="scss"></style>

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

@@ -337,7 +337,7 @@ onShareTimeline(() => ({
 	  <wd-button
 	    custom-class="w-full! rounded-lg!"
 	    :disabled="(data?.agreementFileUrl ?? '') === ''"
-	    @click="dealerPanelState = true"
+		@click="clickByPermission('download', () => dealerPanelState = true)"
 	  >
 	    下载所有素材包
 	  </wd-button>

+ 0 - 204
packages/app/src/pages/mine/homepage/statistics/index.vue

@@ -1,204 +0,0 @@
-<route lang="json">
-{ "style": { "navigationBarTitleText": "主页数据", "navigationBarBackgroundColor": "#fff" } }
-</route>
-<script setup lang="ts">
-import SectionHeading from '@/components/section-heading.vue'
-import {
-  getDesignerInfo,
-  getBrowseHistories,
-  getReserveHistory,
-  countThisYear,
-} from '@/core/libs/requests'
-import { useUserStore } from '@/store'
-import { storeToRefs } from 'pinia'
-import Card from '@/components/card.vue'
-import PageHelper from '@/components/page-helper.vue'
-import dayjs from 'dayjs'
-import PageHelperEvo from '@/components/page-helper-evo.vue'
-import { secondToMinute } from '@/utils/date-util'
-
-const userStore = useUserStore()
-const { userInfo } = storeToRefs(userStore)
-const current = ref('累计')
-const request =
-  ref<
-    () => Promise<IResData<{ shareCount: number; viewCount: number; winCustomerCount: number }>>
-  >()
-const data = ref()
-const info = computed(() => [
-  { label: '分享', value: data.value?.shareCount || 0, unit: '次' },
-  { label: '浏览', value: data.value?.viewCount || 0, unit: '次' },
-  { label: '获客', value: data.value?.winCustomerCount || 0, unit: '人' },
-])
-const tab = ref('分享')
-const tabs = ref([
-  { label: '分享明细', value: '分享' },
-  { label: '浏览明细', value: '浏览' },
-  { label: '获客明细', value: '获客' },
-])
-const query = computed(() => ({}))
-const setData = async ({ value }) => {
-  console.log(1111)
-  console.log(value)
-
-  request.value = {
-    累计: () =>
-      getDesignerInfo(userInfo.value.userId).then((res) => ({
-        code: res.code,
-        msg: res.msg,
-        data: {
-          shareCount: res.data.shareCount,
-          viewCount: res.data.viewCount,
-          winCustomerCount: res.data.winCustomerCount,
-        },
-      })),
-    本年: () =>
-      countThisYear({ userId: userInfo.value.userId, year: new Date().getFullYear() }).then(
-        (res) => ({
-          code: res.code,
-          msg: res.msg,
-          data: {
-            shareCount: res.data.find((it) => String(it.bizType) === '1')?.quantity || 0,
-            viewCount: res.data.find((it) => String(it.bizType) === '3')?.quantity || 0,
-            winCustomerCount: res.data.find((it) => String(it.bizType) === '2')?.quantity || 0,
-          },
-        }),
-      ),
-  }[value]
-  const { data: resData } = await request.value()
-  data.value = resData
-  console.log(data.value)
-}
-onMounted(async () => {
-  console.log(1111)
-
-  await setData({ value: current.value })
-  console.log(data.value)
-  // await countThisYear({ userId: userInfo.value.userId, year: new Date().getFullYear() })
-})
-</script>
-<template>
-  <div class="flex-grow flex flex-col gap-5 px-3.5 py-6">
-    <Card>
-      <SectionHeading title="主页数据">
-        <template #append>
-          <div>
-            <wd-segmented
-              v-model:value="current"
-              :options="['累计', '本年']"
-              @change="setData"
-            ></wd-segmented>
-          </div>
-        </template>
-      </SectionHeading>
-      <div class="flex mt-7">
-        <template v-for="(it, i) in info" :key="i">
-          <div class="flex-1 flex flex-col items-center gap-2">
-            <div class="flex items-end gap-0.5">
-              <div class="text-black text-2xl font-medium font-['D-DIN-PRO'] leading-6">
-                {{ it.value }}
-              </div>
-              <div class="text-[#333333] text-sm font-normal font-['PingFang_SC']">
-                {{ it.unit }}
-              </div>
-            </div>
-            <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal">
-              {{ it.label }}
-            </div>
-          </div>
-        </template>
-      </div>
-    </Card>
-    <Card>
-      <wd-tabs v-model="tab">
-        <template v-for="(it, i) in tabs" :key="i">
-          <wd-tab :title="it.label" :name="it.value"></wd-tab>
-        </template>
-      </wd-tabs>
-      <template v-if="tab === '分享'">
-        <PageHelper :request="getBrowseHistories" :query="{ bizType: 1 }">
-          <template #default="{ source }">
-            <template v-for="(it, i) in source.list" :key="i">
-              <div class="py-4">
-                <div class="flex">
-                  <div
-                    class="flex-1 text-black text-sm font-normal font-['PingFang_SC'] leading-normal"
-                  >
-                    <!-- 银色飞行船 -->
-                    {{ it.creatorName }}
-                  </div>
-                  <div
-                    class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal"
-                  >
-                    <!-- 浏览时长:{{ (Number(it.duration) / 60).toFixed(2) }}分钟 -->
-                  </div>
-                </div>
-                <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal">
-                  分享时间:
-                  <!-- 2024/04/01 14:52 -->
-                  {{ dayjs(it.createTime).format('YYYY/MM/DD HH:mm') }}
-                </div>
-              </div>
-              <div v-if="i < source.list.length - 1" class="bg-[#f6f6f6] h-.25"></div>
-            </template>
-          </template>
-        </PageHelper>
-      </template>
-      <template v-if="tab === '浏览'">
-        <PageHelper :request="getBrowseHistories" :query="query">
-          <template #default="{ source }">
-            <template v-for="(it, i) in source.list" :key="i">
-              <div class="py-4">
-                <div class="flex">
-                  <div
-                    class="flex-1 text-black text-sm font-normal font-['PingFang_SC'] leading-normal"
-                  >
-                    <!-- 银色飞行船 -->
-                    {{ it.creatorName }}
-                  </div>
-                  <div
-                    class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal"
-                  >
-                    浏览时长:{{ secondToMinute(it.duration) }}
-                  </div>
-                </div>
-                <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal">
-                  查看时间:
-                  <!-- 2024/04/01 14:52 -->
-                  {{ dayjs(it.createTime).format('YYYY/MM/DD HH:mm') }}
-                </div>
-              </div>
-              <div v-if="i < source.list.length - 1" class="bg-[#f6f6f6] h-.25"></div>
-            </template>
-          </template>
-        </PageHelper>
-      </template>
-      <template v-if="tab === '获客'">
-        <PageHelperEvo :request="getReserveHistory" :query="query">
-          <template #default="{ source }">
-            <template v-for="(it, i) in source.list" :key="i">
-              <div class="py-4">
-                <div class="flex gap-3">
-                  <div class="text-black text-sm font-normal font-['PingFang_SC'] leading-normal">
-                    <!-- 银色飞行船 -->
-                    {{ it.appointmentName }}
-                  </div>
-                  <div class="text-black text-sm font-normal font-['PingFang_SC'] leading-normal">
-                    <!-- 浏览时长:{{ (Number(it.duration) / 60).toFixed(2) }}分钟 -->
-                    {{ it.appointmentPhone }}
-                  </div>
-                </div>
-                <div class="text-black/40 text-xs font-normal font-['PingFang_SC'] leading-normal">
-                  获客时间:
-                  <!-- 2024/04/01 14:52 -->
-                  {{ dayjs(it.createTime).format('YYYY/MM/DD HH:mm') }}
-                </div>
-              </div>
-              <div v-if="i < source.list.length - 1" class="bg-[#f6f6f6] h-.25"></div>
-            </template>
-          </template>
-        </PageHelperEvo>
-      </template>
-    </Card>
-  </div>
-</template>

+ 21 - 1
packages/app/src/pages/mine/index.vue

@@ -262,7 +262,23 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
       :class="[isCertified ? 'aspect-[0.94/1] pb-44' : 'aspect-[1.15/1] pb-20']"
     >
       <div class="my-6.5 px-3.5 flex">
-        <img class="w-[72px] h-[72px] rounded-full border border-white" :src="avatar" />
+        <!-- <img class="w-[72px] h-[72px] rounded-full border border-white" :src="avatar" /> -->
+		<div class="relative">
+			<wd-img
+			  v-if="userInfo?.level"
+			  custom-class="rounded-full border border-white"
+			  :width="72"
+			  :height="72"
+			  :src="avatar"
+			></wd-img>
+			<wd-img
+			  v-if="userInfo?.level"
+			  custom-class="absolute! level-circle"
+			  :width="79"
+			  :height="80"
+			  :src="userInfo?.level?.avatar"
+			></wd-img>
+		</div>
         <div class="ms-3.5 ml-3.5">
           <div class="flex items-center gap-1.25">
             <div
@@ -505,4 +521,8 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
 	left:50%;
 	transform: translateX(-50%);
 }
+:deep(.level-circle){
+	top: -18rpx;
+	left:-10rpx;
+}
 </style>

+ 0 - 4
packages/app/src/types/uni-pages.d.ts

@@ -13,10 +13,6 @@ interface NavigateToOptions {
        "/pages/material/recommend/index" |
        "/pages/material/settled-in/index" |
        "/pages/messages/detail/index" |
-       "/pages/home/mall/detail/index" |
-       "/pages/home/offline-activity/list/index" |
-       "/pages/home/spread/product-detail/index" |
-       "/pages/mine/homepage/statistics/index" |
        "/pages-sub/home/about/index" |
        "/pages-sub/home/classmates/index" |
        "/pages-sub/home/classmates-detail/index" |