解决聊天全部放开后出现的问题
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-03 15:45:12 +08:00
parent 3183ff5049
commit f6038e95a0
6 changed files with 58 additions and 13 deletions

View File

@ -89,6 +89,7 @@ const text_avatar = computed(() => {
img {
width: 100%;
height: 100%;
object-fit: cover;
}
}
</style>

View File

@ -19,6 +19,7 @@
:disabled="props?.disabled"
:class="[props?.disabled ? 'custom-btn-class-disabled' : '']"
:plain="props?.plain"
:loading="props?.isLoading"
>
{{ props.btnText }}
</wd-button>
@ -35,6 +36,7 @@ const props = defineProps({
subBtnText: '', //
disabled: false, //
plain: false, //
isLoading: false, //
})
//

View File

@ -17,8 +17,9 @@ defineProps({
<!-- {{ data.nickname }} -->
管理员
</a>
<span>修改群名为</span>
<span>"{{ extra.group_name }}"</span>
<!-- <span>修改群名为</span>
<span>"{{ extra.group_name }}"</span> -->
<span>修改了群信息</span>
</div>
</div>
</template>

View File

@ -22,6 +22,7 @@
<customBtn
:btnText="$t('button.text.edit')"
@click="editAvatar"
:isLoading="state.isLoading"
></customBtn>
</ZPaging>
</div>
@ -49,6 +50,10 @@ const dialogueParams = reactive({
receiver_id: computed(() => dialogueStore.talk.receiver_id),
})
const state = reactive({
isLoading: false, //
})
const onProgressFn = (progress, id) => {
console.log((progress.loaded / progress.total) * 100, 'progress')
@ -69,6 +74,7 @@ const editAvatar = () => {
count: 1,
success: async (res) => {
console.log(res, 'res')
state.isLoading = true
res.tempFiles.forEach(async (file) => {
console.log(file)
let image = new Image()
@ -93,6 +99,7 @@ const editAvatar = () => {
const resp = ServeEditGroup(params)
resp.then(({ code }) => {
if (code == 200) {
state.isLoading = false
groupStore.updateGroupInfo({
avatar: data.ori_url,
})
@ -100,13 +107,18 @@ const editAvatar = () => {
// delta: 1,
// })
} else {
state.isLoading = false
}
})
resp.catch(() => {})
resp.catch(() => {
state.isLoading = false})
} else {
state.isLoading = false
}
},
)
).catch(() => {
state.isLoading = false
})
}
})
},

View File

@ -133,13 +133,26 @@
@touchstart="() => handleAvatarTouchStart(item)"
@touchend="handleAvatarTouchEnd"
>
<im-avatar
<!-- <im-avatar
class="pointer"
:src="item.avatar"
:size="80"
:username="item.nickname"
@click="showUserInfoModal(item.user_id)"
/>
/> -->
<avatarModule
:mode="1"
:avatar="item.avatar"
:groupType="0"
:userName="item.nickname"
:customStyle="{ width: '80rpx', height: '80rpx' }"
:customTextStyle="{
fontSize: '32rpx',
fontWeight: 'bold',
color: '#fff',
lineHeight: '44rpx',
}"
></avatarModule>
</aside>
<!-- 主体信息 -->
@ -952,7 +965,7 @@ const editorOption = {
const handleSelectImg = (data, file_num) => {
if (Array.isArray(data)) {
//
data.forEach(item => {
data.forEach((item) => {
onSendMessage({ ...item, file_num: item.file_num })
})
} else {

View File

@ -31,12 +31,25 @@
>
<template v-slot:left>
<div class="flex items-center ml-[48rpx]">
<image
<!-- <image
class="w-[72rpx] h-[72rpx]"
style="border-radius: 50%;"
:src="userStore.avatar"
mode="scaleToFill"
/>
/> -->
<avatarModule
:mode="1"
:avatar="userStore.avatar"
:groupType="0"
:userName="userStore.nickname"
:customStyle="{ width: '72rpx', height: '72rpx' }"
:customTextStyle="{
fontSize: '32rpx',
fontWeight: 'bold',
color: '#fff',
lineHeight: '44rpx',
}"
></avatarModule>
<div class="ml-[24rpx] text-[36rpx] font-bold">
{{ userStore.nickname }}
</div>
@ -244,10 +257,13 @@ onLoad((options) => {
setTimeout(() => {
dialogueStore.setDialogue(openSession)
if (openSession.unread_num > 0) {
ServeClearTalkUnreadNum({
talk_type: openSession.talk_type,
receiver_id: openSession.receiver_id,
},dialogueParams.unReadNum).then(() => {
ServeClearTalkUnreadNum(
{
talk_type: openSession.talk_type,
receiver_id: openSession.receiver_id,
},
dialogueParams.unReadNum,
).then(() => {
talkStore.updateItem({
index_name: openSession.index_name,
unread_num: 0,