<template>
  <view class='detail'>
    <component :is="componentType"></component>
  </view>
</template>

<script>
import ActivityThinking from './component/thinking';
import ActivityCommunication from './component/communication';
import ActivityGrow from './component/grow';
export default {
  data() {
    return {
      type: '1'
    }
  },
  components: {
    ActivityThinking,
    ActivityCommunication,
    ActivityGrow
  },
  computed: {
    componentType() {
      if (this.type == 1) {
        return 'activity-thinking'
      } else if (this.type == 2) {
        return 'activity-communication'
      } else if (this.type == 3) {
        return 'activity-grow'
      }
      return ''
    }
  },

  onLoad(options) {
    this.type = options.type
    let title = '思维能力挑战赛';
    if (this.type == 1) {
      title = '思维能力挑战赛'
    } else if (this.type == 2) {
      title = '培训交流'
    } else if (this.type == 3) {
      title = '逻辑狗伴我成长'
    } else {
      title = '思维能力挑战赛';
    }
    uni.setNavigationBarTitle({
      title: title
    });
  },

  onShow() {

  },

  methods: {

  }

}
</script>

<style lang="scss" scoped>
</style>

