Browse Source

🎈 perf: 点击打开详情

wolyshaw 2 years ago
parent
commit
1f798e18aa
1 changed files with 11 additions and 8 deletions
  1. 11 8
      src/student/music/list/index.tsx

+ 11 - 8
src/student/music/list/index.tsx

@@ -7,7 +7,8 @@ import SelectTag from '../search/select-tag'
 import { useRoute, useRouter } from 'vue-router'
 import ColResult from '@/components/col-result'
 import styles from './index.module.less'
-import { musicBuy } from '../music'
+import { postMessage } from '@/helpers/native-message'
+// import { musicBuy } from '../music'
 
 const noop = () => {}
 
@@ -121,13 +122,15 @@ export default defineComponent({
                   data={item}
                   onClick={() => {
                     if (onItemClick === noop) {
-                      musicBuy(item, (path: any) => {
-                        router.push({
-                          path,
-                          query: {
-                            orderType: 'MUSIC'
-                          }
-                        })
+                      postMessage({
+                        api: 'openAccompanyWebView',
+                        content: {
+                          url: location.origin + '/accompany?id=' + item.id,
+                          orientation: 0,
+                          isHideTitle: true,
+                          statusBarTextColor: false,
+                          isOpenLight: true
+                        }
                       })
                     } else {
                       onItemClick(item)