index.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <div class="mobile-center">
  3. <div class="com-mobile-header">
  4. <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
  5. <p>买家中心</p>
  6. </div>
  7. <div class="mobile-fix-content">
  8. <div class="seek-banner block-wrap">
  9. <img src="/images/mobile/center/user/seek-banner.jpg" alt="">
  10. <p class="s-title inline-block">我要求购&nbsp;&nbsp;<span>满足你所需</span>
  11. <br/>
  12. <span class="s-text">让订单飞起来</span>
  13. </p>
  14. </div>
  15. <div class="block-wrap seek-operation">
  16. <p><i></i>我的求购</p>
  17. <ul>
  18. <nuxt-link to="/mobile/center/user/seek?seekType=wait" tag="li">
  19. <img src="/images/mobile/center/user/wait.png" alt="">
  20. <p>待报价</p>
  21. </nuxt-link>
  22. <nuxt-link to="/mobile/center/user/seek?seekType=done" tag="li">
  23. <img src="/images/mobile/center/user/done.png" alt="">
  24. <p>已报价</p>
  25. </nuxt-link>
  26. <li @click="showPublishBox = true">
  27. <img src="/images/mobile/center/user/pub.png" alt="">
  28. <p>发布求购</p>
  29. </li>
  30. </ul>
  31. </div>
  32. <div class="block-wrap collect-block">
  33. <nuxt-link tag="div" to="/mobile/center/user/collect/component" class="content-line">
  34. <img src="/images/mobile/center/user/comp-collect.png" alt="">
  35. <span>器件收藏<span class="text">({{compCount.data || 0}})</span></span>
  36. <i class="iconfont icon-xiangyou"></i>
  37. </nuxt-link>
  38. <nuxt-link tag="div" to="/mobile/center/user/collect/store" class="content-line">
  39. <img src="/images/mobile/center/user/store-focus.png" alt="">
  40. <span>店铺关注<span class="text">({{storeCount.data || 0}})</span></span>
  41. <i class="iconfont icon-xiangyou"></i>
  42. </nuxt-link>
  43. </div>
  44. </div>
  45. <publish-seek :showSayPriceBox="showPublishBox" @cancelAction="showPublishBox = false" @remindAction="onRemind"></publish-seek>
  46. <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
  47. </div>
  48. </template>
  49. <script>
  50. import { RemindBox } from '~components/mobile/common'
  51. import { PublishSeek } from '~components/mobile/applyPurchase'
  52. export default {
  53. layout: 'mobileNoHeader',
  54. middleware: 'authenticated',
  55. data () {
  56. return {
  57. showPublishBox: false,
  58. remindText: '',
  59. timeoutCount: 0
  60. }
  61. },
  62. fetch ({store}) {
  63. return Promise.all([
  64. store.dispatch('product/loadCompCollectInfo'),
  65. store.dispatch('shop/loadStoreCollectInfo')
  66. ])
  67. },
  68. components: {
  69. RemindBox,
  70. PublishSeek
  71. },
  72. computed: {
  73. compCount () {
  74. return this.$store.state.product.component.collectCount.data
  75. },
  76. storeCount () {
  77. return this.$store.state.shop.storeInfo.collectCount.data
  78. }
  79. },
  80. methods: {
  81. onRemind: function (str) {
  82. this.remindText = str
  83. this.timeoutCount++
  84. }
  85. }
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. @import '~assets/scss/mobileCenter';
  90. </style>