2024-04-23 23:01:35 +08:00
|
|
|
<template>
|
|
|
|
<view class="container">
|
2024-05-06 16:11:42 +08:00
|
|
|
<view>
|
|
|
|
<image v-if="avatar" @click="handleToAvatar" :src="avatar" mode="widthFix">
|
|
|
|
</image>
|
|
|
|
</view>
|
2024-04-23 23:01:35 +08:00
|
|
|
<uni-list>
|
2024-05-06 16:11:42 +08:00
|
|
|
<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.phonenumber" />
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'email-filled' }" title="邮箱" :rightText="user.email" />
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'auth-filled' }" title="岗位" :rightText="postGroup" />
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'staff-filled' }" title="角色" :rightText="roleGroup" />
|
|
|
|
<uni-list-item showExtraIcon="true" :extraIcon="{ type: 'calendar-filled' }" title="创建日期"
|
|
|
|
:rightText="user.createTime" />
|
2024-04-23 23:01:35 +08:00
|
|
|
</uni-list>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
2024-05-06 16:11:42 +08:00
|
|
|
<script setup>
|
|
|
|
import { getUserProfile } from "@/api/system/user"
|
2024-04-23 23:01:35 +08:00
|
|
|
|
2024-05-06 16:11:42 +08:00
|
|
|
import { ref, getCurrentInstance } from 'vue';
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
|
const avatar = ref(proxy.$store.state.user.avatar)
|
|
|
|
const user = ref({})
|
|
|
|
const roleGroup = ref("");
|
|
|
|
const postGroup = ref("");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getUser = () => {
|
|
|
|
getUserProfile().then(response => {
|
|
|
|
this.user = response.data
|
|
|
|
this.roleGroup = response.roleGroup
|
|
|
|
this.postGroup = response.postGroup
|
|
|
|
})
|
|
|
|
}
|
|
|
|
function handleToAvatar() {
|
|
|
|
proxy.$tab.navigateTo('/pages/mine/avatar/index')
|
2024-04-23 23:01:35 +08:00
|
|
|
}
|
2024-05-06 16:11:42 +08:00
|
|
|
getUser();
|
|
|
|
|
2024-04-23 23:01:35 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2024-05-06 16:11:42 +08:00
|
|
|
page {
|
|
|
|
background-color: #ffffff;
|
|
|
|
}
|
2024-04-23 23:01:35 +08:00
|
|
|
</style>
|