From 632fd045dfa83e927de6c940e124b5f98610db7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Fri, 8 Aug 2025 09:55:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=B8=E9=A1=B6=E6=A0=B7=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E5=8F=91=E9=80=81=E8=AF=AD=E9=9F=B3=E6=98=BE=E7=A4=BA=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/course/components/touchBtn.vue | 31 ++++++++++++++++++++++++ src/pages/course/study.vue | 22 ++++++++++++----- src/pages/index/dialog.vue | 16 ++++++++---- 3 files changed, 58 insertions(+), 11 deletions(-) diff --git a/src/pages/course/components/touchBtn.vue b/src/pages/course/components/touchBtn.vue index 189d94e2..db5808bf 100644 --- a/src/pages/course/components/touchBtn.vue +++ b/src/pages/course/components/touchBtn.vue @@ -34,6 +34,9 @@ + + + @@ -442,6 +445,34 @@ const changeBtn = () => { height: 234rpx; margin: 0 auto; background-color: #06f; + border-radius: 32rpx; + position: relative; + &.is-out{ + background-color: #ff3e49; + &::after{ + background-color: #ff3e49; + } + } + .gif-box{ + position: absolute; + width: 200rpx; + height: 80rpx; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + } + &::after{ + content: ''; + width: 44rpx; + height: 44rpx; + clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); + background-color: #06f; + overflow: hidden; + position: absolute; + bottom: -22rpx; + left:50%; + margin-left: -22rpx; + } } .white-bg-box{ height: 365rpx; diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 8e9b09eb..82c8202d 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -48,9 +48,9 @@ 课程学习 - - {{ showOrder }} / {{ pgrphNum }} - + + {{ showOrder }} / {{ pgrphNum }} + { initsocketTask() getData('1'); }) + const keyboardHeight = ref('0px') + const setHeight = (res) => { + keyboardHeight.value = res.height +'px' + scrollToBottomNow() + } onHide(()=>{ + uni.offKeyboardHeightChange(setHeight) if(watchFlag.value === 1) return changePlayItemId('') socketStore.closeSocket() @@ -654,6 +660,7 @@ onHide(()=>{ // }).finally(() => {}) }) onShow(()=>{ + uni.onKeyboardHeightChange(setHeight) if(watchFlag.value === 1) return // getData('2'); initsocketTask() @@ -959,8 +966,9 @@ const chooseRateNow = (item) => { position: absolute; overflow: hidden; left:0; - top: 0; - height: 100%; + bottom: 0; + // height: 100%; + height: calc(100% - v-bind(keyboardHeight)); width: 100%; padding:0 0rpx; box-sizing: border-box; @@ -991,7 +999,8 @@ const chooseRateNow = (item) => { height: 36rpx; line-height: 36rpx; text-align: center; - padding-top: 30rpx; + padding-top: 20rpx; + padding-bottom: 10rpx; box-sizing: content-box; background: url(@/static/images/course/study-bg.png) no-repeat; border-radius: 30rpx 30rpx 0 0; @@ -1006,6 +1015,7 @@ const chooseRateNow = (item) => { padding: 10rpx 30rpx; background: url(@/static/images/course/study-bg.png) no-repeat; background-size: cover; + background-position: center bottom; box-sizing: border-box; width: 100%; .talking-list-cont{ diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue index cbbcb32a..6e984d11 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -14,6 +14,7 @@ + @@ -541,11 +542,16 @@ const refreshData = () => { loadData(); }; + + const keyboardHeight = ref('0px') + const setHeight = (res) => { + keyboardHeight.value = res.height +'px' + } onHide(() => { - + uni.offKeyboardHeightChange(setHeight) }) onShow(() => { - + uni.onKeyboardHeightChange(setHeight) }) onUnload(() => { watchFlag.value = 1 @@ -561,7 +567,7 @@ position: relative; display: flex; flex-direction: column; - height: 100vh; + height: calc(100vh - 0px); overflow: hidden; } @@ -582,8 +588,8 @@ position: absolute; overflow: hidden; left: 0; - top: 0%; - height: 100%; + bottom: 0%; + height: calc(100% - v-bind(keyboardHeight)); width: 100%; padding: 0; box-sizing: border-box;