index.vue 1.4 KB

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