<template>
    <view class="drug-item c-gap-inner-top-small">
        <drug
            v-if="item.goods"
            :data="{
                targetUrl: item.goods.targetUrl,
                rec: item.goods.rec,
                drugId: item.goods.drugId,
                headImage: item.goods.headImage,
                commonName: item.goods.titleName,
                price: item.goods.price
            }"
            :price-style="{
                'font-size': '18px',
                'line-height': '1'
            }"
            :title-line="2"
            width="155px"
            height="155px"
            logkey="drug-im"
        >
        </drug>
    </view>
</template>

<script>
/**
* @file im气泡内商品卡片
* @author zhangeryi
*/

import drug from '../gy/drug';
export default {
    config: {
        component: true
    },
    props: {
        item: {
            type: Object,
            default() {
                return {};
            }
        }
    },
    components: {
        drug
    }
};
</script>

<style lang="less" scoped>
.drug-item {
    color: #333;
    width: 155px;
    padding-left: .02rem;
    padding-right: .02rem;
}
</style>