<template>
    <div class="product" @click="goNext(info)">
        <van-image width="100%" height="140px" :radius="30" :src="getImg(info.pic)" fit="cover" />

        <div class="content">
            <div class="name van-ellipsis">
                {{ info.name }}
            </div>
            <div class="text van-ellipsis">
                {{ info.remark }}
            </div>
        </div>
    </div>
</template>

<script>
import banner from '../../mixins/banner';
export default {
    mixins: [banner],
    props: {
        info: {
            type: Object,
            default: () => {
                return {};
            }
        }
    }
};
</script>

<style lang="less" scoped>
.product {
    width: 255px;
    // margin: 8px;
    background-color: @bg2;
    display: inline-block;
    border-radius: 30px;
    overflow: hidden;

    .van-image {
        overflow: hidden;
        display: block;
    }
    .content {
        padding: 6px 16px 10px;

        .name {
            font-size: @font2;
            color: #ffffff;
            line-height: 24px;
        }

        .text {
            font-size: @font1;
            color: @text3;
            line-height: 20px;
        }
    }
}
</style>
