吸顶样式,发送语音显示样式

This commit is contained in:
杨航
2025-08-08 09:55:00 +08:00
parent 401c2cfa1a
commit 632fd045df
3 changed files with 58 additions and 11 deletions
+31
View File
@@ -34,6 +34,9 @@
<image class="btn-box" v-else src="/src/static/images/course/close-active.png" mode=""></image>
</view>
</view>
<view :class="['talk-dialog',isOut?'is-out':'']">
<image src="@/static/images/course/voice-white.gif" mode="" class="gif-box"></image>
</view>
</view>
</uv-overlay>
</view>
@@ -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;
+16 -6
View File
@@ -48,9 +48,9 @@
<uv-icon class="arrow-icon" name="arrow-left" @click="backRouter()"/>
课程学习
</view>
<view class="study-num">
<view class="color-blue">{{ showOrder }}</view> / {{ pgrphNum }}
</view>
<view class="study-num">
<view class="color-blue">{{ showOrder }}</view> / {{ pgrphNum }}
</view>
<scroll-view
class="talking-list"
:scroll-y="true"
@@ -645,7 +645,13 @@ onMounted(()=>{
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{
+11 -5
View File
@@ -14,6 +14,7 @@
<image src="@/static/images/dialog/history.png" alt="" class="image-icon"></image>
</view>
</view>
<view class="ai-info">
<!-- <image src="@/static/images/dialog/pet-3.png" alt="" class="image-pet-bg"></image> -->
<image src="@/static/images/dialog/pet-bg-base.png" alt="" class="image-pet-bg"></image>
@@ -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;