fix(转账对象的身份徽章): 统一设置成只显示金币代理

This commit is contained in:
hzj 2025-11-19 19:21:37 +08:00
parent 24d06d9204
commit 9f29da854c
3 changed files with 5 additions and 82 deletions

View File

@ -221,22 +221,10 @@
<!-- 身份 -->
<div style="margin-left: 62px; height: 20px; display: flex; gap: 5px">
<img
v-if="selectedPayee.isHost"
src="../../assets/icon/identity/host.png"
alt=""
height="100%"
/>
<img
v-if="selectedPayee.isAgency"
src="../../assets/icon/identity/agency.png"
alt=""
height="100%"
/>
<img
v-if="selectedPayee.hasSalary"
src="../../assets/icon/identity/coinSeller.png"
alt=""
height="100%"
style="display: block"
/>
</div>
</div>

View File

@ -123,25 +123,10 @@
</div>
<div style="display: flex; gap: 2px; margin-top: 8px; margin-left: 50px; height: 20px">
<img
v-if="user.isHost"
src="../../../assets/icon/identity/host.png"
alt=""
height="100%"
style="object-fit: cover"
/>
<img
v-if="user.isAgency"
src="../../../assets/icon/identity/agency.png"
alt=""
height="100%"
style="object-fit: cover"
/>
<img
v-if="user.hasSalary"
src="../../../assets/icon/identity/coinSeller.png"
alt=""
height="100%"
style="object-fit: cover"
style="display: block; object-fit: cover"
/>
</div>
</div>
@ -225,7 +210,7 @@ import { ref, computed, onMounted, watch, nextTick } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import GeneralHeader from '@/components/GeneralHeader.vue'
import { userBankCheckTransfer, userBankSearchUserProfile } from '@/api/wallet.js'
import { userBankSearchUserProfile } from '@/api/wallet.js'
import { setSelectedPayee } from '@/utils/payeeStore.js'
import { showError } from '@/utils/toast.js'
import maskLayer from '@/components/MaskLayer.vue'
@ -245,7 +230,6 @@ const isSearching = ref(false)
const hasSearched = ref(false)
const userRole = ref('')
const isLoadingRole = ref(false)
const selectedUserType = ref('')
const maskLayerShow = ref(false)
const selectedUser = ref({})
@ -256,36 +240,6 @@ const defaultAvatarUrl = (e) => {
e.target.src = new URL('/src/assets/images/WeeklyStar/defaultAvatar.png', import.meta.url).href
}
//
const checkUserRole = async () => {
isLoadingRole.value = true
try {
const response = await userBankCheckTransfer()
if (response.status && response.body) {
// role
userRole.value = response.body.role || ''
//
if (userRole.value === 'TEAM_OWN') {
selectedUserType.value = 'ANCHOR' // TEAM_OWN ANCHOR
} else {
selectedUserType.value = 'AGENT' // AGENT
}
} else {
userRole.value = ''
selectedUserType.value = 'USER'
}
} catch (error) {
console.error('Failed to check user role:', error)
userRole.value = ''
selectedUserType.value = 'USER'
} finally {
isLoadingRole.value = false
}
}
//
const performSearch = async () => {
console.log('searchQuery.value:', searchQuery.value)
@ -308,16 +262,11 @@ const performSearch = async () => {
account: response.body.account,
name: response.body.userNickname,
avatar: response.body.userAvatar,
type: selectedUserType.value,
sex: response.body.userSex,
age: response.body.age,
countryName: response.body.countryName,
countryCode: response.body.countryCode,
accountStatus: response.body.accountStatus,
//
isHost: selectedUserType.value === 'ANCHOR',
isAgency: ['AGENT', 'BD'].includes(selectedUserType.value),
hasSalary: ['ANCHOR', 'BD'].includes(selectedUserType.value),
}
searchResults.value = [user]
} else {
@ -383,9 +332,7 @@ watch(
)
//
onMounted(() => {
checkUserRole()
})
onMounted(() => {})
</script>
<style scoped>

View File

@ -130,22 +130,10 @@
<!-- 身份 -->
<div style="margin-left: 62px; height: 20px; display: flex; gap: 5px">
<img
v-if="selectedPayee.isHost"
src="../../../assets/icon/identity/host.png"
alt=""
height="100%"
/>
<img
v-if="selectedPayee.isAgency"
src="../../../assets/icon/identity/agency.png"
alt=""
height="100%"
/>
<img
v-if="selectedPayee.hasSalary"
src="../../../assets/icon/identity/coinSeller.png"
alt=""
height="100%"
style="display: block"
/>
</div>
</div>