| 
					
				 | 
			
			
				@@ -4,6 +4,8 @@ import qs from 'query-string' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import OEmpty from '@/components/o-empty' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import iconStart from '../image/icon-start.svg' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { postMessage } from '@/helpers/native-message' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { Loading } from 'vant' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { usePageVisibility } from '@vant/use' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   name: 'musicScore', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -18,6 +20,14 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   emits: ['setIframe'], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   setup(props, { emit }) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const isLoading = ref(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const pageVisibility = usePageVisibility() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 页面显示和隐藏 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    watch(pageVisibility, (value) => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if(value == 'hidden'){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        isLoading.value = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const iframeRef = ref() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const renderError = ref(false) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const renderSuccess = ref(false) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -52,6 +62,8 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 去云教练完整版 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     const gotoAccomany = () => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (isLoading.value) return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      isLoading.value = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const parmas = qs.stringify({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         id:  props.music.content, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -92,6 +104,8 @@ export default defineComponent({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               gotoAccomany() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             }}> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               <img src={iconStart} /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              {isLoading.value && <Loading class={styles.loading} color="rgba(63,134,237,1)" size={16} />} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              K 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           </> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         )} 
			 |