处理部分安卓机未读消息数量问题;处理表情发送选择不能滑动问题;处理安卓不能发送原图问题
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run

This commit is contained in:
wangyifeng 2025-04-02 13:57:27 +08:00
parent 21ebbf92d5
commit e0305ab496
3 changed files with 37 additions and 13 deletions

View File

@ -1,25 +1,34 @@
<template>
<div class="emojiRoot">
<div v-for="(img, key) in emojis" v-html="img" :key="key" @click="onSendEmoticon(1, key, img)"
class="option pointer flex-center" />
<div>
<zPaging :fixed="false" :height="'210px'" :show-scrollbar="false">
<div class="emojiRoot">
<div
v-for="(img, key) in emojis"
v-html="img"
:key="key"
@click="onSendEmoticon(1, key, img)"
class="option pointer flex-center"
/>
</div>
</zPaging>
</div>
</template>
<script setup>
import { ref, reactive, defineProps,defineEmits } from "vue"
import dayjs from "dayjs";
import zPaging from '@/uni_modules/z-paging/components/z-paging/z-paging.vue'
import { ref, reactive, defineProps, defineEmits } from 'vue'
import dayjs from 'dayjs'
import { beautifyTime } from '@/utils/datetime'
import { useTalkStore } from '@/store'
import { useSessionMenu } from '@/hooks'
import { emojis } from '@/utils/emojis'
const props = defineProps({
data: {
type: Object,
default: {},
required: false,
},
});
})
const emit = defineEmits(['on-select'])
const onSendEmoticon = (type, value, img = '') => {
@ -33,21 +42,15 @@ const onSendEmoticon = (type, value, img = '') => {
emit('on-select', { type, value, img })
}
}
</script>
<style lang="scss" scoped>
.emojiRoot {
width: 100%;
height: 420rpx;
padding: 5rpx 32rpx;
display: flex;
justify-content: flex-start;
align-items: center;
flex-wrap: wrap;
overflow: auto;
}
.option {

View File

@ -376,6 +376,9 @@ const onUploadImageVideo = async (file, type = 'image', fileUrl) => {
}
const base64ToFile = (base64) => {
if (!base64) {
message.warning('您的系统暂不支持发送原图哦')
}
// base64file
const [header, base64String] = base64.split(';base64,')
const imageType = header.split(':')[1]

View File

@ -102,6 +102,24 @@ export const useTalkStore = defineStore('talk', {
// 返回 Promise 对象,使调用方可以使用 then/catch
return resp.then(({ code, data }) => {
if (code == 200) {
//向OA的webview通信改变未读消息数量
if (typeof plus !== 'undefined') {
let OAWebView = plus.webview.all()
OAWebView.forEach((webview) => {
if (webview.id === 'webviewId1') {
webview.evalJS(`doUpdateUnreadNum('${data.unread_num}')`)
}
})
} else {
document.addEventListener('plusready', () => {
let OAWebView = plus.webview.all()
OAWebView.forEach((webview) => {
if (webview.id === 'webviewId1') {
webview.evalJS(`doUpdateUnreadNum('${data.unread_num}')`)
}
})
})
}
this.items = data.items.map((item) => {
const value = formatTalkItem(item)