SalesRank.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <div class="sale-module">
  3. <div class="title">
  4. <img src="/images/store/home/hot.png" />
  5. <span>销售排行榜</span>
  6. </div>
  7. <ul class="list-unstyled list-inline">
  8. <li v-for="(store, index) in stores">
  9. <div class="rank">
  10. <img v-if="index == 0" src="/images/store/home/first.png"/>
  11. <img v-else-if="index == 1" src="/images/store/home/second.png"/>
  12. <img v-else-if="index == 2" src="/images/store/home/third.png"/>
  13. </div>
  14. <div class="content">
  15. <div class="name"><a target="_blank" :href="'/store/' + store.uuid" :title="store.storeName">{{store.storeName}}</a></div>
  16. <div class="grade"> 交易量: <span>{{store.orderCount || 0}}</span></div>
  17. </div>
  18. </li>
  19. </ul>
  20. </div>
  21. </template>
  22. <script>
  23. export default {
  24. name: 'sales-rank',
  25. computed: {
  26. stores () {
  27. return this.$store.state.provider.storeCms.salesStores.data
  28. }
  29. }
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. @import '~assets/scss/variables';
  34. .sale-module {
  35. width: 240px;
  36. height: 360px;
  37. border-left: 1px solid #D6D3CE;
  38. border-bottom: 1px solid #D6D3CE;
  39. border-top: 1px solid #D6D3CE;
  40. a {
  41. color: #337ab7;
  42. text-decoration: none;
  43. }
  44. .title {
  45. height: 60px;
  46. line-height: 60px;
  47. font-size: 18px;
  48. font-weight: 600;
  49. img {
  50. width: 60px;
  51. height: 60px;
  52. }
  53. }
  54. img {
  55. float: left;
  56. vertical-align: middle;
  57. }
  58. .list-unstyled {
  59. position: relative;
  60. top: -12px;
  61. }
  62. ul {
  63. margin-bottom: 10px;
  64. li {
  65. height: 55px;
  66. padding: 0;
  67. .rank {
  68. display: inline-block;
  69. height: 60px;
  70. padding-bottom: 0;
  71. padding-top: 18px;
  72. padding-left: 10px;
  73. width: 60px;
  74. img {
  75. width: 40px;
  76. height: 33px;
  77. }
  78. }
  79. .content {
  80. width: 169px;
  81. display: inline-block;
  82. padding: 5px;
  83. vertical-align: bottom;
  84. line-height: 20px;
  85. .name {
  86. font-size: 16px;
  87. width: 150px;
  88. white-space: nowrap;
  89. overflow: hidden;
  90. text-overflow: ellipsis;
  91. color: #6D6B66;
  92. }
  93. .grade {
  94. font-size: 14px;
  95. color: #777570;
  96. >span {
  97. color: #777570;
  98. }
  99. }
  100. }
  101. }
  102. li:nth-child(1), li:nth-child(2), li:nth-child(3) {
  103. .content {
  104. .grade {
  105. >span {
  106. color: #f00;
  107. }
  108. }
  109. }
  110. }
  111. }
  112. }
  113. </style>