SalesRank.vue 8.2 KB

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