|
@@ -17,10 +17,6 @@ import { postMessage } from '/src/helpers/native-message'
|
|
|
import { useOriginSearch } from '../../colexiu/uses'
|
|
|
import { browser } from '/src/helpers/utils'
|
|
|
|
|
|
-const browserInfo = browser()
|
|
|
-
|
|
|
-const search = useOriginSearch()
|
|
|
-
|
|
|
export const active = ref<'pitch' | 'rhythm' | 'completion'>('pitch')
|
|
|
|
|
|
const visible = ref(false)
|
|
@@ -40,6 +36,8 @@ export default defineComponent({
|
|
|
},
|
|
|
emits: ['activeChange'],
|
|
|
setup(props, { emit, expose }) {
|
|
|
+ const browserInfo = browser()
|
|
|
+ const search = useOriginSearch()
|
|
|
const { detail, record } = toRefs(props)
|
|
|
const back = () => {
|
|
|
postMessage({
|
|
@@ -58,29 +56,25 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
const again = () => {
|
|
|
- if (search.source === 'evaluation') {
|
|
|
- back()
|
|
|
- } else {
|
|
|
- const behaviorId = sessionStorage.getItem('behaviorId') || '' + new Date().valueOf()
|
|
|
- const url = qs.stringifyUrl({
|
|
|
- url: location.origin + '/orchestra-music-score',
|
|
|
- query: {
|
|
|
- id: search.id as string,
|
|
|
- behaviorId,
|
|
|
- client: browserInfo.isTeacher ? 'teacher' : 'student',
|
|
|
- },
|
|
|
- })
|
|
|
- postMessage({
|
|
|
- api: 'openAccompanyWebView',
|
|
|
- content: {
|
|
|
- url,
|
|
|
- orientation: 0,
|
|
|
- isHideTitle: true,
|
|
|
- statusBarTextColor: false,
|
|
|
- isOpenLight: true,
|
|
|
- },
|
|
|
- })
|
|
|
- }
|
|
|
+ const behaviorId = sessionStorage.getItem('behaviorId') || '' + new Date().valueOf()
|
|
|
+ const url = qs.stringifyUrl({
|
|
|
+ url: location.origin + '/orchestra-music-score',
|
|
|
+ query: {
|
|
|
+ id: search.id as string,
|
|
|
+ behaviorId,
|
|
|
+ client: browserInfo.isTeacher ? 'teacher' : 'student',
|
|
|
+ },
|
|
|
+ })
|
|
|
+ postMessage({
|
|
|
+ api: 'openAccompanyWebView',
|
|
|
+ content: {
|
|
|
+ url,
|
|
|
+ orientation: 0,
|
|
|
+ isHideTitle: true,
|
|
|
+ statusBarTextColor: false,
|
|
|
+ isOpenLight: true,
|
|
|
+ },
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
expose({
|
|
@@ -148,7 +142,7 @@ export default defineComponent({
|
|
|
</Grid>
|
|
|
) : null}
|
|
|
<Grid columnNum={3} class={styles.btns}>
|
|
|
- {record.value?.videoFilePath && record.value?.expire === 0 && search.source !== 'web' ? (
|
|
|
+ {record.value?.videoFilePath && record.value?.expire === 0 && browserInfo.isStudent ? (
|
|
|
<PlayerPopup {...record.value} btnClass={detailStyles.btn} popupClass={detailStyles.popup}>
|
|
|
<GridItem
|
|
|
vSlots={{
|
|
@@ -165,7 +159,7 @@ export default defineComponent({
|
|
|
text: () => <span>释义</span>,
|
|
|
}}
|
|
|
/>
|
|
|
- {search.source !== 'web' ? (
|
|
|
+ {browserInfo.isStudent ? (
|
|
|
<GridItem
|
|
|
onClick={again}
|
|
|
vSlots={{
|