RecommendOriginal.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <div id="recommends">
  3. <div class="title-icon">
  4. <span>店铺推荐</span>
  5. <img src="/images/original/line.png" alt=""/>
  6. </div>
  7. <ul class="recommend-list list-unstyled list-inline">
  8. <li class="recommend-store" v-for="(store, index) in stores">
  9. <a :href="'/store/' + store.uuid" target="_blank">
  10. <div class="img"><img :src="store.logoUrl || '/images/store/common/default.png'" /></div>
  11. <div class="content">
  12. <div class="name">
  13. <span :title="store.storeName">{{store.storeName}}</span>
  14. </div>
  15. <!--<div class="subject" style="min-height: 5px;">
  16. </div>-->
  17. <!--<div class="description">-->
  18. <!--<strong>企业介绍</strong>:-->
  19. <!--<span>{{store.enterprise.description || '暂无企业介绍'}}</span>-->
  20. <!--</div>-->
  21. </div>
  22. </a>
  23. </li>
  24. </ul>
  25. </div>
  26. </template>
  27. <script>
  28. export default {
  29. name: 'recommend-original',
  30. computed: {
  31. stores () {
  32. return this.$store.state.provider.storeCms.recommendStore.data ? this.$store.state.provider.storeCms.recommendStore.data.slice(0, 3) : []
  33. }
  34. }
  35. }
  36. </script>
  37. <style scoped lang="scss">
  38. #recommends {
  39. margin: 10px 0;
  40. width: 220px;
  41. height: 377px;
  42. background-color: #ffffff;
  43. border-radius: 5px;
  44. .title-icon {
  45. position: relative;
  46. width: 100%;
  47. height: 34px;
  48. line-height: 34px;
  49. text-align: center;
  50. span{
  51. font-size: 14px;
  52. font-weight: bold;
  53. color: #333;
  54. }
  55. img{
  56. position: absolute;
  57. top: 14px;
  58. left: 25px;
  59. }
  60. }
  61. ul.recommend-list{
  62. padding: 14px 0px 0 8px;
  63. width: 220px;
  64. li.recommend-store{
  65. margin-bottom: 12px;
  66. .img {
  67. margin-right: 8px;
  68. float: left;
  69. width: 96px;
  70. height: 96px;
  71. border-radius: 2px;
  72. border: solid 1px #e2e2e2;
  73. img{
  74. width: 100%;
  75. height: 100%;
  76. }
  77. }
  78. .content{
  79. float: left;
  80. width: 95px;
  81. line-height: 96px;
  82. .name {
  83. width: 95px;
  84. font-size: 14px;
  85. color: #333333;
  86. overflow: hidden;
  87. text-overflow: ellipsis;
  88. white-space: nowrap;
  89. span{
  90. color: #333;
  91. &:hover{
  92. color:#2496f1;
  93. }
  94. }
  95. }
  96. }
  97. &:last-child{
  98. margin-bottom: 0;
  99. }
  100. &:hover{
  101. background: #f4f7fd;
  102. }
  103. }
  104. }
  105. }
  106. </style>