index.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view class="container">
  3. <uni-list>
  4. <uni-list-item :extraIcon="{type: 'person-filled'}" :rightText="user.nickName" showExtraIcon="true" title="昵称"/>
  5. <uni-list-item :extraIcon="{type: 'phone-filled'}" :rightText="user.phonenumber" showExtraIcon="true"
  6. title="手机号码"/>
  7. <uni-list-item :extraIcon="{type: 'email-filled'}" :rightText="user.email" showExtraIcon="true" title="邮箱"/>
  8. <uni-list-item :extraIcon="{type: 'auth-filled'}" :rightText="postGroup" showExtraIcon="true" title="岗位"/>
  9. <uni-list-item :extraIcon="{type: 'staff-filled'}" :rightText="roleGroup" showExtraIcon="true" title="角色"/>
  10. <uni-list-item :extraIcon="{type: 'calendar-filled'}" :rightText="user.createTime" showExtraIcon="true"
  11. title="创建日期"/>
  12. </uni-list>
  13. </view>
  14. </template>
  15. <script>
  16. import {getUserProfile} from "@/api/system/user"
  17. export default {
  18. data() {
  19. return {
  20. user: {},
  21. roleGroup: "",
  22. postGroup: ""
  23. }
  24. },
  25. onLoad() {
  26. this.getUser()
  27. },
  28. methods: {
  29. getUser() {
  30. getUserProfile().then(response => {
  31. this.user = response.data
  32. this.roleGroup = response.roleGroup
  33. this.postGroup = response.postGroup
  34. })
  35. }
  36. }
  37. }
  38. </script>
  39. <style lang="scss">
  40. page {
  41. background-color: #ffffff;
  42. }
  43. </style>