15591641157 2 månader sedan
förälder
incheckning
5657c9e227

+ 38 - 36
packages/app/src/pages/home/index.vue

@@ -121,44 +121,46 @@ onShow(async () => {
     reqs.push(setStudyTours())
   }
   await Promise.all(reqs)
-  const { data: badgeData } = await getBadges({})
-  const { data: certificates } = await getCertificates()
-  console.log(certificates)
-  const badges = Object.values(badgeData)
-    .flat()
-    .filter((it) => !it.popUp && it.quantity)
-  const honors = [
-    ...badges.map((it) => ({
-      type: HonorDialogType.Badge,
-      id: it.id,
-      title: it.badgeName,
-      content: it.badgeDescription,
-      image: it.badgeYesObtainedImage,
-    })),
-    ...certificates
-      .filter((it) => !it.popUp)
-      .map((it) => ({
-        type: HonorDialogType.Certificate,
+  if (userInfo.value.level != null){
+    const { data: badgeData } = await getBadges({})
+    const { data: certificates } = await getCertificates()
+    console.log(certificates)
+    const badges = Object.values(badgeData)
+      .flat()
+      .filter((it) => !it.popUp && it.quantity)
+    const honors = [
+      ...badges.map((it) => ({
+        type: HonorDialogType.Badge,
         id: it.id,
-        title: it.certificateName,
-        content: it.certificateDescription,
-        image: it.certificateImage,
+        title: it.badgeName,
+        content: it.badgeDescription,
+        image: it.badgeYesObtainedImage,
       })),
-  ]
-  if (honors.length) {
-    const honor = honors[0]
-    await show({
-      title: honor.title ?? ' ',
-      content: honor.content ?? ' ',
-      image: honor.image,
-      type: honor.type,
-      onLoad: async () => {
-        await updateHonorPopUp({
-          bizId: String(honor.id),
-          bizType: honor.type === HonorDialogType.Badge ? '1' : '2',
-        })
-      },
-    })
+      ...certificates
+        .filter((it) => !it.popUp)
+        .map((it) => ({
+          type: HonorDialogType.Certificate,
+          id: it.id,
+          title: it.certificateName,
+          content: it.certificateDescription,
+          image: it.certificateImage,
+        })),
+    ]
+    if (honors.length) {
+      const honor = honors[0]
+      await show({
+        title: honor.title ?? ' ',
+        content: honor.content ?? ' ',
+        image: honor.image,
+        type: honor.type,
+        onLoad: async () => {
+          await updateHonorPopUp({
+            bizId: String(honor.id),
+            bizType: honor.type === HonorDialogType.Badge ? '1' : '2',
+          })
+        },
+      })
+    }
   }
 })
 onLoad(async () => {

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

@@ -182,7 +182,7 @@ onMounted(async () => {
         v-if="options.coverUrl"
         class="row-start-3 col-start-2 col-end-4 aspect-[1.7/1] rounded-md overflow-hidden"
       >
-        <wd-img width="100%" height="100%" mode="aspectFill" :src="options.coverUrl" />
+        <wd-img width="100%" height="100%" mode="aspectFill" :src="options.coverUrl"  @click="handleJump"/>
       </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>

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

@@ -349,7 +349,7 @@ onPageScroll(({ scrollTop }: { scrollTop: number }) => {
         <wd-img :src="vipBg" width="100%" mode="widthFix"></wd-img>
       </div>
       <div class="mx-3.5 box-border absolute left-0 right-0 top-0 p-3.5">
-        <div class="flex items-center">
+        <div class="flex items-center" @click="router.push('/pages/mine/levels/index')">
           <wd-img custom-class="vertical-bottom" :src="vip" width="35" mode="widthFix"></wd-img>
           <div
             class="ml-2 text-center text-[#faeac6] text-sm font-normal font-['PingFang_SC'] leading-normal"

+ 3 - 0
packages/app/src/pages/mine/levels/index.vue

@@ -28,6 +28,9 @@ onMounted(async () => {
   current.value = sort(levelConfigs.value, (it) => it.memberLevel)?.findIndex(
     (it) => it.memberLevel === userInfo.value?.level?.level,
   )
+ if (current.value == -1){
+   current.value = 4
+ }
 })
 </script>
 <template>