vote.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <view class="user-vote user-like">
  3. <nav-bar title="我的投票" @init="onInitNavbar"></nav-bar>
  4. <u-scroll-view>
  5. <view class="user-vote-tabs-wrapper user-like-tabs-wrapper">
  6. <view class="user-vote-tabs user-like-tabs">
  7. <u-tabs :active.sync="tabActive" :tabs="tabs" @change="tabChange" />
  8. </view>
  9. </view>
  10. <view class="main-container">
  11. <view class="user-vote-list user-like-list">
  12. <template v-for="(item, index) in favoritesList">
  13. <template v-if="tabActive === 'exhibitor'">
  14. <exhibitor-item :item="item" :footer-hidden="true" :key="index" />
  15. </template>
  16. <template v-else-if="tabActive === 'exhibit'">
  17. <exhibit-item :item="item" :footer-hidden="true" :key="index" />
  18. </template>
  19. </template>
  20. </view>
  21. </view>
  22. </u-scroll-view>
  23. </view>
  24. </template>
  25. <script>
  26. import NavBar from '@/components/layout/nav-bar'
  27. import UTabs from '@/components/common/u-tabs'
  28. import UScrollView from '@/components/common/u-scroll-view'
  29. import ExhibitItem from '@/pages/exhibitor/components/exhibit-item.vue'
  30. import ExhibitorItem from '@/pages/exhibitor/components/exhibitor-item.vue'
  31. export default {
  32. options: {
  33. styleIsolation: 'shared'
  34. },
  35. components: {
  36. NavBar,
  37. UTabs,
  38. ExhibitItem,
  39. ExhibitorItem
  40. },
  41. computed: {
  42. },
  43. data() {
  44. return {
  45. tabActive: 'exhibitor',
  46. tabs: [{
  47. label: '展商',
  48. value: 'exhibitor'
  49. }, {
  50. label: '展品',
  51. value: 'exhibit'
  52. }],
  53. favoritesList: [{}, {}, {}, {}, {}, {}],
  54. }
  55. },
  56. created() {
  57. this.checkAuth('/pages/user/vote')
  58. this.loadFontFace('Poppins')
  59. },
  60. onShow() {
  61. },
  62. methods: {
  63. tabChange() {
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss">
  69. @import "@/static/style/pages/user-like.scss";
  70. </style>