cshenfu
2024-06-27 58aa6e282bb343503be3cb198948328ea3ed7b79
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<template>
    <view class="item-box" @click="openCourse">
        <u-time-line>
                <u-time-line-item nodeTop="2">
                    <template v-slot:node>
                        <view class="u-node">
                            <u-icon name="tags-fill" color="rgb(255,33,91)" :size="24"></u-icon>
                        </view>
                    </template>
                    <template v-slot:content>
                        <view>
                            <view class="course-time">{{item.publish_date.replace(/-/g, "/")|date('mm-dd hh:MM')}}</view>
                            <view class="course-item">
                                <image class="picture" :src="item.avatar+'?x-oss-process=image/resize,m_fill,h_278,w_156'" mode="aspectFill">
                                </image>
                                <view class="detail">
                                    <view>
                                        <view class="u-line-2 u-font-32 course-name">
                                            {{item.title}}
                                        </view>
                                        <view class="u-line-4 u-font-20 course-desc">
                                            {{item.excerpt}}
                                        </view>
                                    </view>
                                
                                
                                    <view class="go-learn">
                                        <view class="button">
                                            立即报名
                                        </view>
                                    </view>
                                </view>
                            </view>
                        </view>
                    </template>
                </u-time-line-item>
            </u-time-line>
    </view>
</template>
 
<script>
    export default {
        name: "free-live-course-item",
        props: ['item', 'hasBuy'],
        data() {
            return {
 
            };
        },
        methods: {
            openCourse() {
                uni.vk.navigateTo('/uni_modules/uce-free-live-course/pages/detail?_id=' + this.item._id, false);
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .item-box{
        margin: 0 auto;
        padding: 0 40rpx;
    }
    .course-time{
        color: #333333;
        font-weight: bold;
    }
    .course-item {
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 320rpx;
        width: 616rpx;
        // border-bottom: 2px solid #f5f5f5;
        // padding: 20rpx 0;
 
        .picture {
            width: 156rpx;
            height: 278rpx;
            border-radius: 15rpx;
            overflow: hidden;
        }
 
        .detail {
            height: 100%;
            margin-left: 30rpx;
            flex: 1;
            position: relative;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 20rpx 0;
 
            .course-name {
                font-weight: bold;
                color: #303030;
            }
 
            .course-desc {
                margin-top: 8rpx;
                // font-weight: bold;
                color: #C5C5C5;
            }
 
            .go-learn {
                display: flex;
                margin-top: 8rpx;
 
                .button {
                    background: #1663FF;
                    color: #FFFFFF;
                    font-size: 26rpx;
                    text-align: center;
                    height: 60rpx;
                    line-height: 60rpx;
                    padding: 0 20rpx;
                    border-radius: 5rpx;
                }
            }
 
            .course-price {
                display: flex;
                margin-top: 8rpx;
                align-items: flex-end;
 
                .tip {
                    color: #303030;
                }
 
                .tip-1 {
                    color: #FF724E;
                }
 
                .price {
                    color: #FF724E;
                }
 
                .price-discount {
                    color: #C5C5C5;
                    margin-left: 10rpx;
                    text-decoration: line-through;
                }
            }
        }
    }
</style>