SalesRank.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <template>
  2. <div class="sale-module">
  3. <div class="agency" v-if="providerType == 'agency'">
  4. <div class="title">
  5. <img src="/images/store/home/hot.png" />
  6. <span>销售排行榜</span>
  7. </div>
  8. <ul class="list-unstyled list-inline">
  9. <li v-for="(store, index) in stores">
  10. <div class="rank">
  11. <img v-if="index == 0" src="/images/store/home/first.png"/>
  12. <img v-else-if="index == 1" src="/images/store/home/second.png"/>
  13. <img v-else-if="index == 2" src="/images/store/home/third.png"/>
  14. </div>
  15. <div class="content">
  16. <div class="name"><a target="_blank" :href="'/store/' + store.uuid" :title="store.storeName">{{store.storeName}}</a></div>
  17. <div class="grade"> 交易量: <span>{{store.orderCount || 0}}</span></div>
  18. </div>
  19. </li>
  20. </ul>
  21. </div>
  22. <div class="original" v-if="providerType == 'original'">
  23. <div class="title">
  24. <img src="/images/original/hot-title.png" alt="">
  25. <span>热卖器件</span>
  26. <span>手慢无!</span>
  27. </div>
  28. <ul>
  29. <li>
  30. <a class="img-wrap">
  31. <i></i>
  32. <img src="/images/original/pro01.jpg" alt="">
  33. </a>
  34. <div class="text-wrap">
  35. <a>panasonic</a>
  36. <a>houass30</a>
  37. </div>
  38. </li>
  39. <li>
  40. <a class="img-wrap">
  41. <i></i>
  42. <img src="/images/original/pro01.jpg" alt="">
  43. </a>
  44. <div class="text-wrap">
  45. <a>panasonic</a>
  46. <a>houass30</a>
  47. </div>
  48. </li>
  49. <li>
  50. <a class="img-wrap">
  51. <i></i>
  52. <img src="/images/original/pro01.jpg" alt="">
  53. </a>
  54. <div class="text-wrap">
  55. <a>panasonic</a>
  56. <a>houass30</a>
  57. </div>
  58. </li>
  59. <li>
  60. <a class="img-wrap">
  61. <i></i>
  62. <img src="/images/original/pro01.jpg" alt="">
  63. </a>
  64. <div class="text-wrap">
  65. <a>panasonic</a>
  66. <a>houass30</a>
  67. </div>
  68. </li>
  69. </ul>
  70. </div>
  71. </div>
  72. </template>
  73. <script>
  74. export default {
  75. name: 'sales-rank',
  76. computed: {
  77. stores () {
  78. return this.$store.state.provider.storeCms.salesStores.data
  79. },
  80. providerType () {
  81. return this.$route.path === '/provider/home' ? 'agency' : 'original'
  82. }
  83. }
  84. }
  85. </script>
  86. <style lang="scss" scoped>
  87. @import '~assets/scss/variables';
  88. .sale-module {
  89. width: 240px;
  90. height: 360px;
  91. border-left: 1px solid #D6D3CE;
  92. border-bottom: 1px solid #D6D3CE;
  93. border-top: 1px solid #D6D3CE;
  94. a {
  95. color: #337ab7;
  96. text-decoration: none;
  97. }
  98. .agency {
  99. .title {
  100. height: 60px;
  101. line-height: 60px;
  102. font-size: 18px;
  103. font-weight: 600;
  104. img {
  105. width: 60px;
  106. height: 60px;
  107. }
  108. }
  109. img {
  110. float: left;
  111. vertical-align: middle;
  112. }
  113. .list-unstyled {
  114. position: relative;
  115. top: -12px;
  116. }
  117. ul {
  118. margin-bottom: 10px;
  119. li {
  120. height: 55px;
  121. padding: 0;
  122. .rank {
  123. display: inline-block;
  124. height: 60px;
  125. padding-bottom: 0;
  126. padding-top: 18px;
  127. padding-left: 10px;
  128. width: 60px;
  129. img {
  130. width: 40px;
  131. height: 33px;
  132. }
  133. }
  134. .content {
  135. width: 169px;
  136. display: inline-block;
  137. padding: 5px;
  138. vertical-align: bottom;
  139. line-height: 20px;
  140. .name {
  141. font-size: 16px;
  142. width: 150px;
  143. white-space: nowrap;
  144. overflow: hidden;
  145. text-overflow: ellipsis;
  146. color: #6D6B66;
  147. }
  148. .grade {
  149. font-size: 14px;
  150. color: #777570;
  151. >span {
  152. color: #777570;
  153. }
  154. }
  155. }
  156. }
  157. li:nth-child(1), li:nth-child(2), li:nth-child(3) {
  158. .content {
  159. .grade {
  160. >span {
  161. color: #f00;
  162. }
  163. }
  164. }
  165. }
  166. }
  167. }
  168. .original {
  169. .title {
  170. height: 50px;
  171. line-height: 50px;
  172. img {
  173. margin: 0 10px 10px 39px;
  174. }
  175. span {
  176. color: #5583fe;
  177. &:nth-child(2) {
  178. font-size: 18px;
  179. font-weight: bold;
  180. margin-right: 10px;
  181. }
  182. }
  183. }
  184. ul {
  185. padding: 0 11px;
  186. li {
  187. padding: 8px 0;
  188. border-bottom: 1px solid #e5e5e5;
  189. &:nth-child(1) {
  190. padding-top: 0;
  191. .img-wrap {
  192. i {
  193. background: url('/images/original/1.png') no-repeat;
  194. }
  195. }
  196. }
  197. &:nth-child(2) {
  198. .img-wrap {
  199. i {
  200. background: url('/images/original/2.png') no-repeat;
  201. }
  202. }
  203. }
  204. &:nth-child(3) {
  205. .img-wrap {
  206. i {
  207. background: url('/images/original/3.png') no-repeat;
  208. }
  209. }
  210. }
  211. &:nth-child(4) {
  212. .img-wrap {
  213. i {
  214. background: url('/images/original/4.png') no-repeat;
  215. }
  216. }
  217. }
  218. div {
  219. display: inline-block;
  220. vertical-align: middle;
  221. &.img-wrap {
  222. position: relative;
  223. width: 62px;
  224. height: 62px;
  225. border: 1px solid #d9d9d9;
  226. margin-left: 9px;
  227. line-height: 62px;
  228. text-align: center;
  229. img {
  230. max-width: 60px;
  231. max-height: 60px;
  232. }
  233. i {
  234. position: absolute;
  235. left: 0;
  236. top: 0;
  237. width: 19px;
  238. height: 21px;
  239. }
  240. }
  241. &.text-wrap {
  242. line-height: 25px;
  243. margin-left: 17px;
  244. a {
  245. display: block;
  246. color: #666;
  247. width: 104px;
  248. overflow: hidden;
  249. text-overflow: ellipsis;
  250. white-space: nowrap;
  251. &:last-child {
  252. font-size: 12px;
  253. }
  254. &:hover {
  255. color: #5078cb;
  256. }
  257. }
  258. }
  259. }
  260. .img-wrap {
  261. display: inline-block;
  262. vertical-align: middle;
  263. position: relative;
  264. width: 62px;
  265. height: 62px;
  266. border: 1px solid #d9d9d9;
  267. margin-left: 9px;
  268. line-height: 62px;
  269. text-align: center;
  270. img {
  271. max-width: 60px;
  272. max-height: 60px;
  273. }
  274. i {
  275. position: absolute;
  276. left: 0;
  277. top: 0;
  278. width: 19px;
  279. height: 21px;
  280. }
  281. }
  282. }
  283. }
  284. }
  285. }
  286. </style>