洛阳学员端
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.

167 lines
3.7 KiB

  1. <template>
  2. <view class="topInfo card">
  3. <view class="user_row">
  4. <view class="avatar">
  5. <image :src="vuex_userInfo.photoPath" mode="widthFix" v-if="vuex_userInfo.photoPath"></image>
  6. </view>
  7. <view class="rightTxt" @click="showType=true">
  8. <view class="name">{{ vuex_userInfo.name?vuex_userInfo.name:vuex_userInfo.phone?vuex_userInfo.phone:'请登录' }}</view>
  9. <view class="btn_row">
  10. <view class="txt">{{ carType }}</view>
  11. <u-icon name="arrow-down-fill" color="#fff" size="10"></u-icon>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="bg">
  16. <view class="row">
  17. <view class="timeItem">
  18. <view class="flex">
  19. <view class="time">120</view>
  20. <view class="uni">分钟</view>
  21. </view>
  22. <view class="lab">已完成学时</view>
  23. </view>
  24. <view class="timeItem">
  25. <view class="flex">
  26. <view class="time">120</view>
  27. <view class="uni">分钟</view>
  28. </view>
  29. <view class="lab">应完成学时</view>
  30. </view>
  31. </view>
  32. <view class="row">
  33. <view class="timeItem">
  34. <view class="flex ">
  35. <view class="time">120</view>
  36. <view class="uni">分钟</view>
  37. </view>
  38. <view class="lab">已完成学时</view>
  39. </view>
  40. <view class="timeItem">
  41. <view class="flex ">
  42. <view class="time ">120</view>
  43. <view class="uni">分钟</view>
  44. </view>
  45. <view class="lab">应完成学时</view>
  46. </view>
  47. </view>
  48. </view>
  49. <u-picker :show="showType" :columns="typeArr" keyName="name" @confirm="confirmType" @cancel="showType=false"></u-picker>
  50. </view>
  51. </template>
  52. <script>
  53. export default {
  54. data() {
  55. return {
  56. showType: false,
  57. typeArr: [
  58. [
  59. {name: '科目一', id: 1},
  60. {name: '科目二', id: 2},
  61. {name: '科目三', id: 3},
  62. ]
  63. ],
  64. carType: '科目一'
  65. }
  66. },
  67. methods: {
  68. confirmType(val) {
  69. console.log(val)
  70. let item = val.value[0]
  71. this.carType = item.name
  72. this.showType = false
  73. }
  74. }
  75. }
  76. </script>
  77. <style scoped lang="scss">
  78. .topInfo.card {
  79. padding: 0rpx 20rpx 20rpx 20rpx;
  80. .user_row {
  81. display: flex;
  82. .avatar {
  83. width: 120rpx;
  84. height: 120rpx;
  85. border-radius: 50%;
  86. overflow: hidden;
  87. background: url('../../../../static/images/mineIcon/avatar.png');
  88. background-size: 100% 100%;
  89. margin-top: -36rpx;
  90. background: #F6F7FA;
  91. }
  92. .rightTxt {
  93. display: flex;
  94. align-items: center;
  95. justify-content: space-between;
  96. flex: 1;
  97. width: 0;
  98. padding: 0 0 0 20rpx;
  99. .name {
  100. font-size: 28rpx;
  101. color: #333;
  102. }
  103. .btn_row {
  104. display: flex;
  105. align-items: center;
  106. justify-content: center;
  107. background: $themC;
  108. width: 150rpx;
  109. height: 50rpx;
  110. color: #fff;
  111. border-radius: 10rpx;
  112. font-size: 24rpx;
  113. lighting-color: 50rpx;
  114. .txt {
  115. margin-right: 10rpx;
  116. }
  117. }
  118. }
  119. }
  120. .bg {
  121. background: #F6F7FA;
  122. border-radius: 20rpx;
  123. padding: 20rpx;
  124. margin-top: 30rpx;
  125. .row {
  126. border-top: 1rpx solid #EDEDED;
  127. display: flex;
  128. &:first-child {
  129. border: none;
  130. }
  131. .timeItem {
  132. border-left: 1px solid #EDEDED;
  133. flex: 1;
  134. align-items: center;
  135. justify-content: center;
  136. color: #999;
  137. font-size: 24rpx;
  138. padding: 20rpx 0;
  139. &:first-child {
  140. border: none;
  141. }
  142. .flex {
  143. justify-content: center;
  144. .time {
  145. font-size: 36rpx;
  146. color: #333;
  147. font-weight: 700;
  148. }
  149. .uni {
  150. margin-top: -6rpx;
  151. }
  152. }
  153. .lab {
  154. text-align: center;
  155. }
  156. }
  157. }
  158. }
  159. }
  160. </style>