lex 1 سال پیش
والد
کامیت
3d95d752fe

+ 1 - 0
src/views/coursewarePlay/component/video-play.tsx

@@ -335,6 +335,7 @@ export default defineComponent({
         content: {
           url: src,
           orientation: 0,
+          c_orientation: 0,
           isHideTitle: true,
           statusBarTextColor: false,
           isOpenLight: true

+ 17 - 0
src/views/coursewarePlay/index.module.less

@@ -369,4 +369,21 @@
 
 .popupMore {
   background: rgba(0, 0, 0, 0.8);
+}
+
+.goPractice {
+  width: 89px;
+  height: 32px;
+  background: url('./image/btn_go_practice.png') no-repeat center;
+  background-size: contain;
+  position: absolute;
+  right: 12px;
+  bottom: 60px;
+  z-index: 11;
+  transition: all .5s ease;
+
+
+  &.hide {
+    transform: translateX(66px);
+  }
 }

+ 30 - 1
src/views/coursewarePlay/index.tsx

@@ -18,6 +18,7 @@ import request from '@/helpers/request'
 import { state } from '@/state'
 import { useRoute } from 'vue-router'
 import { listenerMessage, postMessage, promisefiyPostMessage } from '@/helpers/native-message'
+import qs from 'query-string'
 import MusicScore from './component/musicScore'
 import iconDian from './image/icon-dian.svg'
 import iconPoint from './image/icon-point.svg'
@@ -1168,7 +1169,35 @@ export default defineComponent({
                         </div>
                       )}
                   </Transition>
-                  {isRender && m.type === 'IMG' && <img src={m.content} />}
+                  {isRender && m.type === 'IMG' && (
+                    <>
+                      <img src={m.content} />
+                      {m.materialMusicId && (
+                        <div
+                          class={[styles.goPractice, activeData.model ? '' : styles.hide]}
+                          onClick={(e: any) => {
+                            // 去云练习完整版
+                            e.stopPropagation()
+                            const parmas = qs.stringify({
+                              id: m.materialMusicId
+                            })
+                            const src = `${location.origin}/orchestra-music-score/?` + parmas
+                            postMessage({
+                              api: 'openAccompanyWebView',
+                              content: {
+                                url: src,
+                                orientation: 0,
+                                c_orientation: 0,
+                                isHideTitle: true,
+                                statusBarTextColor: false,
+                                isOpenLight: true
+                              }
+                            })
+                          }}
+                        ></div>
+                      )}
+                    </>
+                  )}
                   {isRender && m.type === 'SONG' && (
                     <MusicScore
                       activeModel={activeData.model}