fix: nav page

This commit is contained in:
zzc
2026-01-31 22:42:57 +08:00
parent 417195ff09
commit 4f4a7792cb
2 changed files with 3 additions and 62 deletions

View File

@@ -1,9 +1,6 @@
<template> <template>
<view class="avatar-page" :style="{ paddingTop: getBavBarHeight() + 'px' }"> <view class="avatar-page">
<view class="nav-bar"> <NavBar title="头像制作" />
<view class="back" @tap="goBack"></view>
<text class="nav-title">新春头像挂饰</text>
</view>
<view class="preview-card"> <view class="preview-card">
<view class="preview-square"> <view class="preview-square">
<image <image
@@ -160,7 +157,6 @@
<script setup> <script setup>
import { ref, computed } from "vue"; import { ref, computed } from "vue";
import { onShareAppMessage, onLoad, onReachBottom } from "@dcloudio/uni-app"; import { onShareAppMessage, onLoad, onReachBottom } from "@dcloudio/uni-app";
import { getBavBarHeight, getDeviceInfo } from "@/utils/system";
import { useUserStore } from "@/stores/user"; import { useUserStore } from "@/stores/user";
import { import {
createShareToken, createShareToken,
@@ -179,6 +175,7 @@ import {
generateObjectId, generateObjectId,
uploadImage, uploadImage,
} from "@/utils/common.js"; } from "@/utils/common.js";
import NavBar from "@/components/NavBar/NavBar.vue";
const userStore = useUserStore(); const userStore = useUserStore();
const loginPopupRef = ref(null); const loginPopupRef = ref(null);
@@ -719,28 +716,6 @@ const loadImage = (url) => {
box-sizing: border-box; box-sizing: border-box;
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
} }
.nav-bar {
display: flex;
align-items: center;
padding: 16rpx 24rpx;
}
.back {
font-size: 50rpx;
margin-right: 24rpx;
line-height: 1;
color: #333;
/* 增大点击区域 */
padding: 20rpx;
margin-left: -20rpx;
}
.nav-title {
font-size: 34rpx;
font-weight: bold;
color: #333;
flex: 1;
text-align: center;
margin-right: 50rpx; /* Balance back button */
}
.preview-card { .preview-card {
margin: 20rpx 24rpx; margin: 20rpx 24rpx;
background: #fff; background: #fff;

View File

@@ -231,40 +231,6 @@ const getDefaultName = (item) => {
padding-bottom: 40px; padding-bottom: 40px;
} }
.nav-bar {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 100;
background-color: #f9f9f9;
.nav-content {
height: 100%;
display: flex;
align-items: center;
padding: 0 24rpx;
.back {
font-size: 50rpx;
margin-right: 24rpx;
line-height: 1;
color: #333;
padding: 20rpx;
margin-left: -20rpx;
}
.nav-title {
font-size: 34rpx;
font-weight: bold;
color: #333;
flex: 1;
text-align: center;
margin-right: 50rpx;
}
}
}
.current-card { .current-card {
margin: 60px 20px 20px; margin: 60px 20px 20px;
background: #fff; background: #fff;