my.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="page-container">
  3. <view class="bg" />
  4. <view class="main-content">
  5. <image :src="userInfo.avatar" class="avatar" mode=""></image>
  6. <view class="studentName">
  7. {{userInfo.studentName}}
  8. </view>
  9. <view class="studentNO">
  10. 学号:{{userInfo.studentNO}}
  11. </view>
  12. <view class="majorName">
  13. 班级:{{userInfo.majorName}} {{userInfo.gradeName}}
  14. </view>
  15. <u-panel class="list-container">
  16. <u-des-row label="个人信息" forward @click="toUserInfo">
  17. <image slot="left" style="width: 44rpx;height: 44rpx;margin-right: 40rpx;"
  18. src="/static/menber_info_icon.png" mode="widthFix"></image>
  19. </u-des-row>
  20. <u-des-row label="问题反馈" forward @click="toProblemFeedback">
  21. <div slot="left" style="width: 44rpx;height: 44rpx;margin-right: 40rpx;"
  22. src="/static/menber_info_icon.png" mode="widthFix"></div>
  23. </u-des-row>
  24. </u-panel>
  25. </view>
  26. </view>
  27. </view>
  28. </template>
  29. <script>
  30. import {
  31. mapState
  32. } from 'vuex'
  33. export default {
  34. computed: {
  35. ...mapState({
  36. userInfo: state => state.user.userInfo,
  37. })
  38. },
  39. methods: {
  40. toUserInfo() {
  41. uni.navigateTo({
  42. url: '/pages/my/user-info/user-info'
  43. })
  44. },
  45. toProblemFeedback() {
  46. uni.navigateTo({
  47. url: '/pages/my/problem-feedback/problem-feedback'
  48. })
  49. },
  50. },
  51. onShow: function() {
  52. this.$store.dispatch('user/updateUserInfo')
  53. },
  54. }
  55. </script>
  56. <style lang="scss" scoped>
  57. .page-container {
  58. .bg {
  59. width: 100%;
  60. height: 885rpx;
  61. background: url('/static/bg_icon.png');
  62. background-size: 100% 100%;
  63. background-repeat: no-repeat;
  64. background-position: center;
  65. background-origin: content-box;
  66. position: absolute;
  67. top: 0;
  68. bottom: 0;
  69. z-index: -1;
  70. }
  71. .main-content {
  72. padding: 182rpx 0 0 0;
  73. text-align: center;
  74. .avatar {
  75. width: 149rpx;
  76. height: 149rpx;
  77. background: white;
  78. border-radius: 100%;
  79. margin-bottom: 50rpx;
  80. }
  81. .studentName {
  82. font-size: 49rpx;
  83. font-weight: bold;
  84. color: #FFFFFF;
  85. margin-bottom: 40rpx;
  86. }
  87. .studentNO,
  88. .majorName {
  89. font-size: 28rpx;
  90. font-weight: bold;
  91. color: #FFFFFF;
  92. margin-bottom: 40rpx;
  93. }
  94. .list-container {
  95. position: absolute;
  96. top: 828rpx;
  97. left: 0;
  98. right: 0;
  99. bottom: 0;
  100. background: white;
  101. border-radius: 26rpx 26rpx 0 0;
  102. padding-top: 48rpx;
  103. margin: 0;
  104. }
  105. }
  106. }
  107. </style>