|
@@ -8,7 +8,13 @@ import { Badge, Circle, Popover, Popup, showConfirmDialog } from "vant";
|
|
|
import Speed from "./speed";
|
|
|
import { evaluatingData, handleStartEvaluat } from "/src/view/evaluating";
|
|
|
import Settting from "./settting";
|
|
|
-import state, { IPlatform, handleChangeSection, handleResetPlay, handleRessetState, togglePlay } from "/src/state";
|
|
|
+import state, {
|
|
|
+ IPlatform,
|
|
|
+ handleChangeSection,
|
|
|
+ handleResetPlay,
|
|
|
+ handleRessetState,
|
|
|
+ togglePlay,
|
|
|
+} from "/src/state";
|
|
|
import { getAudioCurrentTime } from "/src/view/audio-list";
|
|
|
import { followData, toggleFollow } from "/src/view/follow-practice";
|
|
|
import { api_back } from "/src/helpers/communication";
|
|
@@ -29,13 +35,13 @@ export const headTopData = reactive({
|
|
|
handleChangeModeType(value: "practise" | "follow" | "evaluating") {
|
|
|
if (value === "evaluating") {
|
|
|
// 如果是pc端, 评测模式暂不可用
|
|
|
- if (state.platform === IPlatform.PC){
|
|
|
+ if (state.platform === IPlatform.PC) {
|
|
|
showConfirmDialog({
|
|
|
- title: '温馨提示',
|
|
|
- message: '该功能暂未开发,敬请期待',
|
|
|
+ title: "温馨提示",
|
|
|
+ message: "该功能暂未开发,敬请期待",
|
|
|
showCancelButton: false,
|
|
|
- })
|
|
|
- return
|
|
|
+ });
|
|
|
+ return;
|
|
|
}
|
|
|
handleStartEvaluat();
|
|
|
} else if (value === "follow") {
|
|
@@ -204,9 +210,9 @@ export default defineComponent({
|
|
|
/** 返回 */
|
|
|
const handleBack = () => {
|
|
|
// 不在APP中,
|
|
|
- if (!storeData.isApp){
|
|
|
- window.close()
|
|
|
- return
|
|
|
+ if (!storeData.isApp) {
|
|
|
+ window.close();
|
|
|
+ return;
|
|
|
}
|
|
|
api_back();
|
|
|
};
|
|
@@ -214,6 +220,12 @@ export default defineComponent({
|
|
|
/** 根据参数设置模式 */
|
|
|
const getQueryModelSetModelType = () => {
|
|
|
const query: any = getQuery();
|
|
|
+ /** 作业模式 start, 如果为作业模式不处理,让作业模块处理 */
|
|
|
+ if (query.workRecord) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ console.error("🚀 ~ query.workRecord:", query.workRecord)
|
|
|
+ /** 作业模式 end */
|
|
|
if (query.modelType) {
|
|
|
if (query.modelType === "practise") {
|
|
|
headTopData.handleChangeModeType("practise");
|
|
@@ -248,16 +260,15 @@ export default defineComponent({
|
|
|
<>
|
|
|
<div class={[styles.headerTop]}>
|
|
|
{headTopData.showBack && (
|
|
|
- <div class={[styles.back, 'headTopBackBtn']} onClick={handleBack}>
|
|
|
+ <div class={[styles.back, "headTopBackBtn"]} onClick={handleBack}>
|
|
|
<img src={iconBack} />
|
|
|
</div>
|
|
|
)}
|
|
|
<Title text={state.examSongName} rightView={false} />
|
|
|
|
|
|
- <div
|
|
|
- class={styles.headRight}
|
|
|
- >
|
|
|
+ <div class={styles.headRight}>
|
|
|
<div
|
|
|
+ id="tips-step-1"
|
|
|
style={{ display: toggleBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, toggleBtn.value.disabled && styles.disabled]}
|
|
|
onClick={() => {
|
|
@@ -270,9 +281,9 @@ export default defineComponent({
|
|
|
</div>
|
|
|
|
|
|
<div
|
|
|
+ id="tips-step-2"
|
|
|
style={{ display: originBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, originBtn.value.disabled && styles.disabled]}
|
|
|
- id="tips-step-6"
|
|
|
onClick={() => {
|
|
|
state.playSource = state.playSource === "music" ? "background" : "music";
|
|
|
}}
|
|
@@ -290,9 +301,9 @@ export default defineComponent({
|
|
|
<span>{state.playSource === "music" ? "原声" : "伴奏"}</span>
|
|
|
</div>
|
|
|
<div
|
|
|
+ id="tips-step-3"
|
|
|
style={{ display: selectBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, selectBtn.value.disabled && styles.disabled]}
|
|
|
- id="tips-step-4"
|
|
|
onClick={() => handleChangeSection()}
|
|
|
>
|
|
|
<img
|
|
@@ -313,6 +324,7 @@ export default defineComponent({
|
|
|
<span>选段</span>
|
|
|
</div>
|
|
|
<div
|
|
|
+ id="tips-step-4"
|
|
|
style={{ display: fingeringBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, fingeringBtn.value.disabled && styles.disabled]}
|
|
|
onClick={() => {
|
|
@@ -341,7 +353,7 @@ export default defineComponent({
|
|
|
{{
|
|
|
reference: () => (
|
|
|
<div
|
|
|
- id="tips-step-8"
|
|
|
+ id="tips-step-5"
|
|
|
style={{ display: speedBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, speedBtn.value.disabled && styles.disabled]}
|
|
|
onClick={(e: Event) => {
|
|
@@ -367,6 +379,7 @@ export default defineComponent({
|
|
|
{{
|
|
|
reference: () => (
|
|
|
<div
|
|
|
+ id="tips-step-6"
|
|
|
style={{ display: converBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, converBtn.value.disabled && styles.disabled]}
|
|
|
onClick={(e: Event) => {
|
|
@@ -383,6 +396,7 @@ export default defineComponent({
|
|
|
</Popover>
|
|
|
|
|
|
<div
|
|
|
+ id="tips-step-7"
|
|
|
style={{ display: settingBtn.value.display ? "" : "none" }}
|
|
|
class={[styles.btn, settingBtn.value.disabled && styles.disabled]}
|
|
|
onClick={() => (headTopData.settingMode = true)}
|
|
@@ -395,9 +409,14 @@ export default defineComponent({
|
|
|
|
|
|
{/* 播放按钮 */}
|
|
|
<div
|
|
|
+ id="tips-step-8"
|
|
|
style={{ display: playBtn.value.display ? "" : "none" }}
|
|
|
- class={[styles.btn, styles.playBtn, playBtn.value.disabled && styles.disabled, state.platform === IPlatform.PC && styles.playButton]}
|
|
|
- id="tips-step-5"
|
|
|
+ class={[
|
|
|
+ styles.btn,
|
|
|
+ styles.playBtn,
|
|
|
+ playBtn.value.disabled && styles.disabled,
|
|
|
+ state.platform === IPlatform.PC && styles.playButton,
|
|
|
+ ]}
|
|
|
onClick={() => togglePlay()}
|
|
|
>
|
|
|
<div class={styles.btnWrap}>
|
|
@@ -424,9 +443,14 @@ export default defineComponent({
|
|
|
|
|
|
{/* 重播按钮 */}
|
|
|
<div
|
|
|
+ id="tips-step-9"
|
|
|
style={{ display: resetBtn.value.display ? "" : "none" }}
|
|
|
- class={[styles.btn, styles.resetBtn, resetBtn.value.disabled && styles.disabled, state.platform === IPlatform.PC && styles.pauseButton]}
|
|
|
- id="tips-step-7"
|
|
|
+ class={[
|
|
|
+ styles.btn,
|
|
|
+ styles.resetBtn,
|
|
|
+ resetBtn.value.disabled && styles.disabled,
|
|
|
+ state.platform === IPlatform.PC && styles.pauseButton,
|
|
|
+ ]}
|
|
|
onClick={() => handleResetPlay()}
|
|
|
>
|
|
|
<img class={styles.iconBtn} src={headImg("icon_resetbtn.svg")} />
|