index.tsx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import ColHeader from '@/components/col-header'
  2. import styles from './index.module.less'
  3. import { defineComponent } from 'vue'
  4. // 预览协议 - 原生实名认证使用
  5. export default defineComponent({
  6. name: 'preview-protocol',
  7. data() {
  8. console.log(this.$route.query)
  9. return {
  10. protocolUrl: '' as any,
  11. title: this.$route.query.type === 'music' ? '曲谱排版规范' : '常见问题'
  12. }
  13. },
  14. async mounted() {
  15. const type = this.$route.query.type
  16. if (type === 'question') {
  17. this.protocolUrl = `${location.origin}/teacher/muic-standard/question.html`
  18. } else if (type === 'music') {
  19. this.protocolUrl = `${location.origin}/teacher/muic-standard/index.html`
  20. this.title = '曲谱排版规范'
  21. } else {
  22. this.protocolUrl = `${location.origin}/teacher/muic-standard/index.html`
  23. }
  24. },
  25. render() {
  26. return (
  27. <div id="mProtocol" class={styles.mProtocol}>
  28. <ColHeader title={this.title} />
  29. <iframe
  30. id="staffIframeRef"
  31. // style={{
  32. // opacity: loading.value ? 0 : 1
  33. // }}
  34. src={this.protocolUrl}
  35. ></iframe>
  36. </div>
  37. )
  38. }
  39. })