cloudroam
2025-06-12 b0bfc153bf3c9aa430ee6a86588648cdd1c27132
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
<template>
    <view class="card" @click="handleClick(item)">
        <!-- <image :src="item.coverUrl" mode="widthFix" class="card-image" /> -->
        <view class="image-wrapper">
            <image :src="item.coverUrl" mode="widthFix" class="card-image" />
            <image v-if="item.userType==='official'" src="/static/common/official.png" class="badge-icon" />
        </view>
        <view class="card-title">
            <up-text :lines="2" size="14px" :text="item.nameCn" bold></up-text>
        </view>
        <view class="card-footer">
            <view class="user-info">
                <up-avatar :src="item.avatar" size="40rpx" shape="circle" />
                <view class="user-text">
                    <text class="nickname">{{ item.nickname }}</text>
                </view>
            </view>
            <view class="opera-info">
                <up-icon name="heart" size="30rpx" color="#999" />
                <text>{{ item.voLikeCount }}</text>
            </view>
        </view>
    </view>
</template>
 
<script setup lang="ts">
defineProps<{
    item: any
}>()
 
const emit = defineEmits(['click'])
const handleClick = (item: any) => {
    emit('click', item)
}
</script>
 
<style scoped lang="scss">
.card {
    border-radius: 10rpx;
    background-color: #ffffff;
    font-size: 14px;
    line-height: 20px;
    color: rgb(51, 51, 51);
    margin: 10rpx;
 
    .image-wrapper {
        width: 100%;
        position: relative;
        display: inline-block;
 
        .card-image {
            width: 100%;
            border-radius: inherit;
        }
 
        .badge-icon {
            position: absolute;
            bottom: 8rpx;
            right: 0rpx;
            width: 32rpx;
            height: 32rpx;
            border-radius: 50%;
        }
 
    }
 
 
    .card-title {
        padding: 10rpx;
        font-weight: 500;
    }
 
    .card-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10rpx;
    }
 
    .user-info {
        display: flex;
        align-items: center;
 
        .user-text {
            font-size: 18rpx;
            line-height: 14px;
            margin-left: 10rpx;
 
            .nickname {
                font-weight: bold;
                display: block;
                color: #646464;
            }
        }
    }
 
    .opera-info {
        display: flex;
        align-items: center;
 
        text {
            margin-left: 10rpx;
            font-size: 12px;
        }
    }
}
</style>