|
@@ -1,6 +1,7 @@
|
|
import OEmpty from '@/components/o-empty'
|
|
import OEmpty from '@/components/o-empty'
|
|
import { postMessage } from '@/helpers/native-message'
|
|
import { postMessage } from '@/helpers/native-message'
|
|
import request from '@/helpers/request'
|
|
import request from '@/helpers/request'
|
|
|
|
+import { browser } from '@/helpers/utils'
|
|
import { state } from '@/state'
|
|
import { state } from '@/state'
|
|
import {
|
|
import {
|
|
Cell,
|
|
Cell,
|
|
@@ -15,7 +16,7 @@ import {
|
|
Sticky
|
|
Sticky
|
|
} from 'vant'
|
|
} from 'vant'
|
|
import { defineComponent, reactive, ref, onMounted, nextTick, computed } from 'vue'
|
|
import { defineComponent, reactive, ref, onMounted, nextTick, computed } from 'vue'
|
|
-import { useRoute } from 'vue-router'
|
|
|
|
|
|
+import { useRoute, useRouter } from 'vue-router'
|
|
import { getImage } from './images'
|
|
import { getImage } from './images'
|
|
import styles from './index.module.less'
|
|
import styles from './index.module.less'
|
|
|
|
|
|
@@ -29,6 +30,7 @@ export default defineComponent({
|
|
},
|
|
},
|
|
setup(props, ctx) {
|
|
setup(props, ctx) {
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
|
|
+ const router = useRouter()
|
|
const imgDefault = getImage('icon-music.svg')
|
|
const imgDefault = getImage('icon-music.svg')
|
|
const data = reactive({
|
|
const data = reactive({
|
|
loading: true,
|
|
loading: true,
|
|
@@ -205,17 +207,23 @@ export default defineComponent({
|
|
const origin = /(localhost|192)/.test(location.host)
|
|
const origin = /(localhost|192)/.test(location.host)
|
|
? 'http://192.168.3.114:3000'
|
|
? 'http://192.168.3.114:3000'
|
|
: location.origin
|
|
: location.origin
|
|
- let src = `${origin}/orchestra-music-score/?id=1603573996544364546&Authorization=${sessionStorage.getItem('Authorization')}`
|
|
|
|
- postMessage({
|
|
|
|
- api: 'openAccompanyWebView',
|
|
|
|
- content: {
|
|
|
|
- url: src,
|
|
|
|
- orientation: 0,
|
|
|
|
- isHideTitle: true,
|
|
|
|
- statusBarTextColor: false,
|
|
|
|
- isOpenLight: true
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ let src = `${origin}/orchestra-music-score/?id=1603573996544364546&Authorization=${sessionStorage.getItem(
|
|
|
|
+ 'Authorization'
|
|
|
|
+ )}`
|
|
|
|
+ if (browser().isApp) {
|
|
|
|
+ postMessage({
|
|
|
|
+ api: 'openAccompanyWebView',
|
|
|
|
+ content: {
|
|
|
|
+ url: src,
|
|
|
|
+ orientation: 0,
|
|
|
|
+ isHideTitle: true,
|
|
|
|
+ statusBarTextColor: false,
|
|
|
|
+ isOpenLight: true
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ location.href = src
|
|
|
|
+ }
|
|
}}
|
|
}}
|
|
></Cell>
|
|
></Cell>
|
|
<PullRefresh v-model:modelValue={data.refreshing} onRefresh={onRefresh}>
|
|
<PullRefresh v-model:modelValue={data.refreshing} onRefresh={onRefresh}>
|