mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-27 01:32:03 +08:00
45 lines
1.4 KiB
Vue
45 lines
1.4 KiB
Vue
|
<template>
|
||
|
<view class="container">
|
||
|
<uni-list>
|
||
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'person-filled'}" title="昵称" :rightText="user.nickname" />
|
||
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'phone-filled'}" title="手机号码" :rightText="user.mobile" />
|
||
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'email-filled'}" title="邮箱" :rightText="user.email" />
|
||
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'auth-filled'}" title="岗位" :rightText="(user.posts || []).map(post => post.name).join(',')" />
|
||
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'staff-filled'}" title="角色" :rightText="(user.roles || []).map(role => role.name).join(',')" />
|
||
|
<uni-list-item showExtraIcon="true" :extraIcon="{type: 'calendar-filled'}" title="创建日期" :rightText="this.parseTime(user.createTime)" />
|
||
|
</uni-list>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import { getUserProfile } from "@/api/system/user"
|
||
|
import { parseTime } from "@/utils/ruoyi"
|
||
|
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
user: {}
|
||
|
}
|
||
|
},
|
||
|
onLoad() {
|
||
|
this.getUser()
|
||
|
},
|
||
|
methods: {
|
||
|
getUser() {
|
||
|
getUserProfile().then(response => {
|
||
|
this.user = response.data
|
||
|
})
|
||
|
},
|
||
|
parseTime(time) {
|
||
|
return parseTime(time)
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss">
|
||
|
page {
|
||
|
background-color: #ffffff;
|
||
|
}
|
||
|
</style>
|