Merge branch 'develop' of http://25.13.9.101:9000/K17_AITS/tra-app into develop

This commit is contained in:
田岩
2026-03-05 09:31:42 +08:00
+37 -12
View File
@@ -24,7 +24,7 @@
<view class="picture-cont" v-if="isShow && !isReply">
<!-- 下方的图片展示框 -->
<view class="imgs-div" v-if="!isImg">
<image-preview class="upload-img" v-for="item in fileList" :src="item" mode=""></image-preview>
<image-preview class="upload-img" v-for="item in fileList" :imgId="item" mode=""></image-preview>
</view>
<view class="picture" v-if="isImg">
<picture-upload :limit="4" v-model="fileList"></picture-upload>
@@ -70,11 +70,14 @@
<view class="tool-icon tool-icon-img" @click="upload()" v-if="!isReply">
<image class="img" :src="commentInput3" mode="aspectFit"></image>
</view>
<view class="tool-icon tool-icon-emoji" @click="showKeyborad">
<!-- <view class="tool-icon tool-icon-emoji" v-if="!isFocus" @click="showKeyborad">
<image class="img" :src="commentInput2" mode="aspectFit"></image>
</view> -->
<view class="tool-icon tool-icon-emoji" @click="showEmojiNow">
<image class="img" :src="commentInput1" mode="aspectFit"></image>
</view>
<view class="fl1"></view>
<view class="tool-send" @click="submit">发送</view>
<view :class="['tool-send', value.length === 0?'is-disabled':'']" @click="submit">发送</view>
</view>
<!-- 下方主要表情输入框 -->
<view class="bottom-main-input-div">
@@ -113,7 +116,7 @@
import commentInput2 from '@/static/images/courseDetail/comment-input-2.png'
import commentInput3 from '@/static/images/courseDetail/comment-input-3.png'
import commentInput4 from '@/static/images/courseDetail/comment-input-4.png'
import { reactive, ref, watch, nextTick, computed } from 'vue';
import { reactive, ref, watch, nextTick, computed, onBeforeUnmount } from 'vue';
import { emojiList } from '@/emoji';
import { publishCrsEvaluation, queryTraMemeInfoList } from '@/api/courseDetail.js'
import common from '@/common/common.js';
@@ -144,7 +147,6 @@
// '/src/static/images/test/e7dd89a71493fcc6281700a4864e24cb.jpg'
])
const isShow = ref(false);
const popHeight = ref('0px')
const value = ref('');
const click_input = () => {
if(!isShow.value) isShow.value = true
@@ -161,9 +163,14 @@
isFocus.value = true
cursorLength.value = resStart.value || value.value.length
}
const showEmoji = ref(false)
const showEmojiNow = () => {
showEmoji.value = !showEmoji.value
}
const popHeight = ref('0px')
const focus = (event) => {
popHeight.value = 'calc(270px + 120rpx)'
isShow.value = true
isFocus.value = true
console.log('focusevent');
if(!isReply.value){
getMemList()
@@ -263,15 +270,14 @@
})
}
const setMemValue = (item) => {
console.log(item)
if(!isImg.value || fileList.value.length == 0){
fileList.value = [item.ossAddr]
fileList.value = [item.ossKey]
isImg.value = false
return
}
common.show('','是否清空当前图片并重新添加?').then((res) => {
if (res) {
fileList.value = [item.ossAddr]
fileList.value = [item.ossKey]
isImg.value = false
}
});
@@ -314,9 +320,6 @@
value.value = ''
fileList.value = []
emit('submitOver')
if (from.value === 'study') {
} else {
}
}, 500);
}, delayTime);
}).catch(err=>{
@@ -335,6 +338,24 @@
isImg.value = true
}
})
const keyboardHeight = ref(0)
const maxKeyboardHeight = ref(0)
uni.onKeyboardHeightChange((res)=>{
maxKeyboardHeight.value = res.height > keyboardHeight.value?res.height : keyboardHeight.value
keyboardHeight.value = res.height
})
onBeforeUnmount(()=>{
})
watch(()=> showEmoji.value,(val)=>{
popHeight.value = val ? `${maxKeyboardHeight.value}px` : (keyboardHeight.value+'px')
})
watch(()=> keyboardHeight.value,(val)=>{
console.log(val,showEmoji.value)
console.log(maxKeyboardHeight.value)
popHeight.value = showEmoji.value ? `${maxKeyboardHeight.value}px` : keyboardHeight.value+'px'
console.log(popHeight.value)
})
defineExpose({hideAll, resetVal})
</script>
@@ -455,6 +476,10 @@
font-size: 30rpx;
color: #fff;
margin-right: 20rpx;
&.is-disabled{
background-color: #ccc;
// pointer-events: none;
}
}
}
.main-div {