like.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view class="user-like" v-if="loading">
  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. loading: false,
  47. tabActive: 'exhibitor',
  48. tabs: [{
  49. label: '展商',
  50. value: 'exhibitor'
  51. }, {
  52. label: '展品',
  53. value: 'exhibit'
  54. }],
  55. likeList: [{}, {}, {}, {}, {}, {}],
  56. }
  57. },
  58. created() {
  59. this.checkAuth('/pages/user/like')
  60. this.loadFontFace('Poppins')
  61. },
  62. onShow() {
  63. },
  64. methods: {
  65. tabChange() {
  66. }
  67. }
  68. }
  69. </script>
  70. <style lang="scss">
  71. @import "@/static/style/pages/user-like.scss";
  72. </style>