cyl/master-0822
wangxia 3 months ago
parent 051453f94c
commit 41b5a0c064

@ -130,7 +130,7 @@
<view class="checkBox" hover-class="none" v-if="from == 'share'" @click.stop="checkJob(item)">
<checkbox class="biggerSize" style="transform: scale(0.8, 0.8)" color="g_c_main" :checked="item.checked" :value="item.checked"></checkbox>
</view>
<view class="checkBox" hover-class="none" v-if="from == 'chat'" @click.stop="sendJob(item)">
<view class="checkBox g_c_main g_fs_14" hover-class="none" v-if="from == 'chat'" @click.stop="sendJob(item)">
选择
</view>
</view>

@ -552,6 +552,7 @@ const sendJob = (_item) => {
msg: customMsg,
conversationId,
sendBefore: () => {
jobListShow.value = false
// scrollBottom();
},
});

@ -70,7 +70,7 @@
<div class="msg-input-button" v-if="false">
<Icon @tap="handleEmojiVisible" class="g_p_6" style="padding-right: 5px" :size="28" type="icon-biaoqing" />
</div>
<div class="msg-input-button">
<div class="msg-input-button" v-if="true">
<Icon @tap="handleSendMoreVisible" class="g_p_6" style="padding-left: 5px; padding-right: 8px" type="send-more" :size="28" />
</div>
</div>
@ -122,12 +122,12 @@
</div>
<div class="icon-text">{{ t("fileText") }}</div>
</div>
<div class="send-more-panel-item-wrapper" v-if="corpUserFlag">
<!-- <div class="send-more-panel-item-wrapper" v-if="corpUserFlag">
<div class="send-more-panel-item" @tap="(event) => handleSendCustomMsg('album', event)">
<Icon type="icon-touxiang5" :size="30"></Icon>
</div>
<div class="icon-text">{{ t("customText") }}</div>
</div>
</div> -->
<div class="send-more-panel-item-wrapper" v-if="corpUserFlag">
<div class="send-more-panel-item" @tap="(event) => handleSendJob()">
<Icon type="icon-touxiang5" :size="30"></Icon>
@ -158,7 +158,7 @@
import Face from "./face.vue";
import VoicePanel from "./voice-panel.vue";
import Icon from "../../../components/Icon.vue";
import { ref, getCurrentInstance, computed, onUnmounted, onMounted, defineProps, withDefaults, defineEmits } from "../../../utils/transformVue";
import { ref, getCurrentInstance, computed, onUnmounted, onMounted, defineProps, withDefaults,defineEmits } from "../../../utils/transformVue";
import { ALLOW_AT, events, REPLY_MSG_TYPE_MAP } from "../../../utils/constants";
import { emojiMap } from "../../../utils/emoji";
import { t } from "../../../utils/i18n";
@ -193,6 +193,7 @@ const props = withDefaults(
{}
);
const emits = defineEmits(["jobListShow"]);
const conversationId = props.conversationType === V2NIMConst.V2NIMConversationType.V2NIM_CONVERSATION_TYPE_P2P ? uni.$UIKitNIM.V2NIMConversationIdUtil.p2pConversationId(props.to) : uni.$UIKitNIM.V2NIMConversationIdUtil.teamConversationId(props.to);
const inputText = ref("");
@ -349,54 +350,63 @@ const onClickEmojiInput = () => {
const writeStyle = ref("");
const isIOS = ref(false);
writeStyle.value = "bottom:0";
// #ifdef MP-WEIXIN
// // #ifdef MP-WEIXIN
// const pushUp = ref(false)
// // #endif
// // #ifdef APP-PLUS
// const pushUp = ref(true)
// // #endif
const pushUp = ref(false);
// #endif
// #ifdef APP-PLUS
const pushUp = ref(true);
// #endif
const keyHeight = ref(350);
const msgKeyHeight = ref("100%");
// message-input.vuekeyboardheightchange
const keyboardheightchange = (e) => {
// console.log("", e.detail.height);
keyHeight.value = e.detail.height;
uni.$emit(events.KeyboardEvent, e.detail.height);
uni.$emit("KeyboardHeight", e.detail.height);
if (e.detail.height === 0) {
writeStyle.value = "bottom: 0";
if (sendMoreVisible.value || emojiVisible.value || extVisible.value || audioPanelVisible.value) {
uni.$emit(events.KeyboardEvent, 230);
} else {
uni.$emit(events.KeyboardEvent, 0);
}
uni.$emit("msgKeyHeight", "100%");
uni.$emit("msgKeyHeight", "100%"); //
} else {
//
emojiVisible.value = false;
extVisible.value = false;
audioPanelVisible.value = false;
sendMoreVisible.value = false;
msgKeyHeight.value = screenHeight.value - keyHeight.value;
uni.$emit("msgKeyHeight", msgKeyHeight.value);
// APP
const systemInfo = uni.getSystemInfoSync();
const safeBottom = systemInfo.safeAreaInsets?.bottom || 0;
// = - -
//
// #ifdef MP-WEIXIN
const availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 134;
uni.$emit("msgKeyHeight", availableHeight); //
writeStyle.value = `bottom: calc(${e.detail.height}px - env(safe-area-inset-bottom))`;
// pushUp.value = false
// #endif
// #ifdef APP-PLUS
// const systemInfo = uni.getSystemInfoSync().height;
// const safeArea = systemInfo.safeArea.height;
// const bottomSafeAreaHeight = systemInfo.screenHeight - safeArea.bottom;
// 34
// writeStyle.value = `bottom: calc(${e.detail.height - 34}px)`;
//
let availableHeight, bottomValue;
if (systemInfo.platform === "ios") {
//
availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom;
bottomValue = e.detail.height - safeBottom - 34;
} else {
//
availableHeight = systemInfo.windowHeight - e.detail.height - safeBottom - 34;
bottomValue = e.detail.height - safeBottom;
}
uni.$emit("msgKeyHeight", availableHeight); //
writeStyle.value = `bottom: ${bottomValue}px`;
// #endif
}
// }
};
const handleInputBlur = () => {
@ -943,6 +953,8 @@ onUnmounted(() => {
</script>
<style scoped lang="scss">
@import "../../styles/common.scss";
.input-root {
width: 100%;
display: flex;

@ -2,8 +2,8 @@
<div class="msg-list-wrapper" @click="handleTapMessageList" :style="{'height':msgKeyHeight}">
<scroll-view id="message-scroll-list" scroll-y="true" @scroll="handleScroll" @click.stop="nothing"
:scroll-top="scrollTop" class="message-scroll-list g_flex_column_end" style="overflow-x: hidden;" :style="{'height':msgKeyHeight}">
<view class="g_clear_scroll" style="overflow-y: auto;overflow-x: hidden;">
:scroll-top="scrollTop" class="message-scroll-list g_flex_column_end" style="overflow-x: hidden;height: 100%" :style="{'height':msgKeyHeight}">
<view class="g_clear_scroll" style="overflow-y: auto;overflow-x: hidden;" :style="isWeapp ? '' :paddingBottom">
<!-- :style="paddingBottom" -->
<!-- <div v-show="!noMore" @click.stop="onLoadMore" class="view-more-text">
{{ t("viewMoreText") }}
@ -139,6 +139,7 @@
const screenHeight1 = ref('')
const screenHeight2 = ref('')
const isWeapp = ref(true)
@ -146,18 +147,19 @@
// {{keyHeight}} {{writeStyle}}{{screenHeight}}{{msgKeyHeight}}
uni.$on('msgKeyHeight', (res) => {
mlwHeight.value = res;
screenHeight1.value = res;
if (res != '100%') {
msgKeyHeight.value = res + 'px'
// 100%
if (typeof res === 'number') {
msgKeyHeight.value = `${res - 34}px`;
} else {
msgKeyHeight.value = res
msgKeyHeight.value = res; // '100%'
}
//
setTimeout(() => {
scrollToBottom();
}, 1)
}
})
}, 50);
});
// // console.log(finalMsgs.value.length +"========================")
@ -189,7 +191,7 @@
// .exec();
// #ifdef MP-WEIXIN
isWeapp.value = true; //
query.select(".msg-list-wrapper")
.boundingClientRect((res) => {
uni.$emit('screenHeight', res.height);
@ -197,20 +199,21 @@
.exec();
// #endif
// #ifdef APP-PLUS
isWeapp.value = false; //
uni.$emit('screenHeight', uni.getSystemInfoSync().windowHeight);
// #endif
// message-list.vueKeyboardHeight
uni.$on('KeyboardHeight',(e) =>{
rell.value = "新键盘高度" + e
rell.value = "新键盘高度" + e;
if (e > 0) {
paddingBottom.value = `padding-bottom:${e}px`
// APPpaddingpadding
paddingBottom.value = isWeapp.value ? `padding-bottom:${e}px` : '';
} else {
// e == 0 0
paddingBottom.value = `padding-bottom:0px`;
}
})
});
// // #ifdef MP-WEIXIN
// if(uni.getSystemInfoSync().osName == "ios"){

Loading…
Cancel
Save