4 Commits 5b70f9b89f ... 204d86e678

Autor SHA1 Mensagem Data
  EvilDragon 204d86e678 refactor(app): 修改活动页面日期显示格式 3 semanas atrás
  EvilDragon 28cf356e1b feat(app): 优化活动页面图片展示 3 semanas atrás
  EvilDragon f52a11a453 feat(member-levels): 添加会员头像框功能 3 semanas atrás
  EvilDragon 0f3dc24550 refactor(app): 调整扫描功能权限并优化权限控制逻辑 3 semanas atrás

+ 10 - 2
packages/app/src/components/moment-item.vue

@@ -31,7 +31,7 @@ const emits = defineEmits<{
 const router = useRouter()
 const { features, clickByPermission } = usePermissions()
 const memberLevelsStore = useMemberLevelsStore()
-const { getMemberLevelLogo } = memberLevelsStore
+const { getMemberLevelLogo, getMemberAvatarFrame } = memberLevelsStore
 const dictStore = useDictStore()
 const { getOptionLabel } = dictStore
 const imgClass = ref('')
@@ -76,7 +76,7 @@ onMounted(async () => {
     <Card>
       <view class="flex items-center gap-2">
         <view
-          class="overflow-hidden rounded-full"
+          class="relative"
           @click.stop="
             features.toDesignerHomePage &&
             ['1', '2'].includes(options?.circleType) &&
@@ -88,9 +88,17 @@ onMounted(async () => {
             custom-class="vertical-bottom"
             :width="35"
             :height="35"
+            round
             :src="props.options.headUrl || NetImages.DefaultAvatar"
             mode="scaleToFill"
           />
+          <wd-img
+            v-if="getMemberAvatarFrame(options?.levelId)"
+            custom-class="vertical-bottom absolute! top--1.25 left--1.25"
+            :width="40"
+            :height="40"
+            :src="getMemberAvatarFrame(options?.levelId) || ''"
+          ></wd-img>
         </view>
         <view class="">{{ props.options.stylistName || props.options.marketing }}</view>
         <template v-if="getMemberLevelLogo(options?.levelId)">

+ 5 - 3
packages/app/src/composables/permissions.ts

@@ -107,7 +107,7 @@ export const usePermissions = () => {
        */
       { name: 'exchange', meta: { canNotLogin: false, canNotDesigner: false } },
       { name: 'share', meta: { canNotLogin: false, canNotDesigner: false, minLevel: 2 } },
-      { name: 'scan', meta: { canNotLogin: false, canNotDesigner: false, minLevel: 2 } },
+      { name: 'scan', meta: { canNotLogin: false, canNotDesigner: false } },
       { name: 'task', meta: { canNotLogin: false, canNotDesigner: false } },
       { name: 'download', meta: { canNotLogin: false, canNotDesigner: false } },
     ]
@@ -119,8 +119,10 @@ export const usePermissions = () => {
         return
       }
       if (!feature.meta.canNotDesigner && !isDesigner.value) {
-        uni.showToast({ title: messages.components.toast.pleaseAuthentication, icon: 'none' })
-        useRouter().push('/pages/mine/authentication/index')
+        uni
+          .showToast({ title: messages.components.toast.pleaseAuthentication, icon: 'none' })
+          .then()
+        useRouter().push('/pages/mine/authentication/index').then()
         return
       }
       if (feature.meta.minLevel && userInfo.value.level.level < feature.meta.minLevel) {

+ 1 - 0
packages/app/src/core/libs/requests.ts

@@ -861,6 +861,7 @@ export const getAppMemberLevelConfigs = () =>
       status: number
       createTime: string
       logo: string
+      avatar?: string
       setMemberRights: {
         createTime: string
         updateTime: string

+ 7 - 2
packages/app/src/pages/home/activity/images/index.vue

@@ -8,6 +8,8 @@
 </route>
 <script setup lang="ts">
 import { getPhotoList } from '../../../../core/libs/requests'
+import SectionHeading from '@/components/section-heading.vue'
+import dayjs from 'dayjs'
 
 const id = ref()
 const type = ref()
@@ -21,7 +23,7 @@ const { data, run: setData } = useRequest(
   { initialData: { list: [], total: 0 } },
 )
 onLoad(async (query: { id: string; type: 'activity' | 'studyTour'; title: string }) => {
-  uni.setNavigationBarTitle({ title: query.title })
+  await uni.setNavigationBarTitle({ title: query.title })
   id.value = query.id
   type.value = query.type
   await setData()
@@ -30,11 +32,14 @@ onLoad(async (query: { id: string; type: 'activity' | 'studyTour'; title: string
 <template>
   <div class="flex flex-col flex-grow p-4 bg-white gap-4">
     <template v-for="(it, i) in data.list" :key="i">
+      <SectionHeading
+        :title="'第' + Number(i + 1) + '天 ' + dayjs(it.travelDate).format('YYYY-MM-DD')"
+      ></SectionHeading>
       <template v-for="(video, index) in it.video" :key="index">
         <video class="w-full" :src="video"></video>
       </template>
       <template v-for="(img, index) in it.picture" :key="index">
-        <wd-img width="100%" mode="widthFix" :src="img" />
+        <wd-img width="100%" mode="widthFix" :src="img" enable-preview show-menu-by-longpress />
       </template>
     </template>
   </div>

+ 3 - 0
packages/app/src/store/member-levles.ts

@@ -10,11 +10,14 @@ export const useMemberLevelsStore = defineStore('', () => {
   )
   const memberLevelsById = (id: number) => memberLevels.value.find((item) => item.id === id)
   const getMemberLevelLogo = (id: number) => memberLevelsById(id)?.logo
+  // 获取头像框
+  const getMemberAvatarFrame = (id: number) => memberLevelsById(id)?.avatar
   fetchMemberLevels().then()
   return {
     memberLevels,
     fetchMemberLevels,
     memberLevelsById,
     getMemberLevelLogo,
+    getMemberAvatarFrame,
   }
 })