StoreBanner.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <div class="container" id="title-fragment">
  3. <div class="container">
  4. <div class="shop-pcb">
  5. <ul class="pk-list">
  6. <nuxt-link :to="`/pcb/search/?w=${encodeURIComponent(kind.nameCn)}`" tag="li" class="pk-item" v-for="kind in kinds" :key="kind.id">{{kind.nameCn}}<i class="icon-arrow-right iconfont"></i></nuxt-link>
  7. </ul>
  8. </div>
  9. <div class="pcb-banner">
  10. <img :src="storeInfo.bannerUrl || '/images/store/default/shop_banner.png'">
  11. <div id="shop-title" v-if="storeInfo.storeShortName" v-text="storeInfo.storeShortName">店铺名称</div>
  12. </div>
  13. </div>
  14. </div>
  15. </template>
  16. <script>
  17. export default {
  18. name: 'store-banner',
  19. computed: {
  20. kinds () {
  21. return this.$store.state.pcb.kindsData.kinds.data
  22. },
  23. storeInfo () {
  24. return this.$store.state.shop.storeInfo.store.data
  25. }
  26. }
  27. }
  28. </script>
  29. <style lang="scss" scoped>
  30. #title-fragment {
  31. padding: 0;
  32. }
  33. #title-fragment .container {
  34. width: 1190px;
  35. padding-left: 0px;
  36. padding-right: 0px;
  37. }
  38. #title-fragment .shop-pcb{
  39. margin-right: 10px;
  40. width: 220px;
  41. border: 1px solid #e8e8e8;
  42. float: left;
  43. text-align: center;
  44. line-height: 210px;
  45. position: relative;
  46. background: #fff;
  47. overflow: hidden;
  48. .pk-list {
  49. height:300px;
  50. .pk-item{
  51. height:50px;
  52. line-height: 50px;
  53. border-bottom:1px solid #e7e7e7;
  54. cursor:pointer;
  55. text-align: left;
  56. color: #666;
  57. padding-left:20px;
  58. &:hover{
  59. background: #e7e7e7;
  60. }
  61. &:last-child{
  62. border:none;
  63. }
  64. .iconfont {
  65. float: right;
  66. margin-right: 18px;
  67. }
  68. }
  69. }
  70. }
  71. #title-fragment .pcb-banner {
  72. float: left;
  73. position: relative;
  74. width: 955px;
  75. height: 320px;
  76. border: 1px solid #e8e8e8;
  77. border-left: none;
  78. overflow: hidden;
  79. border-radius: 5px;
  80. img{
  81. width: 955px;
  82. height: 300px;
  83. }
  84. #shop-title{
  85. position: absolute;
  86. top: 50px;
  87. left: 60px;
  88. font-size: 30px;
  89. color: rgb(255,255,255);
  90. }
  91. }
  92. .container{
  93. width: 1190px;
  94. padding: 0;
  95. }
  96. </style>