Ver Fonte

修改显示

lex há 1 ano atrás
pai
commit
db26d9ad70
1 ficheiros alterados com 21 adições e 11 exclusões
  1. 21 11
      src/views/accompany/music-list.tsx

+ 21 - 11
src/views/accompany/music-list.tsx

@@ -24,6 +24,7 @@ import OSticky from '@/components/o-sticky'
 import OSearch from '@/components/o-search'
 import OHeader from '@/components/o-header'
 import { getInstrumentName } from '@/constant/instruments'
+import { browser } from '@/helpers/utils'
 
 export default defineComponent({
   name: 'accompany-music-list',
@@ -338,17 +339,26 @@ export default defineComponent({
                     title={item.musicSheetName}
                     isLink
                     onClick={() => {
-                      // if (item.musicSheetType == 'CONCERT') {
-                      //   openMutilPart(item)
-                      //   return
-                      // }
-                      // openView(item)
-                      router.push({
-                        path: '/musicDetail',
-                        query: {
-                          id: item.id
-                        }
-                      })
+                      if (browser().isApp) {
+                        const url = `${location.origin}${location.pathname}#/musicDetail?id=${item.id}`
+                        postMessage({
+                          api: 'openWebView',
+                          content: {
+                            url,
+                            orientation: 1,
+                            isHideTitle: true,
+                            statusBarTextColor: false,
+                            isOpenLight: false
+                          }
+                        })
+                      } else {
+                        router.push({
+                          path: '/musicDetail',
+                          query: {
+                            id: item.id
+                          }
+                        })
+                      }
                     }}
                   >
                     {{