RecommendOriginal.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <div class="container" id="recommends">
  3. <div class="title-icon">原厂推荐</div>
  4. <div class="hr-blue"></div>
  5. <ul class="recommend-list list-unstyled list-inline">
  6. <li class="recommend" v-for="(store, index) in stores">
  7. <a :href="'/store/' + store.uuid" target="_blank">
  8. <div class="img"><img :src="store.logoUrl || '/images/store/common/default.png'" /></div>
  9. <div class="content">
  10. <div class="name">
  11. <span :title="store.storeName">{{store.storeName}}</span>
  12. </div>
  13. <!--<div class="subject" style="min-height: 5px;">
  14. </div>-->
  15. <div class="description">
  16. <strong>商家介绍</strong>:
  17. <span>{{store.description || '暂无简介'}}</span>
  18. </div>
  19. </div>
  20. </a>
  21. </li>
  22. </ul>
  23. </div>
  24. </template>
  25. <script>
  26. export default {
  27. name: 'recommend-original',
  28. data () {
  29. return {
  30. stores: {},
  31. params: {
  32. type: 'ORIGINAL_FACTORY'
  33. }
  34. }
  35. },
  36. mounted () {
  37. this.$http.get('/api/store-cms/contents/store/5', {
  38. params: this.params
  39. }).then(response => {
  40. this.stores = response.data
  41. })
  42. },
  43. computed: {
  44. // stores () {
  45. // return this.$store.state.provider.storeCms.recommendStore.data
  46. // }
  47. }
  48. }
  49. </script>
  50. <style scoped>
  51. #recommends {
  52. width: 1190px;
  53. padding: 0px;
  54. }
  55. #recommends .title-icon {
  56. font-size: 24px;
  57. color: #323232;
  58. margin-top: 30px;
  59. margin-bottom: 10px;
  60. }
  61. #recommends .hr-blue {
  62. border-bottom: 2px solid #6493FF;
  63. border-right: 0px;
  64. border-top: 0px;
  65. border-left: 0px;
  66. width: 100%;
  67. margin-bottom: 20px;
  68. }
  69. #recommends .recommend-list {
  70. margin-bottom: 20px;
  71. margin: 0;
  72. }
  73. #recommends .recommend-list .recommend {
  74. width: 220px;
  75. height: 210px;
  76. border: 1px solid #D6D3CE;
  77. margin-right: 22.5px;
  78. margin-bottom: 22px;
  79. }
  80. #recommends .recommend-list .recommend:last-child{
  81. margin-right: 0px !important;
  82. }
  83. .margin-left-zero {
  84. margin-left: 0px !important;
  85. }
  86. #recommends .recommend-list .recommend a {
  87. text-decoration: none;
  88. }
  89. #recommends .recommend-list .recommend .img{
  90. width: 200px;
  91. height: 80px;
  92. display: inline-block;
  93. overflow: hidden;
  94. line-height: 80px;
  95. text-align: center;
  96. margin-top: 5px;
  97. }
  98. #recommends .recommend-list .recommend img{
  99. max-height: 75px;
  100. max-width: 200px;
  101. margin-top: 5px;
  102. }
  103. #recommends .recommend-list .recommend .content {
  104. margin: 0 10px;
  105. height: 108px;
  106. text-align: left;
  107. }
  108. #recommends .recommend-list .recommend .name {
  109. font-size: 16px;
  110. color: #383939;
  111. font-weight: 600;
  112. width: 200px;
  113. height: 30px;
  114. margin-top: 10px;
  115. overflow: hidden;
  116. text-overflow: ellipsis;
  117. white-space: nowrap;
  118. word-break: break-all;
  119. }
  120. /*#recommends .recommend-list .recommend:hover .name{*/
  121. /*width: auto;*/
  122. /*}*/
  123. #recommends .recommend-list .recommend .subject, #recommends .recommend-list .recommend .description {
  124. font-size: 12px;
  125. color: #797979;
  126. line-height: 18px;
  127. overflow: hidden;
  128. text-overflow: ellipsis;
  129. display: -webkit-box;
  130. -webkit-box-orient: vertical;
  131. -webkit-line-clamp: 2;
  132. max-height: 36px;
  133. }
  134. #recommends .recommend-list .recommend .description{
  135. margin-top: 5px;
  136. width: 200px;
  137. height: 35px;
  138. }
  139. #recommends .recommend-list .recommend .subject span {
  140. width: 204px;
  141. white-space: pre-wrap;
  142. word-wrap : break-word ;
  143. overflow: hidden;
  144. text-overflow: ellipsis;
  145. }
  146. #recommends .recommend-list .recommend:hover{
  147. border: #5078cb 1px solid;
  148. }
  149. #recommends .recommend-list .recommend .description span {
  150. word-break: keep-all;
  151. width: 204px;
  152. display: inline;
  153. overflow: hidden;
  154. text-overflow: ellipsis;
  155. white-space: pre-wrap;
  156. word-wrap : break-word ;
  157. }
  158. </style>