解决聊天全部放开后出现的问题
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
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:
parent
3183ff5049
commit
f6038e95a0
@ -89,6 +89,7 @@ const text_avatar = computed(() => {
|
|||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
:disabled="props?.disabled"
|
:disabled="props?.disabled"
|
||||||
:class="[props?.disabled ? 'custom-btn-class-disabled' : '']"
|
:class="[props?.disabled ? 'custom-btn-class-disabled' : '']"
|
||||||
:plain="props?.plain"
|
:plain="props?.plain"
|
||||||
|
:loading="props?.isLoading"
|
||||||
>
|
>
|
||||||
{{ props.btnText }}
|
{{ props.btnText }}
|
||||||
</wd-button>
|
</wd-button>
|
||||||
@ -35,6 +36,7 @@ const props = defineProps({
|
|||||||
subBtnText: '', //次要按钮文字
|
subBtnText: '', //次要按钮文字
|
||||||
disabled: false, //是否禁用
|
disabled: false, //是否禁用
|
||||||
plain: false, //是否镂空
|
plain: false, //是否镂空
|
||||||
|
isLoading: false, //是否正在加载中
|
||||||
})
|
})
|
||||||
|
|
||||||
//点击副按钮
|
//点击副按钮
|
||||||
|
@ -17,8 +17,9 @@ defineProps({
|
|||||||
<!-- {{ data.nickname }} -->
|
<!-- {{ data.nickname }} -->
|
||||||
管理员
|
管理员
|
||||||
</a>
|
</a>
|
||||||
<span>修改群名为</span>
|
<!-- <span>修改群名为</span>
|
||||||
<span>"{{ extra.group_name }}"</span>
|
<span>"{{ extra.group_name }}"</span> -->
|
||||||
|
<span>修改了群信息</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
<customBtn
|
<customBtn
|
||||||
:btnText="$t('button.text.edit')"
|
:btnText="$t('button.text.edit')"
|
||||||
@click="editAvatar"
|
@click="editAvatar"
|
||||||
|
:isLoading="state.isLoading"
|
||||||
></customBtn>
|
></customBtn>
|
||||||
</ZPaging>
|
</ZPaging>
|
||||||
</div>
|
</div>
|
||||||
@ -49,6 +50,10 @@ const dialogueParams = reactive({
|
|||||||
receiver_id: computed(() => dialogueStore.talk.receiver_id),
|
receiver_id: computed(() => dialogueStore.talk.receiver_id),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const state = reactive({
|
||||||
|
isLoading: false, //是否正在加载中
|
||||||
|
})
|
||||||
|
|
||||||
const onProgressFn = (progress, id) => {
|
const onProgressFn = (progress, id) => {
|
||||||
console.log((progress.loaded / progress.total) * 100, 'progress')
|
console.log((progress.loaded / progress.total) * 100, 'progress')
|
||||||
|
|
||||||
@ -69,6 +74,7 @@ const editAvatar = () => {
|
|||||||
count: 1,
|
count: 1,
|
||||||
success: async (res) => {
|
success: async (res) => {
|
||||||
console.log(res, 'res')
|
console.log(res, 'res')
|
||||||
|
state.isLoading = true
|
||||||
res.tempFiles.forEach(async (file) => {
|
res.tempFiles.forEach(async (file) => {
|
||||||
console.log(file)
|
console.log(file)
|
||||||
let image = new Image()
|
let image = new Image()
|
||||||
@ -93,6 +99,7 @@ const editAvatar = () => {
|
|||||||
const resp = ServeEditGroup(params)
|
const resp = ServeEditGroup(params)
|
||||||
resp.then(({ code }) => {
|
resp.then(({ code }) => {
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
|
state.isLoading = false
|
||||||
groupStore.updateGroupInfo({
|
groupStore.updateGroupInfo({
|
||||||
avatar: data.ori_url,
|
avatar: data.ori_url,
|
||||||
})
|
})
|
||||||
@ -100,13 +107,18 @@ const editAvatar = () => {
|
|||||||
// delta: 1,
|
// delta: 1,
|
||||||
// })
|
// })
|
||||||
} else {
|
} else {
|
||||||
|
state.isLoading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
resp.catch(() => {})
|
resp.catch(() => {
|
||||||
|
state.isLoading = false})
|
||||||
} else {
|
} else {
|
||||||
|
state.isLoading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
)
|
).catch(() => {
|
||||||
|
state.isLoading = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -133,13 +133,26 @@
|
|||||||
@touchstart="() => handleAvatarTouchStart(item)"
|
@touchstart="() => handleAvatarTouchStart(item)"
|
||||||
@touchend="handleAvatarTouchEnd"
|
@touchend="handleAvatarTouchEnd"
|
||||||
>
|
>
|
||||||
<im-avatar
|
<!-- <im-avatar
|
||||||
class="pointer"
|
class="pointer"
|
||||||
:src="item.avatar"
|
:src="item.avatar"
|
||||||
:size="80"
|
:size="80"
|
||||||
:username="item.nickname"
|
:username="item.nickname"
|
||||||
@click="showUserInfoModal(item.user_id)"
|
@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>
|
</aside>
|
||||||
|
|
||||||
<!-- 主体信息 -->
|
<!-- 主体信息 -->
|
||||||
@ -952,7 +965,7 @@ const editorOption = {
|
|||||||
const handleSelectImg = (data, file_num) => {
|
const handleSelectImg = (data, file_num) => {
|
||||||
if (Array.isArray(data)) {
|
if (Array.isArray(data)) {
|
||||||
// 批量发送图片
|
// 批量发送图片
|
||||||
data.forEach(item => {
|
data.forEach((item) => {
|
||||||
onSendMessage({ ...item, file_num: item.file_num })
|
onSendMessage({ ...item, file_num: item.file_num })
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -31,12 +31,25 @@
|
|||||||
>
|
>
|
||||||
<template v-slot:left>
|
<template v-slot:left>
|
||||||
<div class="flex items-center ml-[48rpx]">
|
<div class="flex items-center ml-[48rpx]">
|
||||||
<image
|
<!-- <image
|
||||||
class="w-[72rpx] h-[72rpx]"
|
class="w-[72rpx] h-[72rpx]"
|
||||||
style="border-radius: 50%;"
|
style="border-radius: 50%;"
|
||||||
:src="userStore.avatar"
|
:src="userStore.avatar"
|
||||||
mode="scaleToFill"
|
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">
|
<div class="ml-[24rpx] text-[36rpx] font-bold">
|
||||||
{{ userStore.nickname }}
|
{{ userStore.nickname }}
|
||||||
</div>
|
</div>
|
||||||
@ -244,10 +257,13 @@ onLoad((options) => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
dialogueStore.setDialogue(openSession)
|
dialogueStore.setDialogue(openSession)
|
||||||
if (openSession.unread_num > 0) {
|
if (openSession.unread_num > 0) {
|
||||||
ServeClearTalkUnreadNum({
|
ServeClearTalkUnreadNum(
|
||||||
|
{
|
||||||
talk_type: openSession.talk_type,
|
talk_type: openSession.talk_type,
|
||||||
receiver_id: openSession.receiver_id,
|
receiver_id: openSession.receiver_id,
|
||||||
},dialogueParams.unReadNum).then(() => {
|
},
|
||||||
|
dialogueParams.unReadNum,
|
||||||
|
).then(() => {
|
||||||
talkStore.updateItem({
|
talkStore.updateItem({
|
||||||
index_name: openSession.index_name,
|
index_name: openSession.index_name,
|
||||||
unread_num: 0,
|
unread_num: 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user