|  | @@ -2,7 +2,7 @@ import CoursePlanStep from '@/business-components/course-plan-step'
 | 
											
												
													
														|  |  import SectionDetail from '@/business-components/section-detail'
 |  |  import SectionDetail from '@/business-components/section-detail'
 | 
											
												
													
														|  |  import UserDetail from '@/business-components/user-detail'
 |  |  import UserDetail from '@/business-components/user-detail'
 | 
											
												
													
														|  |  import ColSticky from '@/components/col-sticky'
 |  |  import ColSticky from '@/components/col-sticky'
 | 
											
												
													
														|  | -import { postMessage } from '@/helpers/native-message'
 |  | 
 | 
											
												
													
														|  | 
 |  | +import { postMessage, promisefiyPostMessage } from '@/helpers/native-message'
 | 
											
												
													
														|  |  import request from '@/helpers/request'
 |  |  import request from '@/helpers/request'
 | 
											
												
													
														|  |  import { browser } from '@/helpers/utils'
 |  |  import { browser } from '@/helpers/utils'
 | 
											
												
													
														|  |  import { state } from '@/state'
 |  |  import { state } from '@/state'
 | 
											
										
											
												
													
														|  | @@ -77,36 +77,46 @@ export default defineComponent({
 | 
											
												
													
														|  |        return tempArr || []
 |  |        return tempArr || []
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  | -  async mounted() {
 |  | 
 | 
											
												
													
														|  | -    try {
 |  | 
 | 
											
												
													
														|  | -      if (browser().isApp) {
 |  | 
 | 
											
												
													
														|  | -        if (state.platformType === 'STUDENT') {
 |  | 
 | 
											
												
													
														|  | -          // 自动跳转到学生端视频课详情购买页
 |  | 
 | 
											
												
													
														|  | -          // window.location.replace(
 |  | 
 | 
											
												
													
														|  | -          // `${location.origin}/student/#/liveDetail??${qs.stringify(
 |  | 
 | 
											
												
													
														|  | -          //   this.$route.query
 |  | 
 | 
											
												
													
														|  | -          // )}`
 |  | 
 | 
											
												
													
														|  | -          // )
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -          this.locationReplace(
 |  | 
 | 
											
												
													
														|  | 
 |  | +  created() {
 | 
											
												
													
														|  | 
 |  | +    if (browser().isApp) {
 | 
											
												
													
														|  | 
 |  | +      if (state.platformType === 'STUDENT') {
 | 
											
												
													
														|  | 
 |  | +        // 自动跳转到学生端视频课详情购买页
 | 
											
												
													
														|  | 
 |  | +        if (browser().ios) {
 | 
											
												
													
														|  | 
 |  | +          window.location.replace(
 | 
											
												
													
														|  |              `${location.origin}/student/#/liveDetail??${qs.stringify(
 |  |              `${location.origin}/student/#/liveDetail??${qs.stringify(
 | 
											
												
													
														|  |                this.$route.query
 |  |                this.$route.query
 | 
											
												
													
														|  |              )}`
 |  |              )}`
 | 
											
												
													
														|  |            )
 |  |            )
 | 
											
												
													
														|  | -        } else if (state.platformType === 'TEACHER') {
 |  | 
 | 
											
												
													
														|  | -          Dialog.alert({
 |  | 
 | 
											
												
													
														|  | -            title: '提示',
 |  | 
 | 
											
												
													
														|  | -            message: '请使用酷乐秀学生端扫码打开',
 |  | 
 | 
											
												
													
														|  | -            confirmButtonColor: '#2dc7aa'
 |  | 
 | 
											
												
													
														|  | -          }).then(() => {
 |  | 
 | 
											
												
													
														|  | -            postMessage({ api: 'back' })
 |  | 
 | 
											
												
													
														|  | 
 |  | +        } else {
 | 
											
												
													
														|  | 
 |  | +          postMessage({
 | 
											
												
													
														|  | 
 |  | +            api: 'openWebView',
 | 
											
												
													
														|  | 
 |  | +            content: {
 | 
											
												
													
														|  | 
 |  | +              url: `${location.origin}/student/#/liveDetail??${qs.stringify(
 | 
											
												
													
														|  | 
 |  | +                this.$route.query
 | 
											
												
													
														|  | 
 |  | +              )}`,
 | 
											
												
													
														|  | 
 |  | +              orientation: 1,
 | 
											
												
													
														|  | 
 |  | +              isHideTitle: false
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  |            })
 |  |            })
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +          postMessage({ api: 'back' })
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | -      } else {
 |  | 
 | 
											
												
													
														|  | -        // 如果不在app里面则不需要唤起操作
 |  | 
 | 
											
												
													
														|  | -        this.reCall()
 |  | 
 | 
											
												
													
														|  | 
 |  | +      } else if (state.platformType === 'TEACHER') {
 | 
											
												
													
														|  | 
 |  | +        Dialog.alert({
 | 
											
												
													
														|  | 
 |  | +          title: '提示',
 | 
											
												
													
														|  | 
 |  | +          message: '请使用酷乐秀学生端扫码打开',
 | 
											
												
													
														|  | 
 |  | +          confirmButtonColor: '#2dc7aa'
 | 
											
												
													
														|  | 
 |  | +        }).then(() => {
 | 
											
												
													
														|  | 
 |  | +          postMessage({ api: 'back' })
 | 
											
												
													
														|  | 
 |  | +        })
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +    } else {
 | 
											
												
													
														|  | 
 |  | +      // 如果不在app里面则不需要唤起操作
 | 
											
												
													
														|  | 
 |  | +      this.reCall()
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +  },
 | 
											
												
													
														|  | 
 |  | +  async mounted() {
 | 
											
												
													
														|  | 
 |  | +    try {
 | 
											
												
													
														|  |        const res = await request.post('/api-teacher/open/liveShareProfit', {
 |  |        const res = await request.post('/api-teacher/open/liveShareProfit', {
 | 
											
												
													
														|  |          data: {
 |  |          data: {
 | 
											
												
													
														|  |            bizId: this.groupId,
 |  |            bizId: this.groupId,
 | 
											
										
											
												
													
														|  | @@ -120,7 +130,6 @@ export default defineComponent({
 | 
											
												
													
														|  |    },
 |  |    },
 | 
											
												
													
														|  |    methods: {
 |  |    methods: {
 | 
											
												
													
														|  |      locationReplace(url: string) {
 |  |      locationReplace(url: string) {
 | 
											
												
													
														|  | -      // alert(url)
 |  | 
 | 
											
												
													
														|  |        if (history.replaceState) {
 |  |        if (history.replaceState) {
 | 
											
												
													
														|  |          history.replaceState(null, document.title, url)
 |  |          history.replaceState(null, document.title, url)
 | 
											
												
													
														|  |          window.location.reload()
 |  |          window.location.reload()
 |