瀏覽代碼

样式修改

tanxue 5 小時之前
父節點
當前提交
c6577ad812
共有 2 個文件被更改,包括 12 次插入4 次删除
  1. 2 1
      common/styles/global/pages.scss
  2. 10 3
      pages/client/hetong/HetongInfo.vue

+ 2 - 1
common/styles/global/pages.scss

@@ -707,7 +707,8 @@
 	padding: 16rpx 0;border:1rpx solid  rgba(0, 0, 0, 0.3);}
 	.pdf-img{width: 614rpx;height: 870rpx;display: block;margin: 16rpx auto;}
 	.pdf-tip-box{
-		position: absolute;top: calc(140rpx + var(--status-bar-height));left: 0;right:0;bottom: 0;
+		// top: calc(140rpx + var(--status-bar-height));
+		left: 0;right:0;bottom: 0;position: absolute;
 		display: flex;align-items: center;justify-content: center;color: #666;background-color: #fff;
 		border: 24rpx solid #f8f9fd;}
 	.tip-img-box{display: flex;flex-direction: column;}

+ 10 - 3
pages/client/hetong/HetongInfo.vue

@@ -8,7 +8,7 @@
 					@click="previewBase64Image(`data:image/png;base64,${item}`)" class="pdf-img" />
 			</view>
 			<!-- 加载提示 -->
-			<view class="pdf-tip-box" v-if="isLoading">
+			<view class="pdf-tip-box" v-if="isLoading" :style="{ top: `calc(42px + ${statusBarHeight}px );`}">
 				<view class="tip-img-box">
 					<view :style="{ backgroundImage: 'url(' + imgsArr.loadingIcon + ')' }" class="tip-icon"/>
 					 <view class="tip-text">加载中...</view>
@@ -33,7 +33,7 @@
 
 <script setup>
 	import {
-		ref,reactive
+		ref,reactive,onMounted
 	} from "vue";
 	import * as httpApi from "@/api/jzHetong.js"
 	import cacheManager from '@/utils/cacheManager.js'
@@ -48,7 +48,7 @@
 	import {
 		base64ToPath
 	} from "image-tools";
-
+	const statusBarHeight = ref(0);	
 	const tId = ref(null)
 
 	const info = ref({})
@@ -62,6 +62,13 @@
 	})
 	const fromPage = ref('')
 
+	onMounted(() => {
+			uni.getSystemInfo({
+			success: (res) => {
+			statusBarHeight.value = res.statusBarHeight;
+			}
+			});
+		});
 	onLoad((options) => {
 		tId.value = options.id;
 		fromPage.value = options.from;