index.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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>
  8. </view>
  9. </template>
  10. <script>
  11. import { getUserProfile } from "@/api/system/user"
  12. export default {
  13. data() {
  14. return {
  15. user: {},
  16. roleGroup: "",
  17. postGroup: ""
  18. }
  19. },
  20. onLoad() {
  21. this.getUser()
  22. },
  23. methods: {
  24. getUser() {
  25. getUserProfile().then(response => {
  26. console.log(response,'-----------')
  27. this.user = response.data.user
  28. this.roleGroup = response.data.roleGroup
  29. this.postGroup = response.data.postGroup
  30. })
  31. }
  32. }
  33. }
  34. </script>
  35. <style lang="scss">
  36. page {
  37. background-color: #ffffff;
  38. }
  39. </style>