<template>
    <router-link :to='{name:"shop",query:{id:info.id,breHref:breHref}}' class="goods">

        <div class="goodsImg" :style="{backgroundImage:'url('+info.icon+')'}"></div>
        <div class="goodsInfo">
            <div class="title">
                <div class="name">{{info.storeName}}</div>
                <img src="../assetsPre/location_pre.png" alt="">
                <div class="address">{{info.citye}}</div>
            </div>
            <div class="titlesub">
                {{info.description}}
            </div>
            <div class="subtitle">
                <span>响应时间 :</span>
                <span>{{info.responseTime}}分钟</span>
            </div>
            <div class="subtitle">
                <span>返片率 :</span>
                <span>{{info.reworkRate}}%</span>
            </div>
        </div>

        <!-- <img src="../assetsPre/levelA.png" alt="" class="level"> -->
          <div class="level" :style="{backgroundImage:'url('+require('../assetsPre/startLogo.png')+')'}">{{info.credit}}</div>
    </router-link>
</template>

<script>

export default {
    name: 'goodsLarge',
    props: {
        info: {
            type: Object,
            default: {}
        }
    },
    data() {
        return {
        }
    },
    computed: {
        breHref() {
            var str = '首页,/index_;'
            if(this.$route.name=='business'){
                str+=document.title+','+this.$route.name+'_;'
            }
            return str
        }
    },
    methods: {

    }
}
</script>

<style lang="less" scoped>
.goods {
    overflow: hidden;
    padding: 28px 74px 27px 24px;
    position: relative;
    font-size: 0;
    height: 133px;
    background-color: #fff;
    margin-top: 20px;
    display: block;

    .level {
        display: inline-block;
        vertical-align: middle;
        width: 50px;
        height: 30px;
        position: absolute;
        right: 0;
        top: 4px;
        background-position: center center;
        background-size: cover;
        color: #fff;
        font-size: 16px;
        font-weight: bold;
        line-height: 30px;
        padding-right: 5px;
        text-align: right;
    }

    .goodsImg {
        width: 233px;
        height: 133px;
        border-radius: 4px;
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
        display: inline-block;
        vertical-align: middle;
    }

    .goodsInfo {
        display: inline-block;
        vertical-align: middle;
        margin-left: 23px;
        height: 133px;
        width: 500px;
        overflow: hidden;
    }

    .title {
        overflow: hidden;

        .name {
            display: inline-block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            font-size: 18px;
            font-family: MicrosoftYaHei;
            color: rgba(51, 51, 51, 1);
            line-height: 24px;
            vertical-align: middle;
            max-width: 400px;
        }

        img {
            width: 12px;
            height: 15px;
            margin: 0 6px 0 10px;
            vertical-align: middle;
        }

        .address {
            display: inline-block;
            font-size: 12px;
            font-family: PingFangSC;
            font-weight: bold;
            color: rgba(11, 158, 192, 1);
            line-height: 17px;
            vertical-align: middle;
        }
    }

    .titlesub {
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
        font-family: MicrosoftYaHei;
        color: rgba(153, 153, 153, 1);
        line-height: 19px;
        margin-top: 6px;
        width: 500px;
    }

    .subtitle {
        margin-top: 8px;
        span {
            font-size: 12px;
            font-family: MicrosoftYaHei;

            line-height: 16px;
            &:first-child {
                color: #666666;
            }
            &:last-child {
                color: #fb6e08;
            }
        }
    }
}
</style>
