鸿宇研学生前端代码
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.

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