your_username vor 4 Tagen
Ursprung
Commit
5728db5308
1 geänderte Dateien mit 22 neuen und 5 gelöschten Zeilen
  1. 22 5
      pages/my/userinfo.vue

+ 22 - 5
pages/my/userinfo.vue

@@ -1,16 +1,18 @@
 <template>
 	<view>
 		<!-- 顶部导航栏 -->
-		<view class="navbar">
+		<view class="navbar" :style="{ paddingTop: (12 + statusBarHeight) + 'px' }">
 			<view class="navbar-content">
 				<view class="navbar-left" @click="goBack">
-					<u-icon name="arrow-leftward" size="38" color="#333"></u-icon>
+					<u-icon name="arrow-leftward" size="36" color="#333"></u-icon>
 				</view>
 				<view class="navbar-title">基本信息</view>
 				<view class="navbar-right"></view>
 			</view>
 		</view>
 
+		<!-- <nav-bar title="基本信息"></nav-bar> -->
+
 		<view class="usermain">
 			<view class="usermain-item ">
 				<view class="usermain-item-title">头像</view>
@@ -130,9 +132,14 @@
 
 <script>
 	import configdata from '../../common/config.js';
+	import navBar from "@/components/nav-bar/index.vue";
 	export default {
+		components: {
+			navBar
+		},
 		data() {
 			return {
+				statusBarHeight: 0, // 状态栏高度
 				phone: '',
 				weChatNum:'',//微信号
 				email: '',//接收简历邮箱
@@ -165,6 +172,10 @@
 			}
 		},
 		onLoad(e) {
+			// 获取状态栏高度
+			let systemInfo = uni.getSystemInfoSync();
+			this.statusBarHeight = systemInfo.statusBarHeight || 0;
+			
 			this.getUserInfo()
 			// this.avatar = uni.getStorageSync('avatar')
 		},
@@ -389,8 +400,13 @@
 	}
 
 	.navbar {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		z-index: 999;
 		background: #fff;
-		padding: 80rpx 0 40rpx 20rpx;
+		padding: 0 0 40rpx 20rpx;
 		
 		.navbar-content {
 			display: flex;
@@ -410,9 +426,9 @@
 			.navbar-title {
                 color: rgba(23, 23, 37, 1);
                 font-family: DM Sans;
-                font-size: 20px;
+                font-size: 36rpx;
                 font-weight: 700;
-                line-height: 26px;
+                line-height: 52rpx;
                 letter-spacing: 0%;
                 text-align: center;
 			}
@@ -450,6 +466,7 @@
 	.usermain {
 		background: #ffffff;
 		/* color: #fff; */
+		margin-top: 120rpx; /* 为固定导航栏留出空间 */
 	}
 
 	.usermain-item {