|
@@ -302,11 +302,15 @@ export default defineComponent({
|
|
|
};
|
|
|
|
|
|
onBeforeMount(async () => {
|
|
|
+ if (browser().isApp) {
|
|
|
+ state.platform = "APP" as IPlatform;
|
|
|
+ } else {
|
|
|
+ state.platform = query.platform?.toLocaleUpperCase() || "";
|
|
|
+ }
|
|
|
+
|
|
|
if (state.platform === IPlatform.PC) {
|
|
|
document.title = "听音练习";
|
|
|
}
|
|
|
-
|
|
|
- state.platform = query.platform?.toLocaleUpperCase() || "";
|
|
|
await getSubjects();
|
|
|
__init();
|
|
|
});
|
|
@@ -352,14 +356,21 @@ export default defineComponent({
|
|
|
emit("close");
|
|
|
return;
|
|
|
} else if (state.platform === IPlatform.PC) {
|
|
|
- // 老师端,首页
|
|
|
- window.parent.postMessage(
|
|
|
- {
|
|
|
- api: "iframe_exit",
|
|
|
- },
|
|
|
- "*"
|
|
|
- );
|
|
|
- return;
|
|
|
+ console.log(1, query);
|
|
|
+ if (query.matchMedia == 1) {
|
|
|
+ // 老师端,首页
|
|
|
+ window.parent.postMessage(
|
|
|
+ {
|
|
|
+ api: "iframe_exit",
|
|
|
+ },
|
|
|
+ "*"
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ window.close();
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
// if (fingerData.fingeringInfo.orientation === 0) {
|
|
|
// api_setRequestedOrientation(1);
|
|
|
// }
|
|
@@ -887,6 +898,8 @@ export default defineComponent({
|
|
|
api_setRequestedOrientation(orientationDirection.value);
|
|
|
// 设置屏幕方向
|
|
|
setTimeout(() => {
|
|
|
+ data.paddingTop = "";
|
|
|
+ data.paddingLeft = "";
|
|
|
__init();
|
|
|
}, 100);
|
|
|
}}
|
|
@@ -994,7 +1007,7 @@ export default defineComponent({
|
|
|
{playAction.userAnswerStatus === 1 && <div class={[styles.tipsT, styles.playSuccess]}></div>}
|
|
|
{playAction.userAnswerStatus === 2 && <div class={[styles.tipsT, styles.playError]}></div>}
|
|
|
|
|
|
- {((data.noteType !== "#c" && orientationDirection.value === 0) || orientationDirection.value === 1) && (
|
|
|
+ {((data.noteType !== "#c" && (orientationDirection.value === 0 || (orientationDirection.value === 1 && state.platform === IPlatform.PC))) || (orientationDirection.value === 1 && state.platform === IPlatform.APP)) && (
|
|
|
<Button class={styles.noteBtn} onClick={() => scrollNoteBox("left")}>
|
|
|
<Icon name="arrow-left" />
|
|
|
</Button>
|
|
@@ -1078,7 +1091,7 @@ export default defineComponent({
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- {((data.noteType !== "#c" && orientationDirection.value === 0) || orientationDirection.value === 1) && (
|
|
|
+ {((data.noteType !== "#c" && (orientationDirection.value === 0 || (orientationDirection.value === 1 && state.platform === IPlatform.PC))) || (orientationDirection.value === 1 && state.platform === IPlatform.APP)) && (
|
|
|
<Button class={styles.noteBtn} onClick={() => scrollNoteBox("right")}>
|
|
|
<Icon name="arrow" />
|
|
|
</Button>
|