index.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { defineComponent, ref } from "vue";
  2. import styles from "./index.module.less";
  3. import iconBack from "../icons/icon-right-back.png";
  4. import { Icon, ImagePreview, Tab, Tabs } from "vant";
  5. export default defineComponent({
  6. name: "screenModel",
  7. emits: ["close"],
  8. setup(props, { emit }) {
  9. const apiUrls = {
  10. 'dev': 'https://dev.kt.colexiu.com',
  11. 'test': 'https://test.lexiaoya.cn',
  12. 'online': 'https://kt.colexiu.com',
  13. }
  14. let environment: 'dev' | 'test' | 'test2' | 'online' = location.origin.includes('//dev') ? 'dev' : location.origin.includes('//test') ? 'test' : (location.origin.includes('//online') || location.origin.includes('//kt') || location.origin.includes('//mec')) ? 'online' : 'dev'
  15. const origin = /(localhost|192)/.test(location.host) ? "https://test.lexiaoya.cn" : apiUrls[environment];
  16. return () => (
  17. <>
  18. <img class={styles.closeBtn} src={iconBack} onClick={() => emit("close")} />
  19. <div class={styles.container}>
  20. <Tabs swipeable animated>
  21. <Tab name="投屏" title="投屏">
  22. <iframe src={`${origin}/classroom-app/#/guide`} />
  23. </Tab>
  24. <Tab name="帮助" title="帮助">
  25. <iframe src={`${origin}/classroom-app/#/help-center?platformType=ANALYSIS`} />
  26. </Tab>
  27. </Tabs>
  28. </div>
  29. </>
  30. );
  31. },
  32. });