RecommendOriginal.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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: 16px;
  52. color: #333;
  53. }
  54. img{
  55. position: absolute;
  56. top: 14px;
  57. left: 25px;
  58. }
  59. }
  60. ul.recommend-list{
  61. padding: 14px 0px 0 8px;
  62. width: 220px;
  63. li.recommend-store{
  64. margin-bottom: 12px;
  65. .img {
  66. margin-right: 8px;
  67. float: left;
  68. width: 96px;
  69. height: 96px;
  70. border-radius: 2px;
  71. border: solid 1px #e2e2e2;
  72. img{
  73. width: 100%;
  74. height: 100%;
  75. }
  76. }
  77. .content{
  78. float: left;
  79. width: 95px;
  80. line-height: 96px;
  81. .name {
  82. width: 95px;
  83. font-size: 14px;
  84. color: #333333;
  85. overflow: hidden;
  86. text-overflow: ellipsis;
  87. white-space: nowrap;
  88. span{
  89. color: #333;
  90. &:hover{
  91. color:#2496f1;
  92. }
  93. }
  94. }
  95. }
  96. &:last-child{
  97. margin-bottom: 0;
  98. }
  99. &:hover{
  100. background: #f4f7fd;
  101. }
  102. }
  103. }
  104. }
  105. </style>