Explorar o código

空出顶部2

your_username hai 3 días
pai
achega
3f4402a0a3
Modificáronse 2 ficheiros con 17 adicións e 0 borrados
  1. 9 0
      package/jobIntention/add.vue
  2. 8 0
      package/jobIntention/industry.vue

+ 9 - 0
package/jobIntention/add.vue

@@ -1,5 +1,8 @@
 <template>
 	<view>
+		<!-- 顶部占位区域 -->
+		<view :style="{ height: statusBarHeight + 'px' }"></view>
+		
 		<!-- 表单 -->
 		<view class="list flex justify-center">
 			<view class="list-box">
@@ -103,6 +106,7 @@
 	export default {
 		data() {
 			return {
+				statusBarHeight: 0,
 				monyShow: false,
 				monyList: [], //薪资列表
 				resumesCompensation: '', //薪资
@@ -118,6 +122,11 @@
 				isDefault: 0,
 			};
 		},
+		onLoad() {
+			// 获取状态栏高度
+			const systemInfo = uni.getSystemInfoSync()
+			this.statusBarHeight = systemInfo.statusBarHeight || 0
+		},
 		onShow() {
 			let that = this
 			//选择的岗位

+ 8 - 0
package/jobIntention/industry.vue

@@ -1,5 +1,8 @@
 <template>
 	<view>
+		<!-- 顶部占位区域 -->
+		<view :style="{ height: statusBarHeight + 'px' }"></view>
+		
 		<!-- 标题 -->
 		<view class="title flex justify-center">
 			<view class="title-box">
@@ -66,6 +69,7 @@
 	export default {
 		data() {
 			return {
+				statusBarHeight: 0,
 				selectList: [],
 				itemList: [],
 				topList: [],
@@ -73,6 +77,10 @@
 			};
 		},
 		onLoad(option) {
+			// 获取状态栏高度
+			const systemInfo = uni.getSystemInfoSync()
+			this.statusBarHeight = systemInfo.statusBarHeight || 0
+			
 			if (option.type == 2) {
 				this.type = option.type
 				uni.setNavigationBarTitle({