feat(代理的代理页): 展示我的信息
This commit is contained in:
parent
13ee114262
commit
b7861c6f87
@ -23,7 +23,7 @@
|
||||
<!-- 用户信息 -->
|
||||
<div style="display: flex; align-items: center">
|
||||
<img
|
||||
:src="avatarUrl || ''"
|
||||
:src="userInfo.userAvatar || ''"
|
||||
alt=""
|
||||
width="50px"
|
||||
style="aspect-ratio: 1/1; border-radius: 50%; object-fit: cover"
|
||||
@ -31,7 +31,7 @@
|
||||
/>
|
||||
<div style="flex: 1">
|
||||
<div style="margin-bottom: 4px; font-weight: 600">
|
||||
{{ userInfo.name }}
|
||||
{{ userInfo.userNickname || userInfo.name }}
|
||||
</div>
|
||||
<div style="font-size: 0.9em; color: rgba(0, 0, 0, 0.4)">ID: {{ userInfo.id }}</div>
|
||||
</div>
|
||||
@ -47,28 +47,17 @@ import { reactive } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import MobileHeader from '../../components/MobileHeader.vue'
|
||||
import { showError } from '@/utils/toast.js'
|
||||
import { usePageInitializationWithConfig } from '@/utils/pageConfig.js'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
// 用户信息
|
||||
const userInfo = reactive({
|
||||
name: 'User1',
|
||||
id: '1234567890',
|
||||
})
|
||||
|
||||
const defaultAvatarUrl = (e) => {
|
||||
console.log('头像资源出错')
|
||||
e.target.onerror = null //防止循环
|
||||
e.target.src = new URL('/src/assets/images/WeeklyStar/defaultAvatar.png', import.meta.url).href
|
||||
}
|
||||
|
||||
// 方法
|
||||
const leaveAgent = () => {
|
||||
if (confirm('Are you sure you want to leave this agency?')) {
|
||||
showError('Leave agency request submitted')
|
||||
// 这里可以添加实际的离开代理商逻辑
|
||||
}
|
||||
}
|
||||
const { userInfo } = usePageInitializationWithConfig('AGENCY_CENTER')
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user