index.vue 2.9 KB

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