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)"> <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> <checkbox class="biggerSize" style="transform: scale(0.8, 0.8)" color="g_c_main" :checked="item.checked" :value="item.checked"></checkbox>
</view> </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>
</view> </view>

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

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

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

Loading…
Cancel
Save