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

211 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="@/static/image/temp-30.png" mode="scaleToFill"></image>
  20. <view class="tag">学生</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. .card {
  78. font-family: PingFang SC;
  79. font-weight: 400;
  80. line-height: 1.4;
  81. background: linear-gradient(to right, #DDF4FF, #9FE1FF);
  82. border-radius: 48rpx;
  83. &-header {
  84. justify-content: space-between;
  85. padding: 24rpx 40rpx 20rpx 40rpx;
  86. .title {
  87. font-size: 32rpx;
  88. font-weight: 600;
  89. color: #000000;
  90. }
  91. .btn-question {
  92. margin-top: 4rpx;
  93. column-gap: 8rpx;
  94. font-size: 26rpx;
  95. color: #21607D;
  96. .btn-icon {
  97. width: 32rpx;
  98. height: auto;
  99. }
  100. }
  101. .btn-switch {
  102. padding: 6rpx 22rpx;
  103. font-size: 28rpx;
  104. font-weight: 400;
  105. line-height: 1.4;
  106. color: #252545;
  107. border: 2rpx solid #252545;
  108. border-radius: 28rpx;
  109. }
  110. .btn-add {
  111. padding: 8rpx 24rpx;
  112. font-size: 28rpx;
  113. font-weight: 500;
  114. line-height: 1.4;
  115. color: #FFFFFF;
  116. background: linear-gradient(to right, #21FEEC, #019AF9);
  117. border-radius: 28rpx;
  118. }
  119. .btn + .btn {
  120. margin-left: 26rpx;
  121. }
  122. }
  123. &-content {
  124. padding: 38rpx 38rpx 14rpx 38rpx;
  125. background: linear-gradient(to right, #FBFEFF, #DAF3FF);
  126. border: 2rpx solid #FFFFFF;
  127. border-radius: 48rpx;
  128. box-shadow: 0 2px 12px 0 #009AE717;
  129. .info {
  130. column-gap: 24rpx;
  131. .avatar {
  132. flex: none;
  133. position: relative;
  134. width: 128rpx;
  135. height: 128rpx;
  136. border-radius: 24rpx;
  137. overflow: hidden;
  138. .img {
  139. width: 100%;
  140. height: 100%;
  141. }
  142. .tag {
  143. position: absolute;
  144. left: 0;
  145. bottom: 0;
  146. width: 100%;
  147. padding: 2rpx 0;
  148. box-sizing: border-box;
  149. text-align: center;
  150. font-size: 24rpx;
  151. color: #03C25C;
  152. background: #E9FFF5;
  153. }
  154. }
  155. .summary {
  156. flex: 1;
  157. column-gap: 26rpx;
  158. &-item {
  159. flex: 1;
  160. row-gap: 8rpx;
  161. &.name {
  162. flex: none;
  163. }
  164. &-content {
  165. font-size: 32rpx;
  166. font-weight: 600;
  167. color: #000000;
  168. }
  169. &-label {
  170. font-size: 24rpx;
  171. color: #939393;
  172. }
  173. }
  174. }
  175. }
  176. .medal {
  177. margin-top: 16rpx;
  178. justify-content: flex-start;
  179. flex-wrap: wrap;
  180. gap: 16rpx;
  181. &-item {
  182. width: 50rpx;
  183. height: auto;
  184. }
  185. }
  186. }
  187. }
  188. </style>