pda_uniapp/pages/mine/info/index.vue

59 lines
1.7 KiB
Vue

<template>
<view class="container">
<cu-custom bgColor="bg-gradual-pink" :isBack="true">
<block slot="backText">返回</block>
<block slot="content"></block>
</cu-custom>
<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.phone" />
<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" />
</uni-list>
</view>
</template>
<script>
import {
profile
} from "@/api/system/user"
export default {
data() {
return {
user: {},
roleGroup: "",
postGroup: ""
}
},
onLoad() {
this.getUser()
},
methods: {
getUser() {
profile().then(response => {
this.user = response.data
// this.roleGroup = response.roleGroup
// this.postGroup = response.postGroup
// userInfo.id = response.data.id;
// userInfo.sign = response.data.sign;
// userInfo.email = response.data.email;
// userInfo.username = response.data.username;
// userInfo.nickname = response.data.nickname;
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #ffffff;
}
</style>