|
@@ -22,6 +22,8 @@ import MusicType from "./music-type";
|
|
|
import ModeTypeMode from "../component/mode-type-mode";
|
|
|
import { getQuery } from "/src/utils/queryString";
|
|
|
import { storeData } from "/src/store";
|
|
|
+import TeacherTop from "../custom-plugins/guide-page/teacher-top";
|
|
|
+import StudentTop from '../custom-plugins/guide-page/student-top'
|
|
|
|
|
|
/** 头部数据和方法 */
|
|
|
export const headTopData = reactive({
|
|
@@ -60,6 +62,9 @@ export default defineComponent({
|
|
|
name: "header-top",
|
|
|
emits: ["close"],
|
|
|
setup(props, { emit }) {
|
|
|
+ // 是否显示引导
|
|
|
+ const showGuide = ref(false)
|
|
|
+ const showStudentGuide = ref(false)
|
|
|
/** 设置按钮 */
|
|
|
const settingBtn = computed(() => {
|
|
|
// 音频播放中 禁用
|
|
@@ -208,6 +213,17 @@ export default defineComponent({
|
|
|
};
|
|
|
});
|
|
|
|
|
|
+ const isAllBtns = computed(()=>{
|
|
|
+ const flag = converBtn.value.display&&speedBtn.value.display&&selectBtn.value.display&&originBtn.value.display&&toggleBtn.value.display&&showGuide.value
|
|
|
+ console.log(flag,'flag',converBtn.value.display,speedBtn.value.display,selectBtn.value.display,originBtn.value.display,toggleBtn.value.display,showGuide.value)
|
|
|
+ return flag
|
|
|
+ })
|
|
|
+
|
|
|
+ const isAllBtnsStudent =computed(()=>{
|
|
|
+ const flag = converBtn.value.display&&speedBtn.value.display&&selectBtn.value.display&&originBtn.value.display&&toggleBtn.value.display&&showStudentGuide.value
|
|
|
+
|
|
|
+ return flag
|
|
|
+ })
|
|
|
/** 返回 */
|
|
|
const handleBack = () => {
|
|
|
emit("close");
|
|
@@ -251,6 +267,11 @@ export default defineComponent({
|
|
|
onMounted(() => {
|
|
|
getQueryModelSetModelType();
|
|
|
window.addEventListener("message", changePlay);
|
|
|
+ if (state.platform === IPlatform.PC) {
|
|
|
+ showGuide.value = true
|
|
|
+ }else{
|
|
|
+ showStudentGuide.value = true
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
onUnmounted(() => {
|
|
@@ -259,6 +280,8 @@ export default defineComponent({
|
|
|
|
|
|
return () => (
|
|
|
<>
|
|
|
+
|
|
|
+ <div>
|
|
|
<div class={[styles.headerTop]}>
|
|
|
<div class={[styles.back, "headTopBackBtn", !headTopData.showBack && styles.hidenBack]} onClick={handleBack}>
|
|
|
<img src={iconBack} />
|
|
@@ -266,8 +289,9 @@ export default defineComponent({
|
|
|
<Title class="pcTitle" text={state.examSongName} rightView={false} />
|
|
|
|
|
|
<div class={styles.headRight}>
|
|
|
+
|
|
|
<div
|
|
|
- id="tips-step-1"
|
|
|
+ id={state.platform === IPlatform.PC?"teacherTop-0":'studnetT-0'}
|
|
|
style={{ display: toggleBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, toggleBtn.value.disabled && styles.disabled]}
|
|
|
onClick={() => {
|
|
@@ -280,7 +304,8 @@ export default defineComponent({
|
|
|
</div>
|
|
|
|
|
|
<div
|
|
|
- id="tips-step-2"
|
|
|
+ id={state.platform === IPlatform.PC?"teacherTop-1":'studnetT-1'}
|
|
|
+
|
|
|
style={{ display: originBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, originBtn.value.disabled && styles.disabled]}
|
|
|
onClick={() => {
|
|
@@ -300,7 +325,8 @@ export default defineComponent({
|
|
|
<span>{state.playSource === "music" ? "原声" : "伴奏"}</span>
|
|
|
</div>
|
|
|
<div
|
|
|
- id="tips-step-3"
|
|
|
+ id={state.platform === IPlatform.PC?"teacherTop-2":'studnetT-2'}
|
|
|
+
|
|
|
style={{ display: selectBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, selectBtn.value.disabled && styles.disabled]}
|
|
|
onClick={() => handleChangeSection()}
|
|
@@ -323,7 +349,7 @@ export default defineComponent({
|
|
|
<span>选段</span>
|
|
|
</div>
|
|
|
<div
|
|
|
- id="tips-step-4"
|
|
|
+ id={state.platform === IPlatform.PC?"teacherTop-3":'studnetT-3'}
|
|
|
style={{ display: fingeringBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, fingeringBtn.value.disabled && styles.disabled]}
|
|
|
onClick={() => {
|
|
@@ -352,7 +378,7 @@ export default defineComponent({
|
|
|
{{
|
|
|
reference: () => (
|
|
|
<div
|
|
|
- id="tips-step-5"
|
|
|
+ id={state.platform === IPlatform.PC?"teacherTop-4":'studnetT-4'}
|
|
|
style={{ display: speedBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, speedBtn.value.disabled && styles.disabled]}
|
|
|
onClick={(e: Event) => {
|
|
@@ -378,7 +404,7 @@ export default defineComponent({
|
|
|
{{
|
|
|
reference: () => (
|
|
|
<div
|
|
|
- id="tips-step-6"
|
|
|
+ id={state.platform === IPlatform.PC?"teacherTop-5":'studnetT-5'}
|
|
|
style={{ display: converBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, converBtn.value.disabled && styles.disabled]}
|
|
|
onClick={(e: Event) => {
|
|
@@ -386,7 +412,7 @@ export default defineComponent({
|
|
|
headData.musicTypeShow = !headData.musicTypeShow;
|
|
|
}}
|
|
|
>
|
|
|
- <img class={styles.iconBtn} src={headImg("icon_zhuanpu.svg")} />
|
|
|
+ <img class={styles.iconBtn} src={headImg("icon_zhuanpu.svg")} />
|
|
|
<span>{state.musicRenderType === "staff" ? "转简谱" : "转五线谱"}</span>
|
|
|
</div>
|
|
|
),
|
|
@@ -395,7 +421,7 @@ export default defineComponent({
|
|
|
</Popover>
|
|
|
|
|
|
<div
|
|
|
- id="tips-step-7"
|
|
|
+ id={state.platform === IPlatform.PC?"teacherTop-6":'studnetT-6'}
|
|
|
style={{ display: settingBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, settingBtn.value.disabled && styles.disabled]}
|
|
|
onClick={() => (headTopData.settingMode = true)}
|
|
@@ -408,7 +434,7 @@ export default defineComponent({
|
|
|
|
|
|
{/* 播放按钮 */}
|
|
|
<div
|
|
|
- id="tips-step-8"
|
|
|
+ id='studnetT-7'
|
|
|
style={{ display: playBtn.value.display ? "" : "none" }}
|
|
|
class={[
|
|
|
styles.btn,
|
|
@@ -467,6 +493,11 @@ export default defineComponent({
|
|
|
|
|
|
{/* 模式切换 */}
|
|
|
<ModeTypeMode />
|
|
|
+ {/* isAllBtns */}
|
|
|
+ {isAllBtns.value&&<TeacherTop></TeacherTop>}
|
|
|
+ {isAllBtnsStudent.value&&<StudentTop></StudentTop>}
|
|
|
+ </div>
|
|
|
+
|
|
|
</>
|
|
|
);
|
|
|
},
|