kechengCard.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view class="shouye-card-box kecheng-card-box">
  3. <!-- card title -->
  4. <view class="card-head-box">
  5. <view class="card-line-title">课程</view>
  6. <view class="card-more" @click="checkMore">更多<text class="more-num">{{data.count}}</text><icon class="more-jt"></icon></view>
  7. </view>
  8. <!-- kaoshi title -->
  9. <view class="card-name-box">
  10. <view class="card-name" v-if="data.name"><icon></icon>{{data.name}}</view>
  11. <text class="card-level">{{data.zyLevelName}}</text>
  12. </view>
  13. <!-- 内容区域 -->
  14. <view class="card-content-box kaoshi-content-box">
  15. <view class="card-content-item">
  16. <icon class="card-time-icon"></icon>
  17. <view class="content-text-box">
  18. <text>时间</text>
  19. <view>{{formatSecondsToCnhms(data.period, true)}}</view>
  20. </view>
  21. </view>
  22. </view>
  23. <!-- 底部 -->
  24. <view class="card-bottom-box">
  25. <button type="default" class="index-card-btn">课程学习</button>
  26. </view>
  27. </view>
  28. </template>
  29. <script setup>
  30. import {formatSecondsToCnhms} from "@/utils/common.js"
  31. defineProps({
  32. data: {
  33. type: Object,
  34. }
  35. })
  36. function checkMore() {
  37. uni.redirectTo({
  38. url:"/pages/client/Kecheng/list?from=shouye"
  39. })
  40. }
  41. </script>
  42. <style>
  43. </style>