index.vue 1013 B

1234567891011121314151617181920212223242526272829303132333435363738
  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: 'calendar-filled'}" title="创建日期" :rightText="user.createTime" />
  8. </uni-list>
  9. </view>
  10. </template>
  11. <script>
  12. import { getUserProfile } from "@/api/system/user"
  13. export default {
  14. data() {
  15. return {
  16. user: {}
  17. }
  18. },
  19. onLoad() {
  20. this.getUser()
  21. },
  22. methods: {
  23. getUser() {
  24. getUserProfile().then(response => {
  25. this.user = response.data
  26. })
  27. }
  28. }
  29. }
  30. </script>
  31. <style lang="scss">
  32. page {
  33. background-color: #ffffff;
  34. }
  35. </style>