<template>
  <view :style="{ height: height }" class="flex flex-col overflow-hidden">
    <Title />
    <view class="container flex flex-col flex-1 overflow-hidden bg-gray-100">
      <Roles />
      <Globals />
      <TimeLine class="flex-1 overflow-hidden" />
    </view>
  </view>
</template>

<script>
import { mapState, mapMutations, mapActions } from 'vuex';
export default {
  data() {
    return { title: 'Hello', height: '', scrollHeight: null };
  },

  computed: { ...mapState('user', ['user', 'token']) },

  onLoad(options) {
    console.log('options: ', options);
    console.log(this.$u.config.v);
    // this.openPage();
    // DEBUG:

    this.getUserId('1217651354919636992');

    const params = { param: { projectId: '1235555' } };
    this.$u.api.findProjectById(params);
  },

  mounted() {
    this.height = window.screen.height + 'px';
  },

  methods: {
    ...mapMutations('user', ['setToken', 'setUser']),
    ...mapActions('user', ['getUserId']),

    openPage() {
      console.log('open');
      this.$u.route('/pages/pinch/pinch');
    },
  },
};
</script>
