feat(代理的代理页): 展示我的信息

This commit is contained in:
hzj 2025-10-13 18:46:05 +08:00
parent 13ee114262
commit b7861c6f87

View File

@ -23,7 +23,7 @@
<!-- 用户信息 --> <!-- 用户信息 -->
<div style="display: flex; align-items: center"> <div style="display: flex; align-items: center">
<img <img
:src="avatarUrl || ''" :src="userInfo.userAvatar || ''"
alt="" alt=""
width="50px" width="50px"
style="aspect-ratio: 1/1; border-radius: 50%; object-fit: cover" style="aspect-ratio: 1/1; border-radius: 50%; object-fit: cover"
@ -31,7 +31,7 @@
/> />
<div style="flex: 1"> <div style="flex: 1">
<div style="margin-bottom: 4px; font-weight: 600"> <div style="margin-bottom: 4px; font-weight: 600">
{{ userInfo.name }} {{ userInfo.userNickname || userInfo.name }}
</div> </div>
<div style="font-size: 0.9em; color: rgba(0, 0, 0, 0.4)">ID: {{ userInfo.id }}</div> <div style="font-size: 0.9em; color: rgba(0, 0, 0, 0.4)">ID: {{ userInfo.id }}</div>
</div> </div>
@ -47,28 +47,17 @@ import { reactive } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import MobileHeader from '../../components/MobileHeader.vue' import MobileHeader from '../../components/MobileHeader.vue'
import { showError } from '@/utils/toast.js' import { showError } from '@/utils/toast.js'
import { usePageInitializationWithConfig } from '@/utils/pageConfig.js'
const router = useRouter() const router = useRouter()
//
const userInfo = reactive({
name: 'User1',
id: '1234567890',
})
const defaultAvatarUrl = (e) => { const defaultAvatarUrl = (e) => {
console.log('头像资源出错') console.log('头像资源出错')
e.target.onerror = null // e.target.onerror = null //
e.target.src = new URL('/src/assets/images/WeeklyStar/defaultAvatar.png', import.meta.url).href e.target.src = new URL('/src/assets/images/WeeklyStar/defaultAvatar.png', import.meta.url).href
} }
// const { userInfo } = usePageInitializationWithConfig('AGENCY_CENTER')
const leaveAgent = () => {
if (confirm('Are you sure you want to leave this agency?')) {
showError('Leave agency request submitted')
//
}
}
</script> </script>
<style scoped> <style scoped>