<template>
  <div class="chatArea">
		<iframe ref="iframeRef" class="ca_iframe" allow="camera *; microphone *;display-capture;midi;encrypted-media;" :src="src"></iframe>
  </div>
</template>

<script>

export default {

  data() {
    return {
      userId: this.$route.query.userid,
      org: this.$route.query.org,
      oid: this.$route.query.oid,
			type:this.$route.query.type,
			src:"https://beta.cloud.cocorobo.cn/aigpt/#/js?active_role=3"
    };
  },
  methods: {

  },
  mounted() {
		if (this.type == 1) {
      this.src = `https://beta.cloud.cocorobo.cn/aigpt/#/js?active_role=${5}`;
			console.log("5")
    } else if (this.type == 2) {
      this.src = `https://beta.cloud.cocorobo.cn/aigpt/#/js?active_role=${3}`;
			console.log(3)
    }
  }
};
</script>

<style scoped>
.chatArea{
	width: 100vw;
	height: 100vh;
	overflow: hidden;
}

.ca_iframe{
	width: 100%;
	height: 100%;
}
</style>
