your_username 4 days ago
parent
commit
235f669298
1 changed files with 33 additions and 11 deletions
  1. 33 11
      pages/my/onlineResume.vue

+ 33 - 11
pages/my/onlineResume.vue

@@ -1,13 +1,15 @@
 <template>
-	<view class="online-resume">
-		<!-- 顶部导航栏 -->
-		<view class="navbar">
-			<view class="navbar-content">
-				<view class="navbar-left" @click="goBack">
-					<u-icon name="arrow-leftward" size="38" color="#333"></u-icon>
+	<view class="online-resume" :style="{ paddingTop: (12 + statusBarHeight + 88 - 60) + 'px' }">
+		<!-- 固定顶部导航栏 -->
+		<view class="fixed-nav" :style="{ paddingTop: (12 + statusBarHeight) + 'px' }">
+			<view class="navbar">
+				<view class="navbar-content">
+					<view class="navbar-left" @click="goBack">
+						<u-icon name="arrow-leftward" size="38" color="#333"></u-icon>
+					</view>
+					<view class="navbar-title">在线简历</view>
+					<view class="navbar-right"></view>
 				</view>
-				<view class="navbar-title">在线简历</view>
-				<view class="navbar-right"></view>
 			</view>
 		</view>
 
@@ -278,9 +280,15 @@
 	export default {
 		data() {
 			return {
+				statusBarHeight: 0, // 状态栏高度
 				hasEcommerceExperience: true
 			}
 		},
+		onLoad() {
+			// 获取状态栏高度
+			let systemInfo = uni.getSystemInfoSync();
+			this.statusBarHeight = systemInfo.statusBarHeight || 0;
+		},
 		methods: {
 			goBack() {
 				uni.navigateBack();
@@ -380,12 +388,26 @@
 	.online-resume {
 		// background-color: #F2F6FC;
 		min-height: 100vh;
+		// padding-top 已改为动态计算,在模板中通过 :style 设置
+	}
+
+	.fixed-nav {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		z-index: 9999;
+		background-color: #ffffff;
+		padding: 0 32rpx;
+		// padding-top 已改为动态计算,在模板中通过 :style 设置
 	}
 
 	// 顶部导航栏
 	.navbar {
 		background: #fff;
-		padding: 80rpx 0 40rpx 0;
+		height: 88rpx;
+		padding: 0 8rpx;
+		// padding: 80rpx 0 40rpx 0; // 已移除,因为现在是固定导航栏
 		
 		.navbar-content {
 			display: flex;
@@ -405,9 +427,9 @@
 			.navbar-title {
                 color: rgba(23, 23, 37, 1);
                 font-family: DM Sans;
-                font-size: 20px;
+                font-size: 38rpx;
                 font-weight: 700;
-                line-height: 26px;
+                line-height: 52rpx;
                 letter-spacing: 0%;
                 text-align: center;
 			}