like.vue 1.6 KB

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