Home.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <div>
  3. <div class="home" v-if="!showMainSearch">
  4. <div class="header">
  5. <div class="search-content">
  6. <input type="text" placeholder="请输入您要查找的型号或品牌" @click="onHomeSearchClick()">
  7. <span>
  8. <i class="iconfont icon-sousuo"></i>
  9. </span>
  10. <img src="/images/mobile/@2x/applyPurchase/home/phone.png" alt="" @click="showStoreInfo = true">
  11. </div>
  12. </div>
  13. <ul class="link-list">
  14. <li>
  15. <nuxt-link to="/mobile/shop">
  16. <img src="/images/mobile/@2x/applyPurchase/home/shop.png" alt="">
  17. <span>店铺列表</span>
  18. </nuxt-link>
  19. </li>
  20. <li>
  21. <nuxt-link to="/mobile/brand/brandCenter/ABCD">
  22. <img src="/images/mobile/@2x/applyPurchase/home/brand.png" alt="">
  23. <span>品牌列表</span>
  24. </nuxt-link>
  25. </li>
  26. <li>
  27. <nuxt-link to="/mobile/applyPurchase/list">
  28. <img src="/images/mobile/@2x/applyPurchase/home/seek.png" alt="">
  29. <span>求购询价</span>
  30. </nuxt-link>
  31. </li>
  32. </ul>
  33. <div class="seek-title">
  34. <img src="/images/mobile/@2x/applyPurchase/home/seek-title.png" alt="">
  35. <span>最新求购信息</span>
  36. <nuxt-link to="/mobile/applyPurchase/list">查看更多 <img src="/images/mobile/@2x/applyPurchase/home/arrow-right.png" alt=""></nuxt-link>
  37. </div>
  38. <seek-list :purchaseManList="purchaseManList"></seek-list>
  39. </div>
  40. <div class="mobile-modal" v-if="showStoreInfo">
  41. <div class="mobile-modal-box">
  42. <div class="mobile-modal-header">联系方式<i @click="showStoreInfo = false" class="icon-guanbi iconfont"></i></div>
  43. <div class="mobile-modal-content">
  44. <div>商家地址:深圳市南山区英唐大厦6楼</div>
  45. <!-- <div class="content-line link-url">在线咨询</div>-->
  46. <div>致电:<a href="tel:4008301818" target="_blank" class="content-line link-url">4008301818</a></div>
  47. <div>邮件:<a href="mailto:yrsc@usoftchina.com" target="_blank" class="content-line link-url">yrsc@usoftchina.com</a></div>
  48. </div>
  49. </div>
  50. </div>
  51. <main-search v-if="showMainSearch" @cancelSearchAction="onCancelSearch"></main-search>
  52. </div>
  53. </template>
  54. <script>
  55. import SeekList from './applyPurchase/SeekList.vue'
  56. import MainSearch from '~/components/mobile/search/MainSearch.vue'
  57. export default {
  58. data () {
  59. return {
  60. showStoreInfo: false,
  61. showMainSearch: false
  62. }
  63. },
  64. components: {
  65. SeekList,
  66. MainSearch
  67. },
  68. computed: {
  69. purchaseManList () {
  70. return this.$store.state.applyPurchase.purchaseManList.purchaseHomeList.data.content
  71. }
  72. },
  73. methods: {
  74. onHomeSearchClick () {
  75. this.showMainSearch = true
  76. this.$store.dispatch('searchData/getSearchHistory')
  77. },
  78. onCancelSearch: function () {
  79. this.showMainSearch = false
  80. }
  81. }
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. .home {
  86. padding-bottom: 1rem;
  87. .header {
  88. background: url('/images/mobile/@2x/applyPurchase/home/home-bg.png') no-repeat;
  89. background-size: cover;
  90. height: 3.26rem;
  91. }
  92. .link-list {
  93. background: #f3f3f7;
  94. height: 1.36rem;
  95. li {
  96. display: inline-block;
  97. width: 33.3%;
  98. text-align: center;
  99. float: left;
  100. height: 1.36rem;
  101. img {
  102. width: .63rem;
  103. height: .63rem;
  104. margin-top: .2rem;
  105. }
  106. span {
  107. font-size: .22rem;
  108. color: #666;
  109. display: block;
  110. margin-top: .15rem;
  111. }
  112. }
  113. }
  114. }
  115. </style>