like.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <view class="user-like">
  3. <nav-bar title="我的点赞" @init="onInitNavbar"></nav-bar>
  4. <u-scroll-view>
  5. <view class="user-like-tabs-wrapper">
  6. <view class="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-like-list">
  12. <template v-for="(item, index) in likeList">
  13. <template v-if="tabActive === 'exhibitor'">
  14. <exhibitor-item :item="item" :footer-hidden="true" :key="index" />
  15. </template>
  16. <template v-else>
  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. UScrollView,
  39. ExhibitItem,
  40. ExhibitorItem
  41. },
  42. computed: {
  43. },
  44. data() {
  45. return {
  46. tabActive: 'exhibitor',
  47. tabs: [{
  48. label: '展商',
  49. value: 'exhibitor'
  50. }, {
  51. label: '展品',
  52. value: 'exhibit'
  53. }],
  54. likeList: [{}, {}, {}, {}, {}, {}],
  55. }
  56. },
  57. created() {
  58. this.checkAuth('/pages/user/like')
  59. this.loadFontFace('Poppins')
  60. },
  61. onShow() {
  62. },
  63. methods: {
  64. tabChange() {
  65. }
  66. }
  67. }
  68. </script>
  69. <style lang="scss">
  70. @import "@/static/style/pages/user-like.scss";
  71. </style>