index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <template>
  2. <div class="mobile-center">
  3. <div class="com-mobile-header mobile-center-header">
  4. <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
  5. <p>卖家中心</p>
  6. <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
  7. </div>
  8. <div class="mobile-fix-content mobile-centerfix-content">
  9. <div class="seek-banner block-wrap">
  10. <img src="/images/mobile/center/vendor/adv.jpg" alt="">
  11. </div>
  12. <div class="block-wrap seek-operation">
  13. <p><i></i>产品管理</p>
  14. <ul>
  15. <nuxt-link tag="li" to="/mobile/center/vendor/product?providerType=enterprise">
  16. <img src="/images/mobile/center/vendor/material.png" alt="">
  17. <p>企业产品库</p>
  18. </nuxt-link>
  19. <nuxt-link tag="li" to="/mobile/center/vendor/product?providerType=person">
  20. <img src="/images/mobile/center/vendor/material-person.png" alt="">
  21. <p>个人产品库</p>
  22. </nuxt-link>
  23. <nuxt-link tag="li" to="/mobile/center/vendor/product?providerType=onLine">
  24. <img src="/images/mobile/center/vendor/onsale.png" alt="">
  25. <p>在售产品</p>
  26. </nuxt-link>
  27. </ul>
  28. </div>
  29. <div class="block-wrap seek-operation">
  30. <p><i></i>商机管理</p>
  31. <ul>
  32. <nuxt-link to="/mobile/center/vendor/seek?seekType=wait" tag="li">
  33. <img src="/images/mobile/center/vendor/all.png" alt="">
  34. <p>公司商机</p>
  35. </nuxt-link>
  36. <nuxt-link to="/mobile/center/vendor/seek?seekType=done" tag="li">
  37. <img src="/images/mobile/center/vendor/seek-done.png" alt="">
  38. <p>已报价</p>
  39. </nuxt-link>
  40. <nuxt-link to="/mobile/center/vendor/attentionBus" tag="li">
  41. <img src="/images/mobile/center/vendor/attention-bu.png" alt="">
  42. <p>商机关注</p>
  43. </nuxt-link>
  44. </ul>
  45. </div>
  46. <div class="block-wrap collect-block">
  47. <div class="content-line" @click="goStore">
  48. <img src="/images/mobile/center/vendor/shop.png" alt="">
  49. <span>我的店铺</span>
  50. <i class="iconfont icon-xiangyou"></i>
  51. </div>
  52. <nuxt-link tag="div" to="/mobile/center/vendor/message" class="content-line" v-if="user.data.enterprise.uu">
  53. <img src="/images/mobile/center/user/message.png" alt="">
  54. <span>消息<span class="text">({{messageCount.count || 0}})</span></span>
  55. <i class="iconfont icon-xiangyou"></i>
  56. </nuxt-link>
  57. </div>
  58. </div>
  59. <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
  60. </div>
  61. </template>
  62. <script>
  63. import { RemindBox } from '~components/mobile/common'
  64. export default {
  65. middleware: 'authenticated',
  66. layout: 'mobileNoHeader',
  67. data () {
  68. return {
  69. remindText: '',
  70. timeoutCount: 0
  71. }
  72. },
  73. fetch ({ store }) {
  74. let user = store.state.option.user.data
  75. return Promise.all([
  76. store.dispatch('loadStoreStatus', { op: 'check' }),
  77. store.dispatch('messageShow/loadMessageCount', {receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', isRead: 0})
  78. ])
  79. },
  80. components: {
  81. RemindBox
  82. },
  83. computed: {
  84. storeInfo () {
  85. return this.$store.state.option.storeStatus.data
  86. },
  87. messageCount () {
  88. return this.$store.state.messageShow.messageCount.count.data
  89. }
  90. },
  91. methods: {
  92. goStore: function () {
  93. if (this.storeInfo.uuid) {
  94. this.$router.push(`/mobile/shop/${this.storeInfo.uuid}`)
  95. } else {
  96. this.onRemind('请先前往pc端开通店铺')
  97. }
  98. },
  99. onRemind: function (str) {
  100. this.remindText = str
  101. this.timeoutCount++
  102. }
  103. }
  104. }
  105. </script>
  106. <style lang="scss" scoped>
  107. @import '~assets/scss/mobileCenter';
  108. .mobile-center{
  109. .collect-block {
  110. height: auto;
  111. }
  112. }
  113. </style>