|
|
@@ -1,6 +1,7 @@
|
|
|
import OEmpty from '@/components/o-empty'
|
|
|
import { postMessage } from '@/helpers/native-message'
|
|
|
import request from '@/helpers/request'
|
|
|
+import { browser } from '@/helpers/utils'
|
|
|
import { state } from '@/state'
|
|
|
import {
|
|
|
Cell,
|
|
|
@@ -15,7 +16,7 @@ import {
|
|
|
Sticky
|
|
|
} from 'vant'
|
|
|
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 styles from './index.module.less'
|
|
|
|
|
|
@@ -29,6 +30,7 @@ export default defineComponent({
|
|
|
},
|
|
|
setup(props, ctx) {
|
|
|
const route = useRoute()
|
|
|
+ const router = useRouter()
|
|
|
const imgDefault = getImage('icon-music.svg')
|
|
|
const data = reactive({
|
|
|
loading: true,
|
|
|
@@ -87,7 +89,7 @@ export default defineComponent({
|
|
|
const res: any = await request.post(state.platformApi + '/musicSheet/page', {
|
|
|
data: {
|
|
|
...data.pagenation,
|
|
|
- keyword: data.keyword,
|
|
|
+ keyword: data.keyword
|
|
|
// musicTag: data.value2 || data.value1
|
|
|
}
|
|
|
})
|
|
|
@@ -197,6 +199,33 @@ export default defineComponent({
|
|
|
</Search>
|
|
|
</div>
|
|
|
</Sticky>
|
|
|
+ <Cell
|
|
|
+ center
|
|
|
+ title="无别(【冥加】会员,测试"
|
|
|
+ isLink
|
|
|
+ onClick={() => {
|
|
|
+ const origin = /(localhost|192)/.test(location.host)
|
|
|
+ ? 'http://192.168.3.114:3000'
|
|
|
+ : location.origin
|
|
|
+ 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>
|
|
|
<PullRefresh v-model:modelValue={data.refreshing} onRefresh={onRefresh}>
|
|
|
<List
|
|
|
immediateCheck={false}
|
|
|
@@ -210,12 +239,7 @@ export default defineComponent({
|
|
|
<CellGroup inset>
|
|
|
{data.list.map((item: any) => {
|
|
|
return (
|
|
|
- <Cell
|
|
|
- center
|
|
|
- title={item.musicSheetName}
|
|
|
- isLink
|
|
|
- onClick={() => openView(item)}
|
|
|
- >
|
|
|
+ <Cell center title={item.musicSheetName} isLink onClick={() => openView(item)}>
|
|
|
{{
|
|
|
icon: () => (
|
|
|
<Icon style={{ marginRight: '12px' }} size={40} name={imgDefault} />
|
|
|
@@ -227,6 +251,7 @@ export default defineComponent({
|
|
|
</CellGroup>
|
|
|
</List>
|
|
|
</PullRefresh>
|
|
|
+
|
|
|
{!data.loading && !data.list.length && <OEmpty tips="空空如也" />}
|
|
|
</div>
|
|
|
)
|