Home.vue 3.9 KB

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