鸿宇研学生前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

210 lines
5.2 KiB

  1. <template>
  2. <view class="card">
  3. <view class="flex card-header">
  4. <view>
  5. <view class="title">我的档案</view>
  6. <button class="flex btn btn-question">
  7. <image class="btn-icon" src="@/static/image/icon-question.png" mode="widthFix"></image>
  8. <view>如何完善我的档案</view>
  9. </button>
  10. </view>
  11. <view class="flex">
  12. <button class="btn btn-switch" @click="onSwitch">切换</button>
  13. <!-- <button class="btn btn-add" @click="onAdd">新增记录</button> -->
  14. </view>
  15. </view>
  16. <view class="card-content">
  17. <view class="flex info">
  18. <view class="avatar">
  19. <image class="img" :src="memberInfo.headImage" mode="scaleToFill"></image>
  20. <view :class="['tag', `tag-0`]">学生</view>
  21. </view>
  22. <view class="flex summary">
  23. <view class="flex flex-column summary-item name">
  24. <view class="summary-item-content">{{ memberInfo.nickName }}</view>
  25. <view class="summary-item-label">{{ `ID:${memberInfo.id}` }}</view>
  26. </view>
  27. <view class="flex flex-column summary-item" @click="jumpToAchievement">
  28. <view class="summary-item-content">8</view>
  29. <view class="summary-item-label nowrap">成就</view>
  30. </view>
  31. <view class="flex flex-column summary-item">
  32. <view class="summary-item-content">68</view>
  33. <view class="summary-item-label nowrap">足迹</view>
  34. </view>
  35. </view>
  36. </view>
  37. <view class="flex medal">
  38. <image class="medal-item" src="@/pages_order/static/temp-47.png" mode="widthFix"></image>
  39. <image class="medal-item" src="@/pages_order/static/temp-47.png" mode="widthFix"></image>
  40. <image class="medal-item" src="@/pages_order/static/temp-49.png" mode="widthFix"></image>
  41. <image class="medal-item" src="@/pages_order/static/temp-47.png" mode="widthFix"></image>
  42. <image class="medal-item" src="@/pages_order/static/temp-47.png" mode="widthFix"></image>
  43. <image class="medal-item" src="@/pages_order/static/temp-49.png" mode="widthFix"></image>
  44. <image class="medal-item" src="@/pages_order/static/temp-47.png" mode="widthFix"></image>
  45. <image class="medal-item" src="@/pages_order/static/temp-47.png" mode="widthFix"></image>
  46. </view>
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. import { mapState } from 'vuex'
  52. export default {
  53. data() {
  54. return {
  55. }
  56. },
  57. onLoad() {
  58. },
  59. computed: {
  60. ...mapState(['memberInfo']),
  61. },
  62. methods: {
  63. getData() {
  64. // todo
  65. },
  66. onAdd() {
  67. this.$emit('addRecord')
  68. },
  69. onSwitch() {
  70. this.$emit('switchMember')
  71. },
  72. jumpToAchievement() {
  73. uni.navigateTo({
  74. url: '/pages_order/growing/achievement/index'
  75. })
  76. },
  77. },
  78. }
  79. </script>
  80. <style scoped lang="scss">
  81. @import '../member/styles/tag.scss';
  82. .card {
  83. font-family: PingFang SC;
  84. font-weight: 400;
  85. line-height: 1.4;
  86. background: linear-gradient(to right, #DDF4FF, #9FE1FF);
  87. border-radius: 48rpx;
  88. &-header {
  89. justify-content: space-between;
  90. padding: 24rpx 40rpx 20rpx 40rpx;
  91. .title {
  92. font-size: 32rpx;
  93. font-weight: 600;
  94. color: #000000;
  95. }
  96. .btn-question {
  97. margin-top: 4rpx;
  98. column-gap: 8rpx;
  99. font-size: 26rpx;
  100. color: #21607D;
  101. .btn-icon {
  102. width: 32rpx;
  103. height: auto;
  104. }
  105. }
  106. .btn-switch {
  107. padding: 6rpx 22rpx;
  108. font-size: 28rpx;
  109. font-weight: 400;
  110. line-height: 1.4;
  111. color: #252545;
  112. border: 2rpx solid #252545;
  113. border-radius: 28rpx;
  114. }
  115. .btn-add {
  116. padding: 8rpx 24rpx;
  117. font-size: 28rpx;
  118. font-weight: 500;
  119. line-height: 1.4;
  120. color: #FFFFFF;
  121. background: linear-gradient(to right, #21FEEC, #019AF9);
  122. border-radius: 28rpx;
  123. }
  124. .btn + .btn {
  125. margin-left: 26rpx;
  126. }
  127. }
  128. &-content {
  129. padding: 38rpx 38rpx 14rpx 38rpx;
  130. background: linear-gradient(to right, #FBFEFF, #DAF3FF);
  131. border: 2rpx solid #FFFFFF;
  132. border-radius: 48rpx;
  133. box-shadow: 0 2px 12px 0 #009AE717;
  134. .info {
  135. column-gap: 24rpx;
  136. .avatar {
  137. flex: none;
  138. position: relative;
  139. width: 128rpx;
  140. height: 128rpx;
  141. border-radius: 24rpx;
  142. overflow: hidden;
  143. .img {
  144. width: 100%;
  145. height: 100%;
  146. }
  147. }
  148. .summary {
  149. flex: 1;
  150. column-gap: 26rpx;
  151. &-item {
  152. flex: 1;
  153. row-gap: 8rpx;
  154. &.name {
  155. flex: none;
  156. }
  157. &-content {
  158. font-size: 32rpx;
  159. font-weight: 600;
  160. color: #000000;
  161. }
  162. &-label {
  163. font-size: 24rpx;
  164. color: #939393;
  165. }
  166. }
  167. }
  168. }
  169. .medal {
  170. margin-top: 16rpx;
  171. justify-content: flex-start;
  172. flex-wrap: wrap;
  173. gap: 16rpx;
  174. &-item {
  175. width: 50rpx;
  176. height: auto;
  177. }
  178. }
  179. }
  180. }
  181. .nowrap {
  182. white-space: nowrap;
  183. }
  184. </style>