personal_info.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <template>
  2. <view>
  3. <view class="user">
  4. <view class="title">
  5. <view>个人信息</view>
  6. <text>头像、昵称等个人信息由获取微信授权自动上传</text>
  7. </view>
  8. <view class="list">
  9. <view>
  10. <text>头像</text>
  11. <view class="photo"><open-data type="userAvatarUrl"></open-data></view>
  12. </view>
  13. <view>
  14. <text>昵称</text>
  15. <view><open-data type="userNickName"></open-data></view>
  16. </view>
  17. <view>
  18. <text>手机号</text>
  19. <view style="color:#478AF6;">{{ phone }}</view>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="agency">
  24. <view class="title"><view>代理信息</view></view>
  25. <view class="list">
  26. <view>
  27. <text>我的等级</text>
  28. <view>{{userInfo.level}}</view>
  29. </view>
  30. <view>
  31. <text>我的上级</text>
  32. <view>{{userInfo.agent_nickname}}</view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. userInfo: {},
  43. phone: ''
  44. };
  45. },
  46. onShow() {
  47. if (uni.getStorageSync('userInfo')) {
  48. this.userInfo = uni.getStorageSync('userInfo');
  49. let phone = this.userInfo.phone
  50. this.phone = phone.replace(phone.substring(3, 7), '****');
  51. }
  52. }
  53. };
  54. </script>
  55. <style lang="scss">
  56. .user,
  57. .agency {
  58. .title {
  59. margin: 0 0 24rpx 31rpx;
  60. view {
  61. font-size: 36rpx;
  62. color: #333333;
  63. padding: 36rpx 0 23rpx 0;
  64. font-weight: bold;
  65. }
  66. text {
  67. color: #999999;
  68. font-size: 28rpx;
  69. }
  70. }
  71. }
  72. .agency {
  73. .title {
  74. padding: 36rpx 0 0 0;
  75. }
  76. }
  77. .list {
  78. > view {
  79. width: 100%;
  80. height: 100rpx;
  81. background-color: #fff;
  82. border-bottom: 1rpx solid #f9f9f9;
  83. display: flex;
  84. justify-content: space-between;
  85. align-items: center;
  86. padding: 0 30rpx;
  87. box-sizing: border-box;
  88. text {
  89. font-size: 32rpx;
  90. color: #666666;
  91. }
  92. view {
  93. font-size: 28rpx;
  94. color: #333333;
  95. }
  96. }
  97. .photo {
  98. height: 64rpx;
  99. width: 64rpx;
  100. border-radius: 50%;
  101. overflow: hidden;
  102. }
  103. }
  104. </style>