wangfukang 1 week ago
parent
commit
f1b091bc07
  1. 10
      package1/ieBrowser/chat.vue

10
package1/ieBrowser/chat.vue

@ -156,7 +156,7 @@
<script> <script>
import ieSocket from '@/common/ieSocket.js' import ieSocket from '@/common/ieSocket.js'
import { finishIeRoom, reportIeRoom, blockIeUser, unblockIeUser, getIeBlockStatus, pageIeMessages, sendIeMessage, getIeUserProfile } from '@/common/ieApi.js' import { finishIeRoom, reportIeRoom, blockIeRoomTarget, unblockIeRoomTarget, getIeRoomBlockStatus, pageIeMessages, sendIeMessage, getIeUserProfile } from '@/common/ieApi.js'
import tui from '@/common/httpRequest.js' import tui from '@/common/httpRequest.js'
export default { export default {
@ -339,8 +339,8 @@
}, 120) }, 120)
}, },
async loadBlockStatus() { async loadBlockStatus() {
if (!this.targetUserId) return if (!this.roomId) return
const status = await getIeBlockStatus(this.targetUserId) const status = await getIeRoomBlockStatus(this.roomId)
if (!status) return if (!status) return
this.blockedByMe = !!status.blockedByMe this.blockedByMe = !!status.blockedByMe
this.blockedByOther = !!status.blockedByOther this.blockedByOther = !!status.blockedByOther
@ -852,7 +852,7 @@
confirmColor: '#e85d75', confirmColor: '#e85d75',
success: async (res) => { success: async (res) => {
if (!res.confirm) return if (!res.confirm) return
await blockIeUser(this.targetUserId, '聊天中拉黑') await blockIeRoomTarget(this.roomId, '聊天中拉黑')
this.blockedByMe = true this.blockedByMe = true
this.isBlocked = true this.isBlocked = true
this.showEmoji = false this.showEmoji = false
@ -874,7 +874,7 @@
confirmColor: '#6c69d8', confirmColor: '#6c69d8',
success: async (res) => { success: async (res) => {
if (!res.confirm) return if (!res.confirm) return
await unblockIeUser(this.targetUserId) await unblockIeRoomTarget(this.roomId)
this.blockedByMe = false this.blockedByMe = false
this.isBlocked = this.blockedByOther this.isBlocked = this.blockedByOther
uni.showToast({ title: '已解除拉黑', icon: 'none' }) uni.showToast({ title: '已解除拉黑', icon: 'none' })

Loading…
Cancel
Save