information.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view class="jpmain ">
  3. <componentLogin ref="refLogin" @findByOpenId="findByOpenId"></componentLogin>
  4. <view class="body">
  5. <view class="page">
  6. <view class="page-content">
  7. <view class="item">
  8. <view class="title">
  9. 头像
  10. </view>
  11. <view class="goto ">
  12. <view class="photo">
  13. <img class="img" :src="userInfo.headImg" v-if="userInfo.headImg" alt="">
  14. </view>
  15. <u-icon name="arrow-right" style="margin-left: 8rpx;" size="24" color="#BBBBBB"></u-icon>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="page">
  21. <view class="page-content">
  22. <view class="item">
  23. <view class="title">
  24. 用户昵称
  25. </view>
  26. <view class="goto">
  27. {{userInfo.nickName?userInfo.nickName:'未设置'}}
  28. <u-icon name="arrow-right" style="margin-left: 8rpx;" size="24" color="#BBBBBB"></u-icon>
  29. </view>
  30. </view>
  31. <view class="item">
  32. <view class="title">
  33. 手机号码
  34. </view>
  35. <view class="goto">
  36. {{userInfo.phone}}
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="page">
  42. <view class="button">
  43. 退出账号
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import componentLogin from '@/components/componentLogin.vue';
  51. export default {
  52. components: {
  53. componentLogin,
  54. },
  55. data() {
  56. return {
  57. userInfo:{},
  58. }
  59. },
  60. onLoad() {
  61. this.userInfo = this.jphelp.getPersonInfo()
  62. },
  63. onReady() {
  64. this.$refs.refLogin.findByOpenId()
  65. },
  66. methods: {
  67. findByOpenId(res){
  68. this.userInfo = this.jphelp.getPersonInfo()
  69. }
  70. }
  71. }
  72. </script>
  73. <style>
  74. page {
  75. background-color: rgba(242, 244, 246, 1);
  76. }
  77. </style>
  78. <style scoped lang="scss">
  79. /* styles.css */
  80. .body {
  81. padding: 32rpx;
  82. }
  83. .page {
  84. border-radius: 16rpx;
  85. background-color: rgba(255, 255, 255, 1);
  86. color: rgba(16, 16, 16, 1);
  87. padding:0 32rpx;
  88. margin-bottom: 32rpx;
  89. font-size: 32rpx;
  90. color: rgb(16, 16, 16);
  91. .page-content {
  92. .item:not(:last-child) {
  93. border-bottom:1px solid rgba(232,232,232,1);
  94. }
  95. .item {
  96. padding: 32rpx 0;
  97. display: flex;
  98. justify-content: space-between;
  99. align-items: center;
  100. font-size: 32rpx;
  101. .title {
  102. display: flex;
  103. justify-content: space-between;
  104. display: flex;
  105. align-items: center;
  106. color: rgba(51,51,51,1);
  107. }
  108. .goto{
  109. display: flex;
  110. align-items: center;
  111. color: rgba(119,119,119,1);
  112. }
  113. .photo {
  114. border-radius: 50px;
  115. background-color: rgba(229, 229, 229, 1);
  116. height: 80rpx;
  117. width: 80rpx;
  118. overflow: hidden;
  119. .img {
  120. width: 100%;
  121. height: 100%;
  122. }
  123. }
  124. }
  125. }
  126. .button{
  127. text-align: center;
  128. color: red;
  129. padding: 32rpx 0;
  130. }
  131. }
  132. </style>