|
@@ -1,7 +1,8 @@
|
|
import { Transition, computed, defineComponent, onMounted, onUnmounted, reactive, ref, watch, toRef } from "vue";
|
|
import { Transition, computed, defineComponent, onMounted, onUnmounted, reactive, ref, watch, toRef } from "vue";
|
|
import styles from "./index.module.less";
|
|
import styles from "./index.module.less";
|
|
|
|
|
|
-import iconBack from "./image/icon-back.svg";
|
|
|
|
|
|
+import iconBack from "./image/icon-back.png";
|
|
|
|
+import iconMode from "./image/mode.png";
|
|
import Title from "./title";
|
|
import Title from "./title";
|
|
import { headImg } from "./image";
|
|
import { headImg } from "./image";
|
|
import { Badge, Circle, Popover, Popup, showConfirmDialog, showToast } from "vant";
|
|
import { Badge, Circle, Popover, Popup, showConfirmDialog, showToast } from "vant";
|
|
@@ -311,12 +312,6 @@ export default defineComponent({
|
|
if (res?.data?.api === "setPlayState") {
|
|
if (res?.data?.api === "setPlayState") {
|
|
togglePlay("paused", "courseware");
|
|
togglePlay("paused", "courseware");
|
|
}
|
|
}
|
|
-
|
|
|
|
- // 菜单状态
|
|
|
|
- if ((state.platform === IPlatform.PC && res?.data?.api) === "attendClassBarStatus") {
|
|
|
|
- // state.attendHideMenu = res?.data?.hideMenu;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// 上课页面,按钮方向
|
|
// 上课页面,按钮方向
|
|
if (res?.data?.api === "imagePos") {
|
|
if (res?.data?.api === "imagePos") {
|
|
if (res?.data.data) {
|
|
if (res?.data.data) {
|
|
@@ -390,7 +385,7 @@ export default defineComponent({
|
|
return () => (
|
|
return () => (
|
|
<>
|
|
<>
|
|
<div
|
|
<div
|
|
- class={[styles.headerTop, state.platform === IPlatform.PC && styles.headRightTop, state.platform === IPlatform.PC && !state.attendHideMenu && styles.headRightTopHide]}
|
|
|
|
|
|
+ class={[styles.headerTop]}
|
|
onClick={(e: Event) => {
|
|
onClick={(e: Event) => {
|
|
e.stopPropagation();
|
|
e.stopPropagation();
|
|
if (state.platform === IPlatform.PC) {
|
|
if (state.platform === IPlatform.PC) {
|
|
@@ -404,32 +399,33 @@ export default defineComponent({
|
|
}
|
|
}
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- <div class={[styles.back, "headTopBackBtn", !headTopData.showBack && styles.hidenBack]} onClick={handleBack}>
|
|
|
|
- <img src={iconBack} />
|
|
|
|
|
|
+ {/* 返回和标题 */}
|
|
|
|
+ <div class={styles.headTopLeftBox}>
|
|
|
|
+ <img src={iconBack} class={['headTopBackBtn', styles.img, !headTopData.showBack && styles.hidenBack]} onClick={handleBack} />
|
|
|
|
+ <div class={styles.title}>{state.examSongName}</div>
|
|
</div>
|
|
</div>
|
|
- {query.iscurseplay === "play" || state.platform === IPlatform.PC ? null : <Title class="pcTitle" text={state.examSongName} rightView={false} />}
|
|
|
|
-
|
|
|
|
|
|
+ {/* 模式切换 */}
|
|
|
|
+ <div
|
|
|
|
+ id={state.platform === IPlatform.PC ? "teacherTop-0" : "studnetT-0"}
|
|
|
|
+ style={{ display: toggleBtn.value.display ? "" : "none" }}
|
|
|
|
+ class={[styles.modeChangeBox, toggleBtn.value.disabled && styles.disabled]}
|
|
|
|
+ onClick={() => {
|
|
|
|
+ handleRessetState();
|
|
|
|
+ headTopData.modeType = "init";
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ <img class={styles.img} src={iconMode} />
|
|
|
|
+ <div class={styles.title}>{state.modeType==="practise" ? '练习模式' : state.modeType==="follow" ? "跟练模式" : state.modeType==="evaluating" ? "评测模式" : ""}</div>
|
|
|
|
+ </div>
|
|
|
|
+ {/* 功能按钮 */}
|
|
<div
|
|
<div
|
|
- class={[styles.headRight, state.platform === IPlatform.PC && styles.pcHeadRight]}
|
|
|
|
|
|
+ class={[styles.headRight]}
|
|
onClick={(e: Event) => {
|
|
onClick={(e: Event) => {
|
|
e.stopPropagation();
|
|
e.stopPropagation();
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- <div
|
|
|
|
- id={state.platform === IPlatform.PC ? "teacherTop-0" : "studnetT-0"}
|
|
|
|
- style={{ display: toggleBtn.value.display ? "" : "none" }}
|
|
|
|
- class={[styles.btn, toggleBtn.value.disabled && styles.disabled]}
|
|
|
|
- onClick={() => {
|
|
|
|
- handleRessetState();
|
|
|
|
- headTopData.modeType = "init";
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- <img class={styles.iconBtn} src={headImg(`modeType.svg`)} />
|
|
|
|
- <span>模式</span>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
{/* 一行谱模式,暂不支持节拍指针 */}
|
|
{/* 一行谱模式,暂不支持节拍指针 */}
|
|
- {!state.isSingleLine ? (
|
|
|
|
|
|
+ {/* {!state.isSingleLine ? (
|
|
<div
|
|
<div
|
|
class={[styles.btn, state.platform === IPlatform.PC ? styles.pcBtn : ""]}
|
|
class={[styles.btn, state.platform === IPlatform.PC ? styles.pcBtn : ""]}
|
|
onClick={() => {
|
|
onClick={() => {
|
|
@@ -454,19 +450,17 @@ export default defineComponent({
|
|
)}
|
|
)}
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
- ) : null}
|
|
|
|
-
|
|
|
|
- {state.musicRendered && !query.lessonTrainingId && !query.questionId && state.isConcert && (
|
|
|
|
- <div
|
|
|
|
- class={[styles.btn, state.playState === "play" && fingeringBtn.value.disabled && styles.disabled]}
|
|
|
|
- onClick={() => {
|
|
|
|
- toggleMusicSheet.toggle(true);
|
|
|
|
- }}
|
|
|
|
- >
|
|
|
|
- <img class={styles.iconBtn} src={headImg(`shenggui.svg`)} />
|
|
|
|
- <span>声轨</span>
|
|
|
|
- </div>
|
|
|
|
- )}
|
|
|
|
|
|
+ ) : null} */}
|
|
|
|
+ <div
|
|
|
|
+ class={[styles.btn]}
|
|
|
|
+ onClick={() => {
|
|
|
|
+ state.playType = state.playType === "perform" ? "sing" : "perform";
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ <img style={{ display: state.playType === "perform" ? "" : "none" }} class={styles.iconBtn} src={headImg(`perform.png`)} />
|
|
|
|
+ <img style={{ display: state.playType === "perform" ? "none" : "" }} class={styles.iconBtn} src={headImg(`sing.png`)} />
|
|
|
|
+ <span>{state.playType === "perform" ? "演奏" : "演唱"}</span>
|
|
|
|
+ </div>
|
|
<div
|
|
<div
|
|
id={state.platform === IPlatform.PC ? "teacherTop-1" : "studnetT-1"}
|
|
id={state.platform === IPlatform.PC ? "teacherTop-1" : "studnetT-1"}
|
|
style={{ display: originBtn.value.display ? "" : "none" }}
|
|
style={{ display: originBtn.value.display ? "" : "none" }}
|
|
@@ -475,10 +469,16 @@ export default defineComponent({
|
|
state.playSource = state.playSource === "music" ? "background" : "music";
|
|
state.playSource = state.playSource === "music" ? "background" : "music";
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- <img style={{ display: state.playSource === "music" ? "" : "none" }} class={styles.iconBtn} src={headImg(`music.svg`)} />
|
|
|
|
- <img style={{ display: state.playSource === "music" ? "none" : "" }} class={styles.iconBtn} src={headImg(`background.svg`)} />
|
|
|
|
|
|
+ <img style={{ display: state.playSource === "music" ? "" : "none" }} class={styles.iconBtn} src={headImg(`music.png`)} />
|
|
|
|
+ <img style={{ display: state.playSource === "music" ? "none" : "" }} class={styles.iconBtn} src={headImg(`background.png`)} />
|
|
<span>{state.playSource === "music" ? "原声" : "伴奏"}</span>
|
|
<span>{state.playSource === "music" ? "原声" : "伴奏"}</span>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div 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()}>
|
|
|
|
+ <img style={{ display: state.section.length === 0 ? "" : "none" }} class={styles.iconBtn} src={headImg(`section0.png`)} />
|
|
|
|
+ <img style={{ display: state.section.length === 1 ? "" : "none" }} class={styles.iconBtn} src={headImg(`section1.png`)} />
|
|
|
|
+ <img style={{ display: state.section.length === 2 ? "" : "none" }} class={styles.iconBtn} src={headImg(`section2.png`)} />
|
|
|
|
+ <span>选段</span>
|
|
|
|
+ </div>
|
|
{state.modeType !== "evaluating" && (
|
|
{state.modeType !== "evaluating" && (
|
|
<div
|
|
<div
|
|
class={[styles.btn]}
|
|
class={[styles.btn]}
|
|
@@ -487,18 +487,12 @@ export default defineComponent({
|
|
metronomeData.metro?.initPlayer();
|
|
metronomeData.metro?.initPlayer();
|
|
}}
|
|
}}
|
|
>
|
|
>
|
|
- <img style={{ display: metronomeData.disable ? "block" : "none" }} class={styles.iconBtn} src={headImg("tickoff.svg")} />
|
|
|
|
- <img style={{ display: !metronomeData.disable ? "block" : "none" }} class={styles.iconBtn} src={headImg("tickon.svg")} />
|
|
|
|
|
|
+ <img style={{ display: metronomeData.disable ? "block" : "none" }} class={styles.iconBtn} src={headImg("tickon.png")} />
|
|
|
|
+ <img style={{ display: !metronomeData.disable ? "block" : "none" }} class={styles.iconBtn} src={headImg("tickoff.png")} />
|
|
<span style={{ whiteSpace: "nowrap" }}>节拍器</span>
|
|
<span style={{ whiteSpace: "nowrap" }}>节拍器</span>
|
|
</div>
|
|
</div>
|
|
)}
|
|
)}
|
|
- <div 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()}>
|
|
|
|
- <img style={{ display: state.section.length === 0 ? "" : "none" }} class={styles.iconBtn} src={headImg(`section0.svg`)} />
|
|
|
|
- <img style={{ display: state.section.length === 1 ? "" : "none" }} class={styles.iconBtn} src={headImg(`section1.svg`)} />
|
|
|
|
- <img style={{ display: state.section.length === 2 ? "" : "none" }} class={styles.iconBtn} src={headImg(`section2.svg`)} />
|
|
|
|
- <span>选段</span>
|
|
|
|
- </div>
|
|
|
|
- <div
|
|
|
|
|
|
+ {/* <div
|
|
id={state.platform === IPlatform.PC ? "teacherTop-3" : "studnetT-3"}
|
|
id={state.platform === IPlatform.PC ? "teacherTop-3" : "studnetT-3"}
|
|
style={{ display: fingeringBtn.value.display ? "" : "none" }}
|
|
style={{ display: fingeringBtn.value.display ? "" : "none" }}
|
|
class={[styles.btn, fingeringBtn.value.disabled && styles.disabled]}
|
|
class={[styles.btn, fingeringBtn.value.disabled && styles.disabled]}
|
|
@@ -509,9 +503,9 @@ export default defineComponent({
|
|
<img style={{ display: state.setting.displayFingering ? "" : "none" }} class={styles.iconBtn} src={headImg(`icon_evaluatingOn.svg`)} />
|
|
<img style={{ display: state.setting.displayFingering ? "" : "none" }} class={styles.iconBtn} src={headImg(`icon_evaluatingOn.svg`)} />
|
|
<img style={{ display: state.setting.displayFingering ? "none" : "" }} class={styles.iconBtn} src={headImg(`icon_evaluatingOff.svg`)} />
|
|
<img style={{ display: state.setting.displayFingering ? "none" : "" }} class={styles.iconBtn} src={headImg(`icon_evaluatingOff.svg`)} />
|
|
<span>指法</span>
|
|
<span>指法</span>
|
|
- </div>
|
|
|
|
|
|
+ </div> */}
|
|
|
|
|
|
- <Popover trigger="manual" v-model:show={headData.speedShow} placement={state.platform === IPlatform.PC ? "top" : "bottom"} overlay={false} offset={state.platform === IPlatform.PC ? [8, 40] : [0, 8]}>
|
|
|
|
|
|
+ {/* <Popover trigger="manual" v-model:show={headData.speedShow} placement={state.platform === IPlatform.PC ? "top" : "bottom"} overlay={false} offset={state.platform === IPlatform.PC ? [8, 40] : [0, 8]}>
|
|
{{
|
|
{{
|
|
reference: () => (
|
|
reference: () => (
|
|
<div
|
|
<div
|
|
@@ -531,8 +525,8 @@ export default defineComponent({
|
|
),
|
|
),
|
|
default: () => <Speed />,
|
|
default: () => <Speed />,
|
|
}}
|
|
}}
|
|
- </Popover>
|
|
|
|
- {state.enableNotation ? (
|
|
|
|
|
|
+ </Popover> */}
|
|
|
|
+ {/* {state.enableNotation ? (
|
|
<Popover trigger="manual" v-model:show={headData.musicTypeShow} class={state.platform === IPlatform.PC && styles.pcTransPop} placement={state.platform === IPlatform.PC ? "top-end" : "bottom-end"} overlay={false} offset={state.platform === IPlatform.PC ? [0, 40] : [0, 8]}>
|
|
<Popover trigger="manual" v-model:show={headData.musicTypeShow} class={state.platform === IPlatform.PC && styles.pcTransPop} placement={state.platform === IPlatform.PC ? "top-end" : "bottom-end"} overlay={false} offset={state.platform === IPlatform.PC ? [0, 40] : [0, 8]}>
|
|
{{
|
|
{{
|
|
reference: () => (
|
|
reference: () => (
|
|
@@ -552,9 +546,20 @@ export default defineComponent({
|
|
default: () => <MusicType />,
|
|
default: () => <MusicType />,
|
|
}}
|
|
}}
|
|
</Popover>
|
|
</Popover>
|
|
- ) : null}
|
|
|
|
- <div id={state.platform === IPlatform.PC ? "teacherTop-6" : "studnetT-6"} style={{ display: settingBtn.value.display ? "" : "none" }} class={[styles.btn, styles.setBtn, settingBtn.value.disabled && styles.disabled]} onClick={() => (headTopData.settingMode = true)}>
|
|
|
|
- <img class={styles.iconBtn} src={headImg("icon_menu.svg")} />
|
|
|
|
|
|
+ ) : null} */}
|
|
|
|
+ {state.musicRendered && !query.lessonTrainingId && !query.questionId && state.isConcert && (
|
|
|
|
+ <div
|
|
|
|
+ class={[styles.btn, state.playState === "play" && fingeringBtn.value.disabled && styles.disabled]}
|
|
|
|
+ onClick={() => {
|
|
|
|
+ toggleMusicSheet.toggle(true);
|
|
|
|
+ }}
|
|
|
|
+ >
|
|
|
|
+ <img class={styles.iconBtn} src={headImg(`shenggui.png`)} />
|
|
|
|
+ <span>声轨</span>
|
|
|
|
+ </div>
|
|
|
|
+ )}
|
|
|
|
+ <div 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)}>
|
|
|
|
+ <img class={styles.iconBtn} src={headImg("icon_menu.png")} />
|
|
<span>设置</span>
|
|
<span>设置</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -565,18 +570,16 @@ export default defineComponent({
|
|
id="studnetT-7"
|
|
id="studnetT-7"
|
|
style={{ display: playBtn.value.display ? "" : "none" }}
|
|
style={{ display: playBtn.value.display ? "" : "none" }}
|
|
class={[
|
|
class={[
|
|
- styles.btn,
|
|
|
|
styles.playBtn,
|
|
styles.playBtn,
|
|
playBtn.value.disabled && styles.disabled,
|
|
playBtn.value.disabled && styles.disabled,
|
|
state.platform === IPlatform.PC && state.musicScoreBtnDirection === "left" ? styles.playLeftButton : state.platform === IPlatform.PC && state.musicScoreBtnDirection === "right" ? styles.playRightButton : "",
|
|
state.platform === IPlatform.PC && state.musicScoreBtnDirection === "left" ? styles.playLeftButton : state.platform === IPlatform.PC && state.musicScoreBtnDirection === "right" ? styles.playRightButton : "",
|
|
- state.platform === IPlatform.PC && !state.attendHideMenu && styles.playButtonHide,
|
|
|
|
]}
|
|
]}
|
|
onClick={() => togglePlay()}
|
|
onClick={() => togglePlay()}
|
|
>
|
|
>
|
|
<div class={styles.btnWrap}>
|
|
<div class={styles.btnWrap}>
|
|
- <img style={{ display: state.playState === "play" ? "none" : "" }} class={styles.iconBtn} src={headImg(state.platform === IPlatform.PC ? "pc_icon_playbtn.png" : "icon_play.svg")} />
|
|
|
|
- <img style={{ display: state.playState === "play" ? "" : "none" }} class={styles.iconBtn} src={headImg(state.platform === IPlatform.PC ? "pc_icon_pausebtn.png" : "icon_pause.svg")} />
|
|
|
|
- <Circle style={{ opacity: state.playState === "play" ? 1 : 0 }} class={styles.progress} stroke-width={80} currentRate={state.playProgress} rate={100} color="#FFC830" />
|
|
|
|
|
|
+ <img style={{ display: state.playState === "play" ? "none" : "" }} class={styles.iconBtn} src={headImg("icon_play.png")} />
|
|
|
|
+ <img style={{ display: state.playState === "play" ? "" : "none" }} class={styles.iconBtn} src={headImg("icon_pause.png")} />
|
|
|
|
+ <Circle style={{ opacity: state.playState === "play" ? 1 : 0 }} class={styles.progress} stroke-width={80} currentRate={state.playProgress} rate={100} color="#FFED78" layer-color="rgba(0,0,0,0)" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -585,15 +588,13 @@ export default defineComponent({
|
|
id="tips-step-9"
|
|
id="tips-step-9"
|
|
style={{ display: resetBtn.value.display ? "" : "none" }}
|
|
style={{ display: resetBtn.value.display ? "" : "none" }}
|
|
class={[
|
|
class={[
|
|
- styles.btn,
|
|
|
|
styles.resetBtn,
|
|
styles.resetBtn,
|
|
resetBtn.value.disabled && styles.disabled,
|
|
resetBtn.value.disabled && styles.disabled,
|
|
state.platform === IPlatform.PC && state.musicScoreBtnDirection === "left" ? styles.pauseLeftButton : state.platform === IPlatform.PC && state.musicScoreBtnDirection === "right" ? styles.pauseRightButton : "",
|
|
state.platform === IPlatform.PC && state.musicScoreBtnDirection === "left" ? styles.pauseLeftButton : state.platform === IPlatform.PC && state.musicScoreBtnDirection === "right" ? styles.pauseRightButton : "",
|
|
- state.platform === IPlatform.PC && !state.attendHideMenu && styles.playButtonHide,
|
|
|
|
]}
|
|
]}
|
|
onClick={() => handleResetPlay()}
|
|
onClick={() => handleResetPlay()}
|
|
>
|
|
>
|
|
- <img class={styles.iconBtn} src={headImg(state.platform === IPlatform.PC ? "pc_icon_resetbtn.png" : "icon_resetbtn.svg")} />
|
|
|
|
|
|
+ <img class={styles.iconBtn} src={headImg("icon_reset.png")} />
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<Popup v-model:show={headTopData.settingMode} class="popup-custom van-scale center-closeBtn settingBoxClass_drag" transition="van-scale" teleport="body" closeable style={positionInfo.styleDrag.value}>
|
|
<Popup v-model:show={headTopData.settingMode} class="popup-custom van-scale center-closeBtn settingBoxClass_drag" transition="van-scale" teleport="body" closeable style={positionInfo.styleDrag.value}>
|
|
@@ -604,14 +605,6 @@ export default defineComponent({
|
|
{/* 模式切换 */}
|
|
{/* 模式切换 */}
|
|
<ModeTypeMode />
|
|
<ModeTypeMode />
|
|
|
|
|
|
- {/* // 从课堂乐器学生端课件预览默认不显示会员
|
|
|
|
- if (storeData.user.vipMember || state.paymentType === "FREE" || query.showCourseMember === "true") {
|
|
|
|
- // 学生端
|
|
|
|
- data.showStudent = true;
|
|
|
|
- } else {
|
|
|
|
- // vip
|
|
|
|
- data.showVip = true;
|
|
|
|
- } */}
|
|
|
|
{/* isAllBtns */}
|
|
{/* isAllBtns */}
|
|
{isAllBtns.value && !query.isCbs && showGuideIndex.value && <TeacherTop></TeacherTop>}
|
|
{isAllBtns.value && !query.isCbs && showGuideIndex.value && <TeacherTop></TeacherTop>}
|
|
{isAllBtnsStudent.value && !query.isCbs && showGuideIndex.value && <StudentTop></StudentTop>}
|
|
{isAllBtnsStudent.value && !query.isCbs && showGuideIndex.value && <StudentTop></StudentTop>}
|