|
@@ -6,11 +6,11 @@ import nameImg from "./image/zt.png";
|
|
import lxMode from "./image/lxMode.json";
|
|
import lxMode from "./image/lxMode.json";
|
|
import glMode from "./image/glMode.json";
|
|
import glMode from "./image/glMode.json";
|
|
import pcMode from "./image/pcMode.json";
|
|
import pcMode from "./image/pcMode.json";
|
|
|
|
+import modeTitle from "./image/modeTitle.json";
|
|
import modeVip from "./image/mode_vip.png";
|
|
import modeVip from "./image/mode_vip.png";
|
|
import modesVip from "./image/mode_svip.png";
|
|
import modesVip from "./image/mode_svip.png";
|
|
-import { headTopData } from "./index";
|
|
|
|
|
|
+import { headTopData, checkMusicBuy } from "./index";
|
|
import { getQuery } from "/src/utils/queryString";
|
|
import { getQuery } from "/src/utils/queryString";
|
|
-import { storeData } from "/src/store";
|
|
|
|
import state from "/src/state";
|
|
import state from "/src/state";
|
|
import { studentQueryUserInfo } from "../api";
|
|
import { studentQueryUserInfo } from "../api";
|
|
import { usePageVisibility } from "@vant/use";
|
|
import { usePageVisibility } from "@vant/use";
|
|
@@ -20,6 +20,7 @@ import { Popup } from "vant";
|
|
import AbnormalPop from "/src/view/abnormal-pop";
|
|
import AbnormalPop from "/src/view/abnormal-pop";
|
|
import { smoothAnimationState } from "../view-detail/smoothAnimation";
|
|
import { smoothAnimationState } from "../view-detail/smoothAnimation";
|
|
import { browser } from "/src/utils";
|
|
import { browser } from "/src/utils";
|
|
|
|
+import { stat } from "fs";
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: "modeView",
|
|
name: "modeView",
|
|
@@ -27,6 +28,7 @@ export default defineComponent({
|
|
const modeImgDom1 = ref();
|
|
const modeImgDom1 = ref();
|
|
const modeImgDom2 = ref();
|
|
const modeImgDom2 = ref();
|
|
const modeImgDom3 = ref();
|
|
const modeImgDom3 = ref();
|
|
|
|
+ const modeImgDom4 = ref();
|
|
watch(
|
|
watch(
|
|
() => headTopData.modeType,
|
|
() => headTopData.modeType,
|
|
(value, oldValue) => {
|
|
(value, oldValue) => {
|
|
@@ -37,10 +39,12 @@ export default defineComponent({
|
|
modeImgDom1.value?.pause();
|
|
modeImgDom1.value?.pause();
|
|
modeImgDom2.value?.pause();
|
|
modeImgDom2.value?.pause();
|
|
modeImgDom3.value?.pause();
|
|
modeImgDom3.value?.pause();
|
|
|
|
+ modeImgDom4.value?.stop();
|
|
} else if (value === "init") {
|
|
} else if (value === "init") {
|
|
modeImgDom1.value?.play();
|
|
modeImgDom1.value?.play();
|
|
modeImgDom2.value?.play();
|
|
modeImgDom2.value?.play();
|
|
modeImgDom3.value?.play();
|
|
modeImgDom3.value?.play();
|
|
|
|
+ modeImgDom4.value?.goToAndPlay(0);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
@@ -58,11 +62,13 @@ export default defineComponent({
|
|
const browserInfo = browser();
|
|
const browserInfo = browser();
|
|
const isPad = navigator?.userAgent?.includes("UAWEIVRD-W09") || browserInfo?.iPad || browserInfo.isTablet;
|
|
const isPad = navigator?.userAgent?.includes("UAWEIVRD-W09") || browserInfo?.iPad || browserInfo.isTablet;
|
|
|
|
|
|
|
|
+ // vip图标
|
|
const showVip = computed(() => {
|
|
const showVip = computed(() => {
|
|
- return evaluatingData.tipErjiShow && !state.isLoading && !state.hasDriverPop;
|
|
|
|
|
|
+ return state.vipType === "NOT_VIP" && state.paymentType !== "FREE" && !state.musicBuyInfo.buyed
|
|
});
|
|
});
|
|
|
|
+ // svip图标
|
|
const showsVip = computed(() => {
|
|
const showsVip = computed(() => {
|
|
- return evaluatingData.tipErjiShow && !state.isLoading && !state.hasDriverPop;
|
|
|
|
|
|
+ return !state.vipType?.includes("SVIP") && state.paymentType !== "FREE" && !state.musicBuyInfo.buyed
|
|
});
|
|
});
|
|
|
|
|
|
return () => (
|
|
return () => (
|
|
@@ -83,16 +89,23 @@ export default defineComponent({
|
|
headTopData.modeType = "show";
|
|
headTopData.modeType = "show";
|
|
}}
|
|
}}
|
|
/>
|
|
/>
|
|
- <img src={titmeImg} class={styles.modeTitle} />
|
|
|
|
|
|
+ {/* <img src={titmeImg} class={styles.modeTitle} /> */}
|
|
|
|
+ {
|
|
|
|
+ <Vue3Lottie ref={modeImgDom4} class={styles.modeTitle} animationData={modeTitle} autoPlay={false} loop={false} delay={2000}></Vue3Lottie>
|
|
|
|
+ }
|
|
<div class={[styles.modeBox, ((!state.isPercussion && !state.enableEvaluation) || (state.isPercussion && state.enableEvaluation) || (state.isPercussion && !state.enableEvaluation)) && styles.twoModeBox]}>
|
|
<div class={[styles.modeBox, ((!state.isPercussion && !state.enableEvaluation) || (state.isPercussion && state.enableEvaluation) || (state.isPercussion && !state.enableEvaluation)) && styles.twoModeBox]}>
|
|
<div class={styles.modeItem}>
|
|
<div class={styles.modeItem}>
|
|
<Vue3Lottie ref={modeImgDom1} class={styles.modeImg} animationData={lxMode} autoPlay={false} loop={true} onClick={() => {
|
|
<Vue3Lottie ref={modeImgDom1} class={styles.modeImg} animationData={lxMode} autoPlay={false} loop={true} onClick={() => {
|
|
- if(state.isSingleLine){
|
|
|
|
- smoothAnimationState.isShow.value = state.melodyLine;
|
|
|
|
|
|
+ if (checkMusicBuy(state.musicBuyInfo)) {
|
|
|
|
+ if(state.isSingleLine){
|
|
|
|
+ smoothAnimationState.isShow.value = state.melodyLine;
|
|
|
|
+ }
|
|
|
|
+ headTopData.handleChangeModeType("practise")
|
|
}
|
|
}
|
|
- headTopData.handleChangeModeType("practise")
|
|
|
|
}}></Vue3Lottie>
|
|
}}></Vue3Lottie>
|
|
- {/* <img class={styles.vipIcon} src={modeVip} /> */}
|
|
|
|
|
|
+ {
|
|
|
|
+ showVip.value && <img class={styles.vipIcon} src={modeVip} />
|
|
|
|
+ }
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{/* <img class={styles.modeImg} src={lxImg}
|
|
{/* <img class={styles.modeImg} src={lxImg}
|
|
@@ -104,8 +117,12 @@ export default defineComponent({
|
|
}} /> */}
|
|
}} /> */}
|
|
{!state.isPercussion &&
|
|
{!state.isPercussion &&
|
|
<div class={styles.modeItem}>
|
|
<div class={styles.modeItem}>
|
|
- <Vue3Lottie ref={modeImgDom2} class={styles.modeImg} animationData={glMode} autoPlay={false} loop={true} onClick={() => headTopData.handleChangeModeType("follow")}></Vue3Lottie>
|
|
|
|
- {/* <img class={styles.svipIcon} src={modesVip} /> */}
|
|
|
|
|
|
+ <Vue3Lottie ref={modeImgDom2} class={styles.modeImg} animationData={glMode} autoPlay={false} loop={true} onClick={() => {
|
|
|
|
+ if (checkMusicBuy(state.musicBuyInfo)) {
|
|
|
|
+ headTopData.handleChangeModeType("follow")
|
|
|
|
+ }
|
|
|
|
+ }}></Vue3Lottie>
|
|
|
|
+ { showsVip.value && <img class={styles.svipIcon} src={modesVip} /> }
|
|
</div>
|
|
</div>
|
|
// <img class={styles.modeImg} src={glImg}
|
|
// <img class={styles.modeImg} src={glImg}
|
|
// onClick={() => headTopData.handleChangeModeType("follow")} />
|
|
// onClick={() => headTopData.handleChangeModeType("follow")} />
|
|
@@ -113,11 +130,13 @@ export default defineComponent({
|
|
{state.enableEvaluation &&
|
|
{state.enableEvaluation &&
|
|
<div class={styles.modeItem}>
|
|
<div class={styles.modeItem}>
|
|
<Vue3Lottie ref={modeImgDom3} class={styles.modeImg} animationData={pcMode} autoPlay={false} loop={true} onClick={() => {
|
|
<Vue3Lottie ref={modeImgDom3} class={styles.modeImg} animationData={pcMode} autoPlay={false} loop={true} onClick={() => {
|
|
- // 点击评测模式进入评测模块的需要检测耳机状态,通过返回按钮进入评测模块的,不检测耳机状态
|
|
|
|
- evaluatingData.needCheckErjiStatus = true;
|
|
|
|
- headTopData.handleChangeModeType("evaluating")
|
|
|
|
|
|
+ if (checkMusicBuy(state.musicBuyInfo)) {
|
|
|
|
+ // 点击评测模式进入评测模块的需要检测耳机状态,通过返回按钮进入评测模块的,不检测耳机状态
|
|
|
|
+ evaluatingData.needCheckErjiStatus = true;
|
|
|
|
+ headTopData.handleChangeModeType("evaluating")
|
|
|
|
+ }
|
|
}}></Vue3Lottie>
|
|
}}></Vue3Lottie>
|
|
- {/* <img class={styles.svipIcon} src={modesVip} /> */}
|
|
|
|
|
|
+ { showsVip.value && <img class={styles.svipIcon} src={modesVip} /> }
|
|
</div>
|
|
</div>
|
|
// <img class={styles.modeImg} src={pcImg}
|
|
// <img class={styles.modeImg} src={pcImg}
|
|
// onClick={() => {
|
|
// onClick={() => {
|