12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <template>
- <view class="shouye-card-box kecheng-card-box">
- <!-- card title -->
- <view class="card-head-box">
- <view class="card-line-title">课程</view>
- <view class="card-more" @click="checkMore" v-if="data.count">更多<text class="more-num">{{data.count}}</text><icon class="more-jt"></icon></view>
- </view>
- <!-- kaoshi title -->
- <view class="card-name-box">
- <view class="card-name" v-if="data.name"><icon></icon>{{data.name}}</view>
- <text class="card-level">{{data.zyLevelName}}</text>
- </view>
- <!-- 内容区域 -->
- <view class="card-content-box kaoshi-content-box">
- <view class="card-content-item">
- <icon class="card-time-icon"></icon>
- <view class="content-text-box">
- <text>时间</text>
- <view>{{formatSecondsToCnhms(data.period, true)}}</view>
- </view>
- </view>
- </view>
- <!-- 底部 -->
- <view class="card-bottom-box">
- <button type="default" class="index-card-btn" @click="handleStudy(data)">课程学习</button>
- </view>
- </view>
- </template>
- <script setup>
- import {formatSecondsToCnhms} from "@/utils/common.js"
- defineProps({
- data: {
- type: Object,
- }
- })
-
- function checkMore() {
- uni.navigateTo({
- url:"/pages/client/Kecheng/list?from=shouye"
- })
- }
-
- function handleStudy(item) {
- uni.navigateTo({
- url: `/pages/client/Kecheng/study?kcId=${item.kcId}&from=shouye`
- })
- }
- </script>
- <style>
- </style>
|