|
@@ -4,7 +4,8 @@ import {
|
|
|
nextTick,
|
|
|
onMounted,
|
|
|
reactive,
|
|
|
- ref
|
|
|
+ ref,
|
|
|
+ watch
|
|
|
} from 'vue';
|
|
|
import styles from './index.module.less';
|
|
|
import MSearch from '@/components/m-search';
|
|
@@ -22,12 +23,17 @@ import icon_down from '@/common/images/icon_down.svg';
|
|
|
import icon_jianpu from '@/common/images/icon_jianpu.svg';
|
|
|
import icon_jianpuActive from '@/common/images/icon_jianpuActive.svg';
|
|
|
import icons from '@/common/images/index.json';
|
|
|
-import { postMessage, promisefiyPostMessage } from '@/helpers/native-message';
|
|
|
+import {
|
|
|
+ listenerMessage,
|
|
|
+ postMessage,
|
|
|
+ promisefiyPostMessage
|
|
|
+} from '@/helpers/native-message';
|
|
|
import { rows } from './data.json';
|
|
|
import html2canvas from 'html2canvas';
|
|
|
import { api_musicSheetCategoriesPage, api_musicSheetPage } from './api';
|
|
|
import { state } from '@/state';
|
|
|
import MEmpty from '@/components/m-empty';
|
|
|
+import { usePageVisibility } from '@vant/use';
|
|
|
export default defineComponent({
|
|
|
name: 'co-ai',
|
|
|
setup() {
|
|
@@ -68,7 +74,7 @@ export default defineComponent({
|
|
|
let src = `${location.origin}/instrument?id=${
|
|
|
data.musics[data.musicIndex]?.id
|
|
|
}`;
|
|
|
- console.log(src)
|
|
|
+ console.log(src);
|
|
|
postMessage({
|
|
|
api: 'openAccompanyWebView',
|
|
|
content: {
|
|
@@ -171,6 +177,10 @@ export default defineComponent({
|
|
|
nextTick(() => {
|
|
|
obv.observe(spinRef.value);
|
|
|
});
|
|
|
+
|
|
|
+ listenerMessage('webViewOnResume', () => {
|
|
|
+ handleReset();
|
|
|
+ });
|
|
|
});
|
|
|
return () => (
|
|
|
<div class={styles.container}>
|