refactor(user): adopt flex+scroll-view layout and remove unused items
Switch to full-height flex layout with scroll-view (matching home page), remove account security menu entry, and drop version footer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="yd-page-container">
|
||||
<view class="page-user">
|
||||
<!-- 橙色渐变头部 -->
|
||||
<view class="ai-gradient-header">
|
||||
<view class="ai-header-pattern">
|
||||
@@ -26,7 +26,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 统计卡片(负 margin 重叠) -->
|
||||
<!-- 统计卡片(负 margin 重叠头部) -->
|
||||
<view class="relative z-10 mx-40rpx -mt-100rpx">
|
||||
<view class="stat-card ai-card flex py-40rpx">
|
||||
<view class="flex-1 text-center">
|
||||
@@ -58,8 +58,10 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 可滚动内容区 -->
|
||||
<scroll-view class="min-h-0 flex-1" scroll-y scroll-with-animation>
|
||||
<!-- 菜单区域 -->
|
||||
<view class="mx-40rpx mt-48rpx">
|
||||
<view class="mx-40rpx mt-32rpx">
|
||||
<view class="ai-card overflow-hidden">
|
||||
<view
|
||||
v-for="(item, index) in menuItems"
|
||||
@@ -82,7 +84,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 退出登录 -->
|
||||
<view class="mx-40rpx mt-48rpx">
|
||||
<view class="mx-40rpx mt-32rpx">
|
||||
<view
|
||||
class="flex items-center justify-center rounded-48rpx bg-[#FEF2F2] py-28rpx"
|
||||
@click="handleLogout"
|
||||
@@ -91,10 +93,9 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 版本号 -->
|
||||
<view class="mt-48rpx text-center text-22rpx text-[#D1D5DB] pb-safe" style="padding-bottom: 140rpx;">
|
||||
AIOT v1.0.0
|
||||
</view>
|
||||
<!-- 底部留白:为 tabbar 腾出空间 -->
|
||||
<view class="pb-safe" style="height: 140rpx;" />
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -138,7 +139,6 @@ onMounted(async () => {
|
||||
|
||||
const menuItems = [
|
||||
{ title: '个人资料', icon: 'user', iconColor: '#F97316', action: () => handleGoProfile() },
|
||||
{ title: '账号安全', icon: 'lock-on', iconColor: '#22C55E', action: () => handleGoSecurity() },
|
||||
{ title: '常见问题', icon: 'warning', iconColor: '#CA8A04', action: () => handleGoFaq() },
|
||||
{ title: '意见反馈', icon: 'edit', iconColor: '#8B5CF6', action: () => handleGoFeedback() },
|
||||
{ title: '联系客服', icon: 'phone', iconColor: '#06B6D4', action: () => handleGoContact() },
|
||||
@@ -149,10 +149,6 @@ function handleGoProfile() {
|
||||
uni.navigateTo({ url: '/pages-core/user/profile/index' })
|
||||
}
|
||||
|
||||
function handleGoSecurity() {
|
||||
uni.navigateTo({ url: '/pages-core/user/security/index' })
|
||||
}
|
||||
|
||||
function handleGoFaq() {
|
||||
uni.navigateTo({ url: '/pages-core/user/faq/index' })
|
||||
}
|
||||
@@ -187,7 +183,23 @@ function handleLogout() {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/* 禁止原生页面滚动,让内部 scroll-view 接管 */
|
||||
page {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: #fffdf5;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-user {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.avatar-wrapper {
|
||||
border: 4rpx solid rgba(255, 255, 255, 0.3);
|
||||
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.15);
|
||||
|
||||
Reference in New Issue
Block a user