ExcellentSuppliers.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <template>
  2. <div class="container marketing" style="padding-top: 25px;">
  3. <div class="head">
  4. <span class="title">优秀商家</span>
  5. <a class="see-more" href="/provider/list" v-if="isShowMore">查看更多</a>
  6. </div>
  7. <ul class="list-unstyled list-inline">
  8. <li class="store-box" v-for="(store, index) in stores" :class="{ 'margin-left-zero' : index % 5 == 0}" >
  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" title="store.storeName">
  13. <span>{{store.storeName}}</span>
  14. </div>
  15. <div class="description">
  16. 商家介绍:<span>{{store.description}}</span>
  17. </div>
  18. </div>
  19. </a>
  20. </li>
  21. </ul>
  22. </div>
  23. </template>
  24. <script>
  25. export default {
  26. data () {
  27. return {
  28. stores: {}
  29. }
  30. },
  31. name: 'excellent-suppliers',
  32. props: ['isShowMore'],
  33. mounted () {
  34. this.$http.get('/api/cms-service/storeIn/5')
  35. .then(response => {
  36. this.stores = response.data
  37. })
  38. },
  39. computed: {
  40. // stores () {
  41. // return this.$store.state.provider.storeCms.recommendStore.data
  42. // }
  43. }
  44. }
  45. </script>
  46. <style scoped>
  47. .marketing {
  48. width: 1190px;
  49. padding: 0px;
  50. }
  51. .marketing .store-box {
  52. width: 220px;
  53. height: 210px;
  54. border: 1px solid #D6D3CE;
  55. margin-left: 25px;
  56. margin-bottom: 22px;
  57. overflow: hidden;
  58. }
  59. .margin-left-zero {
  60. margin-left: 0px !important;
  61. }
  62. .marketing ul.list-inline {
  63. margin-left: 0px;
  64. }
  65. .marketing .list-inline>li.store-box {
  66. padding-right: 0;
  67. padding-left: 0;
  68. margin-right: -3px;
  69. }
  70. .marketing .list-inline>li:last-child {
  71. margin-right: 0;
  72. }
  73. .marketing .see-more {
  74. float: right;
  75. width: 70px;
  76. height: 26px;
  77. border: 1px solid #d6d3ce;
  78. color: #214797;
  79. font-family: "Microsoft Yahei", "微软雅黑";
  80. font-size: 14px;
  81. line-height: 26px;
  82. padding-left: 6px;
  83. margin-top: 20px;
  84. border-radius: 3px;
  85. }
  86. .marketing .see-more:hover{
  87. background: #5078cb;
  88. color: #fff;
  89. }
  90. .marketing .see-more:hover {
  91. cursor: pointer;
  92. }
  93. .marketing .title {
  94. font-size: 24px;
  95. line-height: 60px;
  96. height: 60px;
  97. font-weight: inherit;
  98. }
  99. li.store-box:hover {
  100. border-color: #1162A4;
  101. }
  102. .store-box a {
  103. text-decoration: none;
  104. display: block;
  105. text-align: center;
  106. width: 220px;
  107. height: 210px;
  108. }
  109. .store-box a .description {
  110. text-align: left;
  111. }
  112. .store-box a:hover {
  113. text-decoration: none;
  114. }
  115. .store-box img {
  116. max-height: 80px;
  117. max-width: 220px;
  118. margin-top: 0;
  119. }
  120. .store-box .content {
  121. margin: 0 12px;
  122. padding: 5px;
  123. height: 103px;
  124. overflow: hidden;
  125. text-overflow: ellipsis;
  126. white-space: nowrap;
  127. word-break: break-all;
  128. }
  129. .store-box .name {
  130. font-size: 16px;
  131. color: #383939;
  132. text-align: left;
  133. /*width: 200px;*/
  134. height: 30px;
  135. font-weight: 600;
  136. margin: 10px 0 5px 0;
  137. display: block;
  138. white-space: nowrap;
  139. overflow: hidden;
  140. text-overflow: ellipsis;
  141. }
  142. .store-box .subject, .store-box .description {
  143. margin-bottom: 5px;
  144. /*width: 200px;*/
  145. height: 35px;
  146. font-size: 12px;
  147. color: #797979;
  148. line-height: 18px;
  149. white-space: nowrap;
  150. overflow: hidden;
  151. text-overflow: ellipsis;
  152. }
  153. .store-box .description{
  154. overflow:hidden;
  155. text-overflow:ellipsis;
  156. display:-webkit-box;
  157. -webkit-box-orient:vertical;
  158. -webkit-line-clamp: 4;
  159. }
  160. .store-box .description span {
  161. word-break: normal;
  162. width: 204px;
  163. display: inline;
  164. white-space: pre-wrap;
  165. word-wrap : break-word ;
  166. overflow: hidden;
  167. text-overflow: ellipsis;
  168. }
  169. .store-index-top {
  170. height: 360px;
  171. }
  172. .store-index-top-left {
  173. width: 240px;
  174. float: left;
  175. display: inline-block;
  176. }
  177. .store-index-top-center {
  178. width: 670px;
  179. display: inline-block;
  180. float: left;
  181. border: 1px solid #D6D3CE;
  182. }
  183. .store-index-top-right {
  184. width: 280px;
  185. float: left;
  186. display: inline-block;
  187. }
  188. .store-box .img{
  189. margin-top: 5px;
  190. width: 220px;
  191. height: 80px;
  192. display: inline-block;
  193. overflow: hidden;
  194. line-height: 80px;
  195. text-align: center;
  196. }
  197. </style>