Quellcode durchsuchen

Merge branch 'main' of https://github.com/omnia96/designer-hub

Jake vor 1 Monat
Ursprung
Commit
0a8bef4bb5

+ 3 - 1
packages/app/src/components/moment-item.vue

@@ -101,7 +101,9 @@ onMounted(async () => {
           ></wd-img>
         </template>
         <view class="flex-1"></view>
-        <view>{{ beforeNow(dayjs(props.options.createTime).toDate()) }}</view>
+        <div class="text-black/40 text-sm font-medium font-['PingFang SC'] leading-[10.18px]">
+          {{ beforeNow(dayjs(props.options.createTime).toDate()) }}
+        </div>
       </view>
       <div v-if="isVideo" class="aspect-[1.64/1] rounded-lg overflow-hidden my-6" @click.stop>
         <video class="w-full h-full" :src="options.bannerUrls[0]"></video>

+ 7 - 4
packages/app/src/components/section-heading.vue

@@ -38,7 +38,7 @@ const props = defineProps({
   dark: {
     type: Boolean,
     default: false,
-  }
+  },
 })
 const handleMore = async () => {
   props.path && (await uni.navigateTo({ url: props.path }))
@@ -56,9 +56,12 @@ const handleMore = async () => {
         `text-${size}`,
         (dark
           ? { sm: 'text-white', base: 'text-white', lg: 'text-white', xl: 'text-white' }
-          : { sm: 'text-black/90', base: 'text-black/90', lg: 'text-white', xl: 'text-black' })[
-          size
-        ],
+          : {
+              sm: 'text-black/90',
+              base: 'text-black/90',
+              lg: 'text-white',
+              xl: 'text-black font-bold',
+            })[size],
       ]"
     >
       {{ title }}

+ 1 - 1
packages/app/src/pages/common/components/coupon-card.vue

@@ -17,7 +17,7 @@ const emits = defineEmits<{ select: [coupon: Coupon]; clickInstruction: [coupon:
 </script>
 <template>
   <Card custom-class="mx-3.5">
-    <div class="relative" @click="emits('select', options)">
+    <div class="relative" @click="canSelect && emits('select', options)">
       <div class="flex gap-3">
         <div class="w-[94px] h-[94px] bg-[#f6f6f6] rounded-2.5 overflow-hidden">
           <template v-if="options.couponType === 1">

+ 4 - 5
packages/app/src/pages/home/about/index.vue

@@ -9,11 +9,10 @@
 <script setup lang="ts">
 import NavbarEvo from '@/components/navbar-evo.vue'
 const imgs = ref([
-  'https://image.zhuchaohui.com/zhucaohui/9da47a2ee9863786851bea968c4693e1d3540c7bbcac0ba53a3b1d90c203c1c2.png',
-  'https://image.zhuchaohui.com/zhucaohui/65f8902cee44826abd8e97ce4940dee459fcaaa2f5f3535016b670dd0006953b.png',
-  'https://image.zhuchaohui.com/zhucaohui/a43e3377643811fbb182b82758962153f93b30cec62e2c389f93f3a157bba6a6.png',
-  'https://image.zhuchaohui.com/zhucaohui/7f212c009d75cb2fd1c89f5934e5bbc97042344dcc2a9818894edcd7bb33dfe6.png',
-  'https://image.zhuchaohui.com/zhucaohui/a81c225a5ad394aaba99594f1410c0865f94c8e941e0c0f868d62fb8111a3c5f.png',
+  'https://image.zhuchaohui.com/zhucaohui/498f4e8c68e554890c7ac23e684044d238fcb46568cf15b652da8827279d24a3.png',
+  'https://image.zhuchaohui.com/zhucaohui/1e818f8ea7ede66cee4b31cd114c054b950e5992407e8c145f6d823770b204b2.png',
+  'https://image.zhuchaohui.com/zhucaohui/45bb68f12d3eb9b4f70eb46769a0ab1adeb55d8242a23c45001fe56986b30a36.png',
+  'https://image.zhuchaohui.com/zhucaohui/9d6713cc39aeb20faae4f374bf92764252ee28f38de2540ab02e1a9d7496bdcb.png',
 ])
 onShareAppMessage(() => ({
   title: '1分钟快速了解筑巢荟',

+ 3 - 1
packages/app/src/pages/home/components/menus.vue

@@ -42,7 +42,9 @@ const handleClick = (path: string) => {
         <Card>
           <view class="flex justify-between">
             <view class="text-[rgba(0,0,0,0.85)] text-4 font-400 line-height-2.5">
-              <view class="my-0.75">{{ it.title }}</view>
+              <div class="text-black/90 text-base font-bold font-['PingFang_SC'] leading-[10.18px]">
+                {{ it.title }}
+              </div>
               <view class="text-[rgba(0,0,0,0.45)] text-3.5 my-2.5">{{ it.desc }}</view>
             </view>
             <view class="">

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

@@ -251,7 +251,7 @@ onShareAppMessage(shareAppMessage)
           </div>
         </Card>
       </view>
-      <view class="mx-3.5 text-5 font-400">设计圈</view>
+      <view class="mx-3.5 text-5 font-bold">设计圈</view>
       <view class="mx-3.5">
         <PageHelperEvo ref="pageHelperRef" :request="getCircles" class="">
           <template #default="{ source }">

+ 5 - 4
packages/app/src/pages/home/offline-activity/cycling-rankings/index.vue

@@ -6,7 +6,6 @@ import NavbarEvo from '@/components/navbar-evo.vue'
 import { NetImages } from '../../../../core/libs/net-images'
 import { getRidingOptions, getRidings } from '../../../../core/libs/requests'
 import PageHelperEvo from '@/components/page-helper-evo.vue'
-import dayjs from 'dayjs'
 import BottomAppBar from '@/components/bottom-app-bar.vue'
 import { useUserStore } from '@/store'
 import { storeToRefs } from 'pinia'
@@ -39,7 +38,7 @@ onShareTimeline(() => ({
         mode="widthFix"
         :src="NetImages.CyclingRankingsHeaderBg"
       ></wd-img>
-      <div class="absolute bottom-60 left-7.25">
+      <div class="absolute bottom-50 left-7.25">
         <wd-picker
           v-model="current"
           :columns="[
@@ -106,8 +105,10 @@ onShareTimeline(() => ({
                       :src="it.avatar || NetImages.DefaultAvatar"
                     ></wd-img>
                     <div
-                      class="absolute left-0"
-                      :class="{ 0: 'top--5', 1: 'top--0', 2: 'top--0' }[i]"
+                      class="absolute"
+                      :class="
+                        { 0: 'top--5.5 left--.5', 1: 'top--0 left--.5', 2: 'top--.5 left--.5' }[i]
+                      "
                     >
                       <wd-img
                         width="76"

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

@@ -17,6 +17,7 @@ import { AnalysisEventType, useAnalysis } from '@/composables/analysis'
 const userStore = useUserStore()
 const { option } = useAnalysis(true, false)
 const id = ref()
+const downloading = ref(false)
 const { data, run: setData } = useRequest(() => getMaterialDetail({ id: id.value }))
 const { data: materialHomePageData, run: setMaterialHomePageData } = useRequest(
   () => getMaterialHomePage(id.value),
@@ -38,37 +39,36 @@ const { data: materialsManageBrands, run: setMaterialsManageBrands } = useReques
   () => getByDictType(DictType.materialsManageBrand),
   { initialData: [] },
 )
-const handleDownload = () => {
-  // console.log('handleDownload')
-  const Authorization = userStore.userInfo?.token
-  uni.downloadFile({
-    url: `https://www.zhuchaohui.com/app-api/member/materials/download?materialsId=${id.value}`,
+const handleDownload = async () => {
+  const { filePath } = await uni.downloadFile({
+    url: data.value.agreementFileUrl,
+    filePath: `${uni.env.USER_DATA_PATH}/${data.value.materialsName}的素材包.zip`,
     header: {
-      'trace-id': 1,
-      Authorization,
-    },
-    success: (res) => {
-      console.log('downloadFile success', res)
-      uni.saveFile({
-        tempFilePath: res.tempFilePath,
-        success: (res) => {
-          console.log('saveFile success', res)
-        },
-        fail: (err) => {
-          console.log('saveFile fail', err)
-        },
-      })
-      uni.openDocument({
-        filePath: res.tempFilePath,
-        success: (res) => {
-          console.log('openDocument success', res)
-        },
-        fail: (err) => {
-          console.log('openDocument fail', err)
-        },
-      })
+      'Content-Type': 'application/x-zip-compressed',
     },
   })
+  const { deviceType } = await uni.getDeviceInfo()
+  if (deviceType === 'pc') {
+    uni.saveFileToDisk({
+      filePath,
+      success: (res) => {
+        console.log('saveFileToDisk success', res)
+      },
+      fail: (err) => {
+        console.log('saveFileToDisk fail', err)
+      },
+    })
+  } else {
+    uni.openDocument({
+      filePath,
+      success: (res) => {
+        console.log('openDocument success', res)
+      },
+      fail: (err) => {
+        console.log('openDocument fail', err)
+      },
+    })
+  }
 }
 onLoad(async (query: { id: number }) => {
   id.value = query.id
@@ -296,8 +296,13 @@ onShareTimeline(() => ({
         </div>
       </template>
 
-      <wd-button custom-class="w-full! rounded-lg!" @click="handleDownload">
-        下载所有素材包
+      <wd-button
+        custom-class="w-full! rounded-lg!"
+        :disabled="(data.agreementFileUrl ?? '') !== ''"
+        :loading="downloading"
+        @click="handleDownload"
+      >
+        {{ downloading ? '下载中...' : '下载所有素材包' }}
       </wd-button>
     </div>
   </view>

+ 4 - 5
packages/app/src/pages/material/mini-class/index.vue

@@ -9,11 +9,10 @@
 <script setup lang="ts">
 import NavbarEvo from '@/components/navbar-evo.vue'
 const imgs = ref([
-  'https://image.zhuchaohui.com/zhucaohui/9ecc362603763716ae5958193f8fe8c03f62000dd789a91c7f5323017eda2274.png',
-  'https://image.zhuchaohui.com/zhucaohui/c2458b6a9ea61953c40d329e1ce9ff7592da7c4d0f31241bd3c98f76f18ec65f.png',
-  'https://image.zhuchaohui.com/zhucaohui/4f1b8ea9dcbcf51c18fb2435712a0d51c24830a6f70c93938a3bef8ebf410c03.png',
-  'https://image.zhuchaohui.com/zhucaohui/4dd78ed62c7b40bb63a28f6a484cbd6f625bb00b087446ef97f398b4ae6d7611.png',
-  'https://image.zhuchaohui.com/zhucaohui/f39ad760767abc012d0b710fb4c95dc72767c8c45cab9a2e80e7e5d0633433a9.png',
+  'https://image.zhuchaohui.com/zhucaohui/fe7baaf514378aafe792df18400755302aed3206e2eb0b7b6743abd0fc513099.png',
+  'https://image.zhuchaohui.com/zhucaohui/0c8a33b400f9f54e7cf3ac2588178abe9a159284d0783f0114db19d0bb9157b4.png',
+  'https://image.zhuchaohui.com/zhucaohui/91b594940df7cbc517a21823879ae177f9fc36ad01107ce8e5885b69fe6b2dd6.png',
+  'https://image.zhuchaohui.com/zhucaohui/7b7171de3cae83030acca008dc03484fdd53af3398526623cd62afc024c124ef.png',
 ])
 </script>
 <template>

+ 9 - 3
packages/app/src/pages/messages/components/message-card.vue

@@ -43,6 +43,7 @@ const couponSelectText = computed(() => {
   }
   return '无可用'
 })
+const hasLine = computed(() => getMessageType(props.options.messageSubType)?.path)
 const init = async () => {
   if (
     props.options.messageType === MessageType.Integral &&
@@ -126,7 +127,12 @@ onMounted(async () => {
             v-html="options.detailBody"
           ></div>
           <div class="grid grid-cols-[auto_1fr] gap-x-1 gap-y-4.5">
-            <template v-if="options.messageSubType === 31 && options.isRead !== '1'">
+            <template
+              v-if="
+                options.messageSubType === 31 &&
+                options.pointsDetail?.pointsStauts === PointStatus.PendingConfirmation
+              "
+            >
               <div
                 class="text-black/40 text-sm font-normal font-['PingFang_SC'] h-5.5 flex items-center"
               >
@@ -161,8 +167,8 @@ onMounted(async () => {
       >
         <wd-img width="100%" height="100%" mode="aspectFill" :src="options.coverUrl" />
       </div>
-      <div class="row-start-4 col-start-1 col-end-4 my-2">
-        <div v-if="!options.coverUrl" class="bg-[#dadada] w-full h-[1px]"></div>
+      <div v-if="hasLine" class="row-start-4 col-start-1 col-end-4 my-2">
+        <div class="bg-[#dadada] w-full h-[1px]"></div>
       </div>
       <div class="row-start-5 col-start-2 col-end-4">
         <div class="text-black/40 text-xs font-normal font-['PingFang_SC']">

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

@@ -3,7 +3,9 @@
 </route>
 <script setup lang="ts">
 const imgs = ref([
-  'https://image.zhuchaohui.com/zhucaohui/3014480570bd7b81a64eb1ca598c7e017f7952eb982e47aae4eb23de9d7de9f2.jpg',
+  'https://image.zhuchaohui.com/zhucaohui/4e9c3301a40e9dd01ecb8b014b17c86f33c7ad5f5b80e4a5d3623050ec49dce9.png',
+  'https://image.zhuchaohui.com/zhucaohui/a1694f628e7c30df5f4a8fe4ab980e4740aa67c60e7e01466a53c98fd4ea5118.png',
+  'https://image.zhuchaohui.com/zhucaohui/198e4eebd45a7fa1bf013465622a0c36bd71ad85cbf4bf54350d7443ffcd6e1c.png',
 ])
 const handleClickLeft = () => {
   uni.navigateBack()

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

@@ -60,7 +60,7 @@ const { data: designerInfo, run: setDesignerInfo } = useRequest(() => getDesigne
   initialData: {},
 })
 const { data: badges, run: setBadges } = useRequest(() => getOwnBadges({ userId: id.value }))
-const isOwn = computed(() => userInfo.value?.userId === id.value)
+const isOwn = computed(() => String(userInfo.value?.userId) === id.value)
 const skills = computed(() =>
   [
     {

+ 2 - 2
packages/merchant/src/pages/mine/components/agent-mine.vue

@@ -139,7 +139,7 @@ onMounted(async () => {
                             it.thisYearComplete && it.target
                               ? (
                                   Number(Number(it.thisYearComplete) / Number(it.target)) * 100
-                                ).toFixed(1)
+                                ).toFixed(0)
                               : 0
                           }}%
                         </div>
@@ -171,7 +171,7 @@ onMounted(async () => {
                   <div class="text-black/60 text-xs font-normal font-['PingFang_SC']">差值</div>
                   <div class="text-[#ff2d2d] text-xs font-medium font-['D-DIN-PRO'] leading-normal">
                     <!-- 3000 -->
-                    {{ (it.target - (it.thisYearComplete ?? 0)) / units[i].rate }}
+                    {{ (it.thisYearComplete ?? 0) - it.target / units[i].rate }}
                   </div>
                   <div
                     class="text-[#ff2d2d] text-[10px] font-medium font-['D-DIN-PRO'] leading-normal"