而我却

This commit is contained in:
zpc 2026-02-22 00:06:27 +08:00
parent cc8f99e77c
commit 2d4ffabd9e
3 changed files with 34 additions and 147 deletions

View File

@ -53,11 +53,6 @@ onMounted(() => {
<!-- 隐私政策内容 --> <!-- 隐私政策内容 -->
<view v-else class="privacy-content"> <view v-else class="privacy-content">
<!-- 标题 -->
<view class="privacy-header">
<text class="privacy-title">{{ title }}</text>
<text v-if="updateTime" class="update-time">更新时间{{ updateTime }}</text>
</view>
<!-- 正文内容 --> <!-- 正文内容 -->
<view class="privacy-body"> <view class="privacy-body">

View File

@ -53,11 +53,6 @@ onMounted(() => {
<!-- 协议内容 --> <!-- 协议内容 -->
<view v-else class="agreement-content"> <view v-else class="agreement-content">
<!-- 标题 -->
<view class="agreement-header">
<text class="agreement-title">{{ title }}</text>
<text v-if="updateTime" class="update-time">更新时间{{ updateTime }}</text>
</view>
<!-- 正文内容 --> <!-- 正文内容 -->
<view class="agreement-body"> <view class="agreement-body">

View File

@ -1,74 +1,42 @@
<template> <template>
<view class="team-page"> <view class="team-page">
<!-- 自定义导航栏 -->
<view class="custom-navbar" :style="navbarStyle">
<view class="navbar-content" :style="{ height: navbarHeight + 'px' }">
<text class="navbar-title">团队</text>
</view>
</view>
<!-- 导航栏占位 -->
<view class="navbar-placeholder" :style="{ height: totalNavbarHeight + 'px' }"></view>
<!-- 页面内容 -->
<view class="page-content">
<!-- 加载状态 --> <!-- 加载状态 -->
<Loading v-if="pageLoading" type="page" :loading="true" /> <Loading v-if="pageLoading" type="page" :loading="true" />
<!-- 团队介绍图片 --> <!-- 团队介绍图片 -->
<view v-else class="team-content"> <view v-else class="team-content">
<!-- 有数据时显示图片列表 -->
<template v-if="teamImages.length > 0"> <template v-if="teamImages.length > 0">
<image <image
v-for="(item, index) in teamImages" v-for="(item, index) in teamImages"
:key="index" :key="index"
:src="item.imageUrl" :src="item"
mode="widthFix" mode="scaleToFill"
class="team-image" class="team-image"
@load="handleImageLoad(index)"
@error="handleImageError(index)"
/> />
</template> </template>
<!-- 无数据时显示空状态 --> <!-- 无数据时显示空状态 -->
<view v-else class="empty-state"> <view v-else class="empty-state">
<image <image src="/static/ic_empty.png" mode="aspectFit" class="empty-icon" />
src="/static/ic_empty.png"
mode="aspectFit"
class="empty-icon"
/>
<text class="empty-text">暂无团队介绍</text> <text class="empty-text">暂无团队介绍</text>
</view> </view>
</view> </view>
<!-- 底部安全区域 -->
<view class="safe-bottom"></view>
</view>
</view> </view>
</template> </template>
<script setup> <script setup>
/** /**
* 团队页面 * 团队页面
* 展示团队介绍图片 * 展示团队介绍图片全屏无导航栏
*/ */
import { ref, computed, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import { useNavbar } from '@/composables/useNavbar.js'
import { getTeamInfo } from '@/api/team.js' import { getTeamInfo } from '@/api/team.js'
import Loading from '@/components/Loading/index.vue' import Loading from '@/components/Loading/index.vue'
const { statusBarHeight, navbarHeight, totalNavbarHeight } = useNavbar()
// //
const pageLoading = ref(true) const pageLoading = ref(true)
const teamImages = ref([]) const teamImages = ref([])
//
const navbarStyle = computed(() => ({
paddingTop: statusBarHeight.value + 'px',
height: totalNavbarHeight.value + 'px'
}))
/** /**
* 加载团队介绍数据 * 加载团队介绍数据
*/ */
@ -77,48 +45,23 @@ async function loadTeamInfo() {
try { try {
const res = await getTeamInfo() const res = await getTeamInfo()
if (res && res.code === 0 && res.data) { if (res && res.code === 0 && res.data) {
// const images = res.data.images || res.data.list || res.data
if (Array.isArray(res.data)) { if (Array.isArray(images)) {
teamImages.value = res.data teamImages.value = images.map(item =>
} else if (res.data.list && Array.isArray(res.data.list)) { typeof item === 'string' ? item : (item.imageUrl || item)
teamImages.value = res.data.list )
} else if (res.data.images && Array.isArray(res.data.images)) {
teamImages.value = res.data.images
} else if (res.data.imageUrl) {
//
teamImages.value = [{ imageUrl: res.data.imageUrl }]
} else { } else {
teamImages.value = [] teamImages.value = []
} }
} }
} catch (error) { } catch (error) {
console.error('加载团队介绍失败:', error) console.error('加载团队介绍失败:', error)
uni.showToast({ uni.showToast({ title: '加载失败,请稍后重试', icon: 'none' })
title: '加载失败,请稍后重试',
icon: 'none'
})
} finally { } finally {
pageLoading.value = false pageLoading.value = false
} }
} }
/**
* 图片加载成功
*/
function handleImageLoad(index) {
console.log(`团队图片 ${index + 1} 加载成功`)
}
/**
* 图片加载失败
*/
function handleImageError(index) {
console.error(`团队图片 ${index + 1} 加载失败`)
}
/**
* 页面加载
*/
onMounted(() => { onMounted(() => {
loadTeamInfo() loadTeamInfo()
}) })
@ -129,63 +72,23 @@ onMounted(() => {
.team-page { .team-page {
min-height: 100vh; min-height: 100vh;
background-color: $bg-color;
}
//
.custom-navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
background-color: $bg-white; background-color: $bg-white;
z-index: 999;
.navbar-content {
display: flex;
align-items: center;
justify-content: center;
.navbar-title {
font-size: 34rpx;
font-weight: $font-weight-medium;
color: $text-color;
}
}
} }
.navbar-placeholder {
width: 100%;
}
//
.page-content {
padding-bottom: env(safe-area-inset-bottom);
}
//
.team-content { .team-content {
padding: $spacing-lg;
.team-image { .team-image {
width: 100%; width: 100vw;
height: 100vh;
display: block; display: block;
margin-bottom: $spacing-md;
border-radius: $border-radius-lg;
&:last-child {
margin-bottom: 0;
}
} }
} }
//
.empty-state { .empty-state {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 200rpx 0; height: 100vh;
.empty-icon { .empty-icon {
width: 200rpx; width: 200rpx;
@ -198,10 +101,4 @@ onMounted(() => {
color: $text-placeholder; color: $text-placeholder;
} }
} }
//
.safe-bottom {
height: 40rpx;
padding-bottom: env(safe-area-inset-bottom);
}
</style> </style>