index.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <auth-wrap ref="authWrap">
  3. <template class="usr-trip-info-container" slot="content">
  4. <rich-text :content="content" v-if="content"></rich-text>
  5. <u-empty
  6. v-else
  7. mode="data"
  8. text="还没有添加行程,赶紧去报名吧!"
  9. @click="regisClick"
  10. >
  11. </u-empty>
  12. </template>
  13. </auth-wrap>
  14. </template>
  15. <script>
  16. import { fetchUsrTrip } from '@/common/api';
  17. import AuthWrap from '@/components/AuthComp/index.vue';
  18. import ItemList from '@/components/ItemList/index.vue';
  19. import RichText from '@/components/RichText/index.vue';
  20. export default {
  21. components: {
  22. RichText,
  23. AuthWrap,
  24. ItemList,
  25. },
  26. data() {
  27. return {
  28. content: '',
  29. };
  30. },
  31. onLoad() {
  32. this.$refs.authWrap.reloadPage();
  33. this.loadmore();
  34. },
  35. methods: {
  36. async loadmore() {
  37. const { data } = await fetchUsrTrip();
  38. this.content = data.tripDetail;
  39. },
  40. regisClick() {
  41. uni.navigateTo({
  42. url: '/pasb/pages/regis/index',
  43. });
  44. },
  45. },
  46. onShareAppMessage() {
  47. return {
  48. title: 'First UI组件库',
  49. };
  50. },
  51. };
  52. </script>
  53. <style lang="scss" src="./index.scss" />