From d3a573e03dee24ed68450fad06242c48da70673f Mon Sep 17 00:00:00 2001 From: yanghang Date: Fri, 25 Jul 2025 09:59:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=8C=E5=AE=89=E5=85=A8=E5=B2=9B=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/course/study.vue | 43 ++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index a0acb5c6..5b4aace1 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -40,7 +40,9 @@ {{chooseRate}}倍 - + + + @@ -176,6 +178,21 @@ const answerValue = ref('') const inputRef = ref('') const flagVal = ref('1') const isUploadingVoice = ref(false) + +const { + // windowWidth, + // windowHeight, + // windowTop, + statusBarHeight, + screenTop, + safeArea, + // screenHeight, + // safeAreaInsets +} = uni.getWindowInfo() + +console.log(safeArea,screenTop,statusBarHeight) +const pageTopPadding = computed(() => statusBarHeight + 'px') + // 初始化数据 const getData = async (flag) => { try{ @@ -924,22 +941,26 @@ const chooseRateNow = (item) => { position: absolute; z-index: 3; right: 20rpx; - top: 68rpx; + top: calc(v-bind(pageTopPadding) + 8rpx); font-size: 26rpx; width: 140rpx; - height: 52rpx; - padding: 10rpx 0; + height: 92rpx; + padding: 30rpx 0; overflow: hidden; line-height: 32rpx; text-align: right; - padding-right: 48rpx; + padding-right: 68rpx; .image-icon{ width: 30rpx; height: 32rpx; position: absolute; - right: 0; - top: 10rpx; + right: 10rpx; + top: 30rpx; + .image-icon-img{ + width: 100%; + height: 100%; + } } } .course-study-body{ @@ -953,12 +974,12 @@ const chooseRateNow = (item) => { box-sizing: border-box; display: flex; flex-direction: column; + padding-top: v-bind(pageTopPadding); .body-title{ - - height: 150rpx; + height: 110rpx; text-align: center; font-size: 33rpx; - padding-top: 70rpx; + padding-top: 30rpx; line-height: 46rpx; box-sizing: border-box; font-weight: 500; @@ -968,7 +989,7 @@ const chooseRateNow = (item) => { .arrow-icon{ position: absolute; left:21rpx; - top:65rpx; + top:25rpx; color: #000; padding: 15rpx; // background-color: red;