index.tsx 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054
  1. import { Transition, computed, defineComponent, onMounted, onUnmounted, reactive, ref, watch, toRef, ComputedRef, nextTick, defineAsyncComponent } from "vue";
  2. import styles from "./index.module.less";
  3. import iconBack from "./image/icon-back.png";
  4. import listImg from "./image/list.png";
  5. import iconMode from "./image/mode.png";
  6. import { headImg } from "./image";
  7. import { Badge, Circle, Popover, Popup, showConfirmDialog, showToast, NoticeBar } from "vant";
  8. import Speed from "./speed";
  9. import { evaluatingData, handleStartEvaluat } from "/src/view/evaluating";
  10. import Settting from "./settting";
  11. import state, { IPlatform, handleChangeSection, handleResetPlay, handleRessetState, togglePlay, IPlayState, refreshMusicSvg, EnumMusicRenderType, resetSettings, handleGuide, resetCursorPosition } from "/src/state";
  12. import { getAudioCurrentTime } from "/src/view/audio-list";
  13. import { followData, toggleFollow } from "/src/view/follow-practice";
  14. import { api_back } from "/src/helpers/communication";
  15. import MusicType from "./music-type";
  16. import { getQuery } from "/src/utils/queryString";
  17. import { storeData } from "/src/store";
  18. import TeacherTop from "../custom-plugins/guide-page/teacher-top";
  19. import StudentTop from "../custom-plugins/guide-page/student-top";
  20. import { HANDLE_WORK_ADD } from "../custom-plugins/work-index";
  21. import { browser } from "/src/utils";
  22. import store from "store";
  23. import "../component/the-modal-tip/index.module.less";
  24. import { metronomeData } from "../../helpers/metronome";
  25. import { toggleMusicSheet } from "/src/view/plugins/toggleMusicSheet";
  26. import useDrag from "/src/view/plugins/useDrag/index";
  27. import Dragbom from "/src/view/plugins/useDrag/dragbom";
  28. import { getGuidance, setGuidance } from "../custom-plugins/guide-page/api";
  29. // import ModeView from "./modeView";
  30. import { smoothAnimationState } from "../view-detail/smoothAnimation";
  31. import { isMusicList, musicListShow } from "../component/the-music-list";
  32. import { EvaluatingDriver, FollowDriver, PractiseDriver } from "../custom-plugins/guide-driver";
  33. import { fingerRef } from "/src/page-instrument/view-detail/index"
  34. import { permissionPopup } from "/src/page-instrument/component/vip/permission";
  35. const ModeView = defineAsyncComponent(() =>
  36. import('./modeView')
  37. )
  38. /** 校验是否能切换模式,会员的曲子,酷乐秀跟练模式、评测模式需要svip */
  39. export const checkMusicBuy = (item: any, type?: string) => {
  40. let checked = true;
  41. // 学生端或者老师端需要校验点播和会员曲目
  42. if (state.systemType === "student" || state.systemType === "teacher") {
  43. // 如果是点播的曲子,并且还没有购买,需要弹窗提醒
  44. if (item.paymentType === "CHARGE" && !item.buyed) {
  45. permissionPopup.active = "demand"
  46. permissionPopup.musicId = item.id
  47. permissionPopup.musicPrice = item.musicPrice
  48. permissionPopup.show = true
  49. checked = false
  50. }
  51. /**
  52. * 如果是vip的曲子,当前用户不是会员时,需要弹窗提醒
  53. * 如果是vip的曲子,当前用户不是svip会员,点击跟练或评测时,需要弹窗提醒(会员曲子,跟练和评测需要开通svip会员才能使用)
  54. */
  55. if ( (state.vipType === "NOT_VIP" && item.paymentType !== "FREE") || (!state.vipType.includes("SVIP") && (type === "follow" || type === "evaluating")) ) {
  56. permissionPopup.active = item.paymentType.includes('CHARGE') ? "memberAndDemand" : "member"
  57. permissionPopup.musicId = item.id
  58. permissionPopup.musicPrice = item.musicPrice
  59. permissionPopup.show = true
  60. checked = false
  61. }
  62. }
  63. return checked;
  64. };
  65. /** 头部数据和方法 */
  66. export const headTopData = reactive({
  67. /** 模式 */
  68. modeType: "" as "init" | "show",
  69. /** 显示返回按钮 */
  70. showBack: true,
  71. /** 设置弹窗 */
  72. settingMode: false,
  73. /** 切换模式 */
  74. handleChangeModeType(value: "practise" | "follow" | "evaluating") {
  75. // 后台设置为不能评测
  76. if (value === "evaluating" && !state.enableEvaluation) return;
  77. // 打击乐&节奏练习不支持跟练模式
  78. if (value === "follow" && state.isPercussion) return;
  79. // 跟练模式,光标只有音符模式,无节拍模式
  80. if (value === "follow" && metronomeData.cursorMode === 2) {
  81. metronomeData.cursorMode = 1;
  82. }
  83. if (value === "practise") {
  84. // state.playIngSpeed = state.speed
  85. }
  86. if (value === "evaluating") {
  87. // 如果延迟检测资源还在加载中,给出提示
  88. if (!evaluatingData.jsonLoadDone) {
  89. evaluatingData.jsonLoading = true;
  90. state.audioDone && showToast("资源加载中,请稍后"); //音频资源加载完之后才提示
  91. return;
  92. }
  93. // 如果是pc端, 评测模式暂不可用
  94. if (state.platform === IPlatform.PC) {
  95. showConfirmDialog({
  96. className: "modalTip",
  97. title: "温馨提示",
  98. message: "该功能暂未开放,敬请期待!",
  99. showCancelButton: false,
  100. });
  101. return;
  102. }
  103. // 评测模式,只有一行谱模式
  104. // if (!state.isSingleLine) {
  105. // state.isSingleLine = true;
  106. // refreshMusicSvg();
  107. // }
  108. smoothAnimationState.isShow.value = false; // 隐藏旋律线
  109. state.playIngSpeed = state.originSpeed;
  110. handleStartEvaluat();
  111. resetCursorPosition()
  112. // 开发模式,把此处打开
  113. // state.modeType = "evaluating";
  114. // evaluatingData.rendered = true;
  115. // evaluatingData.soundEffectMode = true;
  116. } else if (value === "follow") {
  117. // 跟练模式,只有一行谱模式
  118. if (!state.isSingleLine) {
  119. state.isSingleLine = true;
  120. refreshMusicSvg();
  121. }
  122. smoothAnimationState.isShow.value = false;
  123. toggleFollow();
  124. }
  125. headTopData.modeType = "show";
  126. },
  127. // 改变模式之前的状态
  128. oldPlayType: "play",
  129. // 记录切换模式前的状态
  130. oldModeType: "practise" as "practise" | "follow" | "evaluating",
  131. });
  132. export const headData = reactive({
  133. speedShow: false,
  134. musicTypeShow: false,
  135. });
  136. let resetBtn: ComputedRef<{
  137. display: boolean;
  138. disabled: boolean;
  139. }>;
  140. // 点击切换的时候才触发提醒
  141. let isClickMode = false;
  142. /**
  143. * 处理模式切换
  144. * @param oldPlayType 没改变之前的播放模式
  145. * @param oldPlaySource 没改变之前的播放类型
  146. * @param isforceReset 是否强制刷新播放状态 模式times时值改变时候也刷新
  147. */
  148. export function handlerModeChange(oldPlayType: "play" | "sing", oldPlaySource: IPlayState, isforceReset?: boolean) {
  149. const isModeChange = modeChangeHandleTimes(oldPlayType, oldPlaySource);
  150. // 没有切换的时候 不处理下面的
  151. if (isModeChange) {
  152. try {
  153. metronomeData.metro.calculation(state.times);
  154. } catch (error) {}
  155. console.log("重新之后的times", state.times, state.fixtime);
  156. }
  157. if (isModeChange || isforceReset) {
  158. // 重置播放状态
  159. handleRessetState();
  160. // 隐藏重播按钮
  161. resetBtn && (resetBtn.value.display = false);
  162. }
  163. // 当模式改变的时候 放在这里是因为需要等谱面加载完成之后再提示(点击按钮模式切换才提示)
  164. if (isClickMode) {
  165. showToast({
  166. message: state.playType === "play" ? "已切换为演奏场景" : "已切换为演唱场景",
  167. position: "top",
  168. className: "selectionToast",
  169. });
  170. isClickMode = false;
  171. }
  172. }
  173. // 模式切换之后重新给times赋值
  174. function modeChangeHandleTimes(oldPlayType: "play" | "sing", oldPlaySource: IPlayState) {
  175. const playType = state.playType;
  176. const playSource = state.playSource;
  177. const { notBeatFixtime, xmlMp3BeatFixTime, difftime } = state.times[0];
  178. const { isOpenMetronome, isSingOpenMetronome } = state;
  179. // 演奏向演唱切
  180. if (oldPlayType === "play" && playType === "sing") {
  181. if (playSource === "mingSong") {
  182. // 唱名文件也要加上弱起时间 他们制作曲子加了弱起时间 注意这修改了之后给总控平台的时值也需要改
  183. state.fixtime = difftime;
  184. state.times.map((item) => {
  185. item.time = item.xmlNoteTime + difftime;
  186. item.endtime = item.xmlNoteEndTime + difftime;
  187. item.fixtime = difftime;
  188. });
  189. return true;
  190. } else {
  191. //演奏开了节拍器,演唱没开节拍器
  192. if (isOpenMetronome && !isSingOpenMetronome) {
  193. state.fixtime = notBeatFixtime;
  194. state.times.map((item) => {
  195. item.time = item.notBeatTime;
  196. item.endtime = item.notBeatEndTime;
  197. item.fixtime = notBeatFixtime;
  198. });
  199. return true;
  200. } else if (!isOpenMetronome && isSingOpenMetronome) {
  201. state.fixtime = notBeatFixtime + xmlMp3BeatFixTime;
  202. state.times.map((item) => {
  203. item.time = item.notBeatTime + xmlMp3BeatFixTime;
  204. item.endtime = item.notBeatEndTime + xmlMp3BeatFixTime;
  205. item.fixtime = notBeatFixtime + xmlMp3BeatFixTime;
  206. });
  207. return true;
  208. }
  209. }
  210. } else if (oldPlayType === "sing" && playType === "play") {
  211. // 演唱向演奏切
  212. if (oldPlaySource === "mingSong") {
  213. // 有节拍器
  214. if (isOpenMetronome) {
  215. state.fixtime = notBeatFixtime + xmlMp3BeatFixTime;
  216. state.times.map((item) => {
  217. item.time = item.notBeatTime + xmlMp3BeatFixTime;
  218. item.endtime = item.notBeatEndTime + xmlMp3BeatFixTime;
  219. item.fixtime = notBeatFixtime + xmlMp3BeatFixTime;
  220. });
  221. return true;
  222. } else {
  223. state.fixtime = notBeatFixtime;
  224. state.times.map((item) => {
  225. item.time = item.notBeatTime;
  226. item.endtime = item.notBeatEndTime;
  227. item.fixtime = notBeatFixtime;
  228. });
  229. return true;
  230. }
  231. }
  232. // 演奏开了节拍器,演唱没开节拍器
  233. if (isOpenMetronome && !isSingOpenMetronome) {
  234. state.fixtime = notBeatFixtime + xmlMp3BeatFixTime;
  235. state.times.map((item) => {
  236. item.time = item.notBeatTime + xmlMp3BeatFixTime;
  237. item.endtime = item.notBeatEndTime + xmlMp3BeatFixTime;
  238. item.fixtime = notBeatFixtime + xmlMp3BeatFixTime;
  239. });
  240. return true;
  241. } else if (!isOpenMetronome && isSingOpenMetronome) {
  242. state.fixtime = notBeatFixtime;
  243. state.times.map((item) => {
  244. item.time = item.notBeatTime;
  245. item.endtime = item.notBeatEndTime;
  246. item.fixtime = notBeatFixtime;
  247. });
  248. return true;
  249. }
  250. } else if (oldPlayType === "sing" && playType === "sing") {
  251. // 演唱之间切换
  252. // 切到唱名时候
  253. if (playSource === "mingSong") {
  254. // 唱名文件也要加上弱起时间 他们制作曲子加了弱起时间 注意这修改了之后给总控平台的时值也需要改
  255. state.fixtime = difftime;
  256. state.times.map((item) => {
  257. item.time = item.xmlNoteTime + difftime;
  258. item.endtime = item.xmlNoteEndTime + difftime;
  259. item.fixtime = difftime;
  260. });
  261. return true;
  262. } else if (oldPlaySource === "mingSong") {
  263. // 有节拍器
  264. if (isSingOpenMetronome) {
  265. state.fixtime = notBeatFixtime + xmlMp3BeatFixTime;
  266. state.times.map((item) => {
  267. item.time = item.notBeatTime + xmlMp3BeatFixTime;
  268. item.endtime = item.notBeatEndTime + xmlMp3BeatFixTime;
  269. item.fixtime = notBeatFixtime + xmlMp3BeatFixTime;
  270. });
  271. return true;
  272. } else {
  273. state.fixtime = notBeatFixtime;
  274. state.times.map((item) => {
  275. item.time = item.notBeatTime;
  276. item.endtime = item.notBeatEndTime;
  277. item.fixtime = notBeatFixtime;
  278. });
  279. return true;
  280. }
  281. }
  282. }
  283. return false;
  284. }
  285. export default defineComponent({
  286. name: "header-top",
  287. emits: ["close"],
  288. setup(props, { emit }) {
  289. const query = getQuery();
  290. // 是否显示引导
  291. const showGuide = ref(false);
  292. const showStudentGuide = ref(false);
  293. const showWebGuide = ref(true);
  294. let displayFingeringCache = false; // 指法缓存
  295. /** 设置按钮 */
  296. const settingBtn = computed(() => {
  297. // 音频播放中 禁用
  298. if (state.playState === "play") return { display: true, disabled: true };
  299. // 评测开始 禁用, 跟练开始 禁用
  300. if (evaluatingData.startBegin || followData.start) return { display: true, disabled: true };
  301. return {
  302. display: true,
  303. disabled: false,
  304. };
  305. });
  306. /** 转谱按钮 */
  307. const converBtn = computed(() => {
  308. // 音频播放中 禁用
  309. if (state.playState === "play") return { display: true, disabled: true };
  310. // 评测开始 禁用
  311. if (evaluatingData.startBegin || followData.start) return { display: true, disabled: true };
  312. return {
  313. disabled: false,
  314. display: true,
  315. };
  316. });
  317. /** 速度按钮 */
  318. const speedBtn = computed(() => {
  319. // 选择模式, 跟练模式 不显示
  320. //if (headTopData.modeType !== "show" || state.modeType === "follow") return { display: false, disabled: true };
  321. if (state.modeType === "follow") return { display: false, disabled: true };
  322. // 评测模式, 音频播放中 禁用
  323. if (state.modeType === "evaluating" || state.playState === "play") return { display: true, disabled: true };
  324. return {
  325. disabled: false,
  326. display: true,
  327. };
  328. });
  329. /** 节拍器按钮 */
  330. const metronomeBtn = computed(() => {
  331. // 选择模式 不显示
  332. //if (headTopData.modeType !== "show") return { display: false, disabled: true };
  333. // 音频播放中 禁用
  334. if (state.playState === "play") return { display: true, disabled: true };
  335. return {
  336. disabled: false,
  337. display: true,
  338. };
  339. });
  340. /** 指法按钮 */
  341. const fingeringBtn = computed(() => {
  342. // 后台设置不显示指法
  343. if (!state.isShowFingering) return { display: true, disabled: true };
  344. // 没有指法 选择模式 评测模式 跟练模式 不显示
  345. //if (headTopData.modeType !== "show" || !state.fingeringInfo.name || ["evaluating", "follow"].includes(state.modeType)) return { display: false, disabled: true };
  346. if (!state.fingeringInfo.name || ["evaluating", "follow"].includes(state.modeType)) return { display: false, disabled: true };
  347. // 音频播放中 禁用
  348. if (state.playState === "play") return { display: true, disabled: true };
  349. return {
  350. disabled: false,
  351. display: true,
  352. };
  353. });
  354. /** 摄像头按钮 */
  355. const cameraBtn = computed(() => {
  356. // 选择模式 不显示
  357. if (headTopData.modeType !== "show" || state.modeType !== "evaluating") return { display: false, disabled: true };
  358. // 音频播放中 禁用
  359. if (state.playState === "play") return { display: true, disabled: true };
  360. return {
  361. disabled: false,
  362. display: true,
  363. };
  364. });
  365. /** 选段按钮 */
  366. const selectBtn = computed(() => {
  367. // 选择模式 不显示
  368. //if (headTopData.modeType !== "show" || ["follow"].includes(state.modeType)) return { display: false, disabled: true };
  369. if (["follow"].includes(state.modeType)) return { display: false, disabled: true };
  370. // 音频播放中 禁用
  371. if (state.playState === "play" || state.isHomeWork) return { display: true, disabled: true };
  372. return {
  373. disabled: false,
  374. display: true,
  375. };
  376. });
  377. /** 原声按钮 */
  378. const originBtn = computed(() => {
  379. // 没有音源不显示
  380. if (state.noMusicSource) return { display: false, disabled: false };
  381. // 选择模式,跟练模式 不显示
  382. //if (headTopData.modeType !== "show" || state.modeType === "follow") return { display: false, disabled: false };
  383. if (state.modeType === "follow") return { display: false, disabled: false };
  384. // 评测开始 禁用
  385. if (state.modeType === "evaluating") return { display: false, disabled: true };
  386. if (!state.isAppPlay) {
  387. if (state.playType === "play") {
  388. // 原声, 伴奏 少一个,就不能切换
  389. if (state.music && state.accompany) return { display: true, disabled: false };
  390. } else {
  391. // 播放过程中不能切换
  392. if (state.playState === "play") {
  393. return { display: true, disabled: true };
  394. }
  395. // 范唱
  396. let index = 0;
  397. state.fanSong && index++;
  398. state.banSong && index++;
  399. state.mingSong && index++;
  400. if (index > 1) {
  401. return { display: true, disabled: false };
  402. }
  403. }
  404. }
  405. return {
  406. disabled: true,
  407. display: true,
  408. };
  409. });
  410. /** 播放类型按钮 */
  411. const playTypeBtn = computed(() => {
  412. // 选择模式,跟练模式,评测模式 不显示
  413. //if (headTopData.modeType !== "show" || state.modeType === "follow" || state.modeType === "evaluating" || state.isHomeWork) return { display: false, disabled: false };
  414. if (state.modeType === "follow" || state.modeType === "evaluating" || state.isHomeWork) return { display: false, disabled: false };
  415. if (!state.isAppPlay) {
  416. let index = 0;
  417. state.music && index++;
  418. state.accompany && index++;
  419. let songIndex = 0;
  420. state.fanSong && songIndex++;
  421. state.banSong && songIndex++;
  422. state.mingSong && songIndex++;
  423. // 演唱和演奏 都有数据的时间不禁用
  424. if (songIndex > 0 && index > 0) {
  425. // 音频播放中 禁用
  426. if (state.playState === "play") {
  427. return { display: true, disabled: true };
  428. }
  429. return { display: true, disabled: false };
  430. }
  431. }
  432. return {
  433. disabled: false,
  434. display: false,
  435. };
  436. });
  437. /** 模式切换按钮 */
  438. const toggleBtn = computed(() => {
  439. // 老师端,打击乐&节奏练习不显示
  440. if (state.isPercussion && state.platform === IPlatform.PC) return { display: false, disabled: false };
  441. if(state.isCombineRender) return { display: false, disabled: false };
  442. // 没有音源不显示
  443. if (state.noMusicSource) return { display: false, disabled: false };
  444. // 不是演奏模式 影藏
  445. if (state.playType !== "play") return { display: false, disabled: false };
  446. // 选择模式, url设置模式 不显示
  447. if (headTopData.modeType !== "show" || !headTopData.showBack) return { display: false, disabled: false };
  448. // 跟练开始, 评测开始 播放开始 隐藏
  449. if (state.playState == "play" || followData.start || evaluatingData.startBegin) return { display: true, disabled: true };
  450. // 课件播放,上课页面潜入云教练,不显示模式切换
  451. if (query.hideMode == 1) return { display: false, disabled: false };
  452. return {
  453. display: true,
  454. disabled: false,
  455. };
  456. });
  457. /** 播放按钮 */
  458. const playBtn = computed(() => {
  459. // 没有音源不显示
  460. if (state.noMusicSource) return { display: false, disabled: false };
  461. // 选择模式 不显示
  462. if (headTopData.modeType !== "show") return { display: false, disabled: false };
  463. // 评测模式 不显示,跟练模式 不显示
  464. if (["evaluating", "follow"].includes(state.modeType)) return { display: false, disabled: true };
  465. // midi音频未初始化完成不可点击
  466. if (state.isAppPlay && state.midiPlayIniting) return { display: true, disabled: true };
  467. return {
  468. display: true,
  469. disabled: false,
  470. };
  471. });
  472. /** 重播按钮 */
  473. resetBtn = computed(() => {
  474. // 没有音源不显示
  475. if (state.noMusicSource) return { display: false, disabled: false };
  476. // 选择模式 不显示
  477. if (headTopData.modeType !== "show") return { display: false, disabled: false };
  478. // 评测模式 不显示,跟练模式 不显示
  479. if (["evaluating", "follow"].includes(state.modeType)) return { display: false, disabled: true };
  480. // 播放状态 不显示
  481. if (state.playState === "play") return { display: false, disabled: true };
  482. // 播放进度为0 不显示
  483. const currentTime = getAudioCurrentTime();
  484. // midi音频未初始化完成不可点击
  485. if (state.isAppPlay && state.midiPlayIniting) return { display: false, disabled: true };
  486. if (!currentTime) return { display: false, disabled: true };
  487. return {
  488. display: true,
  489. disabled: false,
  490. };
  491. });
  492. /** 重置按钮 */
  493. const restoreBtn = computed(() => {
  494. // 播放中 禁用
  495. if (state.playState === "play" || evaluatingData.startBegin || followData.start || state.isHomeWork) return { display: true, disabled: true };
  496. return {
  497. disabled: false,
  498. display: true,
  499. };
  500. });
  501. const browInfo = browser();
  502. /** 返回 */
  503. const handleBack = () => {
  504. // 如果是乐教通,点击返回按钮,需要关闭当前窗口
  505. if (query["isYjt"] == "1") {
  506. window.parent.postMessage(
  507. {
  508. api: "api_YjtClose"
  509. },
  510. "*"
  511. );
  512. return
  513. }
  514. // 练习作业,完整练习才记录练习次数
  515. // HANDLE_WORK_ADD();
  516. // 不在APP中,
  517. if (!storeData.isApp) {
  518. window.parent.postMessage(
  519. {
  520. api: "back",
  521. },
  522. "*"
  523. );
  524. window.close();
  525. return;
  526. }
  527. if ((browInfo.iPhone || browInfo.ios) && state.isHomeWork) {
  528. setTimeout(() => {
  529. api_back();
  530. }, 550);
  531. return;
  532. }
  533. api_back();
  534. };
  535. /** 根据参数设置模式 */
  536. const getQueryModelSetModelType = () => {
  537. /** 作业模式 start, 如果为作业模式不处理,让作业模块处理 */
  538. if (state.isHomeWork) {
  539. return;
  540. }
  541. /** 作业模式 end */
  542. if (state.defaultModeType == 1) {
  543. headTopData.handleChangeModeType("practise");
  544. // if (state.platform === IPlatform.PC || state.isPreView) {
  545. // headTopData.showBack = false;
  546. // }
  547. if (state.isPreView) {
  548. headTopData.showBack = false;
  549. }
  550. } else {
  551. if (query.modelType) {
  552. if (query.modelType === "practise") {
  553. headTopData.handleChangeModeType("practise");
  554. } else if (query.modelType === "evaluating") {
  555. headTopData.handleChangeModeType("evaluating");
  556. }
  557. headTopData.showBack = false;
  558. } else {
  559. setTimeout(() => {
  560. headTopData.modeType = "init";
  561. }, 500);
  562. }
  563. }
  564. };
  565. /** 课件播放 */
  566. const changePlay = (res: any) => {
  567. // console.log('监听上课页面message',res)
  568. if (res?.data?.api === "setPlayState") {
  569. togglePlay("paused", true);
  570. }
  571. if(res?.data?.api === 'togglePlayState') {
  572. // if(state.playState === "play") {
  573. // togglePlay("paused");
  574. // }
  575. // if(state.playState === 'paused') {
  576. // togglePlay("play");
  577. // }
  578. console.log('togglePlayState', state.playState)
  579. togglePlay(state.playState === "play" ? "paused" : "play");
  580. }
  581. // 上课页面,按钮方向
  582. if (res?.data?.api === "imagePos") {
  583. if (res?.data.data) {
  584. state.playBtnDirection = res.data.data === "right" ? "right" : "left";
  585. // if (state.fingeringInfo.direction === "vertical" && state.setting.displayFingering) {
  586. // state.musicScoreBtnDirection = state.playBtnDirection === 'right' ? 'left' : 'right';
  587. // } else {
  588. // state.musicScoreBtnDirection = state.playBtnDirection;
  589. // }
  590. state.musicScoreBtnDirection = state.playBtnDirection;
  591. }
  592. }
  593. };
  594. const parentClassName = "settingBoxClass_drag";
  595. const userId = storeData.user?.id ? String(storeData.user?.id) : "";
  596. const positionInfo =
  597. state.platform !== IPlatform.PC
  598. ? {
  599. styleDrag: { value: null },
  600. }
  601. : useDrag([`${parentClassName} .top_draging`, `${parentClassName} .bom_drag`], parentClassName, toRef(headTopData, "settingMode"), userId);
  602. const speedClassName = "speedBoxClass_drag";
  603. const speedInfo =
  604. state.platform !== IPlatform.PC
  605. ? {
  606. styleDrag: { value: null },
  607. }
  608. : useDrag([`${speedClassName} .top_draging`, `${speedClassName} .bom_drag`], speedClassName, toRef(headData, "speedShow"), userId);
  609. onMounted(() => {
  610. getQueryModelSetModelType();
  611. window.addEventListener("message", changePlay);
  612. if (state.platform === IPlatform.PC) {
  613. showGuide.value = true;
  614. } else {
  615. showStudentGuide.value = true;
  616. }
  617. if (query.showWebGuide === "false") {
  618. showWebGuide.value = false;
  619. }
  620. document.addEventListener("keydown", (e: KeyboardEvent) => {
  621. if (e.code === "Tab") {
  622. e.stopPropagation();
  623. e.preventDefault();
  624. // onStartPlayState();
  625. togglePlay(state.playState === "play" ? "paused" : "play");
  626. }
  627. });
  628. });
  629. onUnmounted(() => {
  630. window.removeEventListener("message", changePlay);
  631. });
  632. const noticeBarWidth = ref<number>();
  633. watch(
  634. () => smoothAnimationState.isShow.value,
  635. () => {
  636. // NoticeBar能不能滚动
  637. if ((smoothAnimationState.isShow.value || state.isCombineRender) && isMusicList.value) {
  638. nextTick(() => {
  639. const widthCon = (document.querySelector("#noticeBarRollDom .van-notice-bar__content") as any)?.offsetWidth || undefined;
  640. noticeBarWidth.value = widthCon;
  641. });
  642. }
  643. },
  644. { immediate: true }
  645. );
  646. // 设置改变触发
  647. watch(state.setting, () => {
  648. console.log(state.setting, "state.setting");
  649. store.set("musicscoresetting", state.setting);
  650. });
  651. const isPad = navigator?.userAgent?.includes("UAWEIVRD-W09") || browInfo?.iPad || browInfo.isTablet;
  652. return () => (
  653. <>
  654. <div
  655. class={[styles.headerTop, state.platform === IPlatform.PC && state.musicScoreBtnDirection === "left" ? styles.headerTopRight : ""]}
  656. onClick={(e: Event) => {
  657. e.stopPropagation();
  658. if (state.platform === IPlatform.PC) {
  659. // 显示隐藏菜单
  660. window.parent.postMessage(
  661. {
  662. api: "onAttendToggleMenu",
  663. },
  664. "*"
  665. );
  666. }
  667. }}
  668. >
  669. {/* 返回和标题 */}
  670. {
  671. <div id="noticeBarRollDom" class={[styles.headTopLeftBox, (state.playState == "play" || followData.practiceStart || evaluatingData.startBegin) && styles.headTopLeftHide]}>
  672. {
  673. !query.isMove && !query.isHideBack && <img src={iconBack} class={["headTopBackBtn", styles.img, !headTopData.showBack && styles.hidenBack]} onClick={handleBack} />
  674. }
  675. {smoothAnimationState.isShow.value || state.isCombineRender ? (
  676. <div
  677. style={
  678. noticeBarWidth.value
  679. ? {
  680. "--noticeBarWidth": noticeBarWidth.value + "px",
  681. }
  682. : {}
  683. }
  684. class={[styles.title, state.isCbsView && styles.blackTitle, "headeTopTitleBtn", isPad && styles.isIpad]}
  685. onClick={() => {
  686. isMusicList.value && (musicListShow.value = true);
  687. }}
  688. >
  689. {isMusicList.value && <div class={[styles.symbolNote, "driver-8"]}></div>}
  690. <NoticeBar text={state.examSongName} background="none" />
  691. </div>
  692. ) : (
  693. isMusicList.value && (
  694. <img
  695. src={listImg}
  696. class={[styles.img, styles.listImg, "driver-8"]}
  697. onClick={() => {
  698. musicListShow.value = true;
  699. }}
  700. />
  701. )
  702. )}
  703. </div>
  704. }
  705. {/* 模式提醒 */}
  706. {/* {state.modeType === "practise" && (
  707. <div class={[styles.modeWarn, "practiseModeWarn", state.platform === IPlatform.PC && state.musicScoreBtnDirection === "left" ? styles.modeWarnRight : ""]}>
  708. <img src={state.playType === "play" ? headImg("perform1.png") : headImg("sing1.png")} />
  709. <div>{state.playType === "play" ? "演奏场景" : "演唱场景"}</div>
  710. </div>
  711. )} */}
  712. {/* 功能按钮 */}
  713. <div
  714. class={[styles.headRight]}
  715. onClick={(e: Event) => {
  716. e.stopPropagation();
  717. }}
  718. >
  719. {/* 模式切换 */}
  720. {
  721. <div
  722. id={state.platform === IPlatform.PC ? "teacherTop-0" : "studnetT-0"}
  723. style={{ display: toggleBtn.value.display ? "" : "none"}}
  724. class={["driver-9", styles.modeChangeBox, toggleBtn.value.disabled && styles.disabled, styles.modeType]}
  725. onClick={() => {
  726. headTopData.oldModeType = state.modeType;
  727. handleRessetState();
  728. headTopData.modeType = "init";
  729. }}
  730. >
  731. <img class={styles.img} src={iconMode} />
  732. <div class={styles.title}>{state.modeType === "practise" ? "练习模式" : state.modeType === "follow" ? "跟练模式" : state.modeType === "evaluating" ? "评测模式" : ""}</div>
  733. </div>
  734. }
  735. {/* 一行谱模式,暂不支持节拍指针 */}
  736. {/* {(
  737. <div
  738. class={[styles.btn, state.platform === IPlatform.PC ? styles.pcBtn : ""]}
  739. onClick={() => {
  740. // 切换光标模式
  741. let mode = metronomeData.cursorMode;
  742. if (["follow"].includes(state.modeType)) {
  743. mode = metronomeData.cursorMode === 1 ? 3 : 1;
  744. } else {
  745. mode = metronomeData.cursorMode === 1 ? 3 : metronomeData.cursorMode === 2 ? 1 : 2;
  746. }
  747. metronomeData.cursorMode = mode;
  748. }}
  749. >
  750. <img class={styles.iconBtn} src={headImg(metronomeData.cursorMode === 1 ? "cursor_icon1.png" : metronomeData.cursorMode === 2 ? "cursor_icon2.png" : metronomeData.cursorMode === 3 ? "cursor_icon3.png" : "")} />
  751. <span class={styles.iconContent}>
  752. {metronomeData.cursorMode === 1 ? "音符指针" : metronomeData.cursorMode === 2 ? "节拍指针" : metronomeData.cursorMode === 3 ? "关闭指针" : ""}
  753. {metronomeData.cursorTips && (
  754. <div class={[styles["botton-tips"], metronomeData.cursorMode === 3 ? styles.tipSpec : ""]}>{metronomeData.cursorTips}</div>
  755. )}
  756. </span>
  757. </div>
  758. )} */}
  759. <div
  760. style={{ display: playTypeBtn.value.display ? "" : "none" }}
  761. class={["driver-2", styles.btn, playTypeBtn.value.disabled && styles.disabled, styles.playType]}
  762. onClick={() => {
  763. const oldPlayType = state.playType;
  764. headTopData.oldPlayType = oldPlayType;
  765. const oldPlaySource = state.playSource;
  766. if (state.playType === "play") {
  767. state.playType = "sing";
  768. state.playSource = state.fanSong ? "music" : state.banSong ? "background" : "mingSong";
  769. } else {
  770. state.playType = "play";
  771. state.playSource = state.music ? "music" : "background";
  772. }
  773. isClickMode = true;
  774. // 有指法并且显示指法的时候 切换到演唱模式 需要影藏指法
  775. let isRefresh = false;
  776. if (state.isShowFingering && state.fingeringInfo.name && (state.setting.displayFingering || displayFingeringCache)) {
  777. if (state.playType === "sing") {
  778. state.setting.displayFingering = false;
  779. displayFingeringCache = true;
  780. } else {
  781. state.setting.displayFingering = displayFingeringCache;
  782. displayFingeringCache = false;
  783. }
  784. // 如果是竖屏指法和一行谱的时候 改变指法值的时候state 会调用刷新 refreshMusicSvg 所以下面不调用
  785. if (state.fingeringInfo.direction === "vertical" && !state.isSingleLine) {
  786. isRefresh = true;
  787. }
  788. }
  789. // 有歌词的时候,切换播放模式,需要重新渲染谱面 指法不刷新谱面的时候
  790. if (state.xmlHasLyric && !isRefresh) {
  791. refreshMusicSvg();
  792. } else if (!isRefresh) {
  793. handlerModeChange(oldPlayType, oldPlaySource, true);
  794. }
  795. }}
  796. >
  797. <img style={{ display: state.playType === "play" ? "" : "none" }} class={styles.iconBtn} src={headImg(`perform.png`)} />
  798. <img style={{ display: state.playType === "play" ? "none" : "" }} class={styles.iconBtn} src={headImg(`sing.png`)} />
  799. <span>{state.playType === "play" ? "演奏" : "演唱"}</span>
  800. </div>
  801. <div
  802. id={state.platform === IPlatform.PC ? "teacherTop-1" : "studnetT-1"}
  803. style={{ display: originBtn.value.display ? "" : "none" }}
  804. class={["driver-3", styles.btn, originBtn.value.disabled && styles.disabled, state.playType === "play" ? styles.playSource : styles.songSource]}
  805. onClick={() => {
  806. const oldPlayType = state.playType;
  807. const oldPlaySource = state.playSource;
  808. if (state.playType === "play") {
  809. state.playSource = state.playSource === "music" ? "background" : "music";
  810. } else {
  811. if (state.playSource === "music") {
  812. state.playSource = state.banSong ? "background" : "mingSong";
  813. } else if (state.playSource === "background") {
  814. state.playSource = state.mingSong ? "mingSong" : "music";
  815. } else {
  816. state.playSource = state.fanSong ? "music" : "background";
  817. }
  818. }
  819. handlerModeChange(oldPlayType, oldPlaySource);
  820. showToast({
  821. message: state.playType === "play" ? (state.playSource === "music" ? "已切换为原声" : "已切换为伴奏") : state.playSource === "music" ? "已切换为范唱" : state.playSource === "background" ? "已切换为伴唱" : "已切换为唱名",
  822. position: "top",
  823. className: "selectionToast",
  824. });
  825. }}
  826. >
  827. <img style={{ display: state.playSource === "music" ? "" : "none" }} class={styles.iconBtn} src={state.playType === "play" ? headImg(`music.png`) : headImg(`music1.png`)} />
  828. <img style={{ display: state.playSource === "background" ? "" : "none" }} class={styles.iconBtn} src={state.playType === "play" ? headImg(`background.png`) : headImg(`background1.png`)} />
  829. <img style={{ display: state.playSource === "mingSong" ? "" : "none" }} class={styles.iconBtn} src={headImg(`mingsong.png`)} />
  830. <span>{state.playSource === "music" ? (state.playType === "play" ? "原声" : "范唱") : state.playSource === "background" ? (state.playType === "play" ? "伴奏" : "伴唱") : "唱名"}</span>
  831. </div>
  832. <div
  833. id={state.platform === IPlatform.PC ? "teacherTop-2" : "studnetT-2"}
  834. style={{ display: selectBtn.value.display ? "" : "none" }}
  835. class={["driver-4", styles.btn, selectBtn.value.disabled && styles.disabled, styles.section, state.sectionStatus && styles.isSection]}
  836. onClick={() => handleChangeSection()}
  837. >
  838. <img style={{ display: state.section.length === 0 ? "" : "none" }} class={styles.iconBtn} src={headImg(`section0.png`)} />
  839. <img style={{ display: state.section.length === 1 ? "" : "none" }} class={styles.iconBtn} src={headImg(`section1.png`)} />
  840. <img style={{ display: state.section.length === 2 ? "" : "none" }} class={styles.iconBtn} src={headImg(`section2.png`)} />
  841. <span>选段</span>
  842. </div>
  843. {
  844. <>
  845. <div
  846. style={{ display: metronomeBtn.value.display ? "" : "none" }}
  847. class={["driver-5", styles.btn, styles.metronomeBtn, metronomeBtn.value.disabled && styles.disabled, headData.speedShow && styles.isSpeed, styles.speed]}
  848. onClick={async () => {
  849. headData.speedShow = !headData.speedShow;
  850. }}
  851. >
  852. <img style={{ display: metronomeData.disable ? "block" : "none" }} class={styles.iconBtn} src={headImg("tickon.png")} />
  853. <img style={{ display: !metronomeData.disable ? "block" : "none" }} class={styles.iconBtn} src={headImg("tickoff.png")} />
  854. <span style={{ whiteSpace: "nowrap" }}>节拍</span>
  855. <div class={styles.speedCon}>
  856. <img src={headImg(`${state.speedIcon}.png`)} />
  857. <div>{Math.floor(state.speed)}</div>
  858. </div>
  859. </div>
  860. {
  861. <Popup v-model:show={headData.speedShow} class="popup-custom van-scale center-closeBtn speedBoxClass_drag" transition="van-scale" teleport="body" style={speedInfo.styleDrag.value} overlay-style={{ background: "rgba(0, 0, 0, 0.7)" }}>
  862. <Speed />
  863. {state.platform === IPlatform.PC && <Dragbom showGuide={!state.guideInfo?.teacherDrag} onGuideDone={handleGuide} />}
  864. </Popup>
  865. }
  866. </>
  867. }
  868. {/* {state.enableNotation ? (
  869. <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]}>
  870. {{
  871. reference: () => (
  872. <div
  873. id={state.platform === IPlatform.PC ? "teacherTop-5" : "studnetT-5"}
  874. style={{ display: converBtn.value.display ? "" : "none" }}
  875. class={[styles.btn, converBtn.value.disabled && styles.disabled]}
  876. onClick={(e: Event) => {
  877. e.stopPropagation();
  878. headData.musicTypeShow = !headData.musicTypeShow;
  879. }}
  880. >
  881. <img class={styles.iconBtn} src={headImg("icon_zhuanpu.svg")} />
  882. <span>{state.musicRenderType === "staff" ? "转简谱" : "转五线谱"}</span>
  883. </div>
  884. ),
  885. default: () => <MusicType />,
  886. }}
  887. </Popover>
  888. ) : null} */}
  889. {state.musicRendered && !query.lessonTrainingId && !query.questionId && state.isConcert && (
  890. <div
  891. class={[styles.btn, state.playState === "play" && fingeringBtn.value.disabled && styles.disabled, toggleMusicSheet.show && styles.isMusicSheet, styles.musicSheet, "driver-10"]}
  892. onClick={() => {
  893. toggleMusicSheet.toggle(true);
  894. }}
  895. >
  896. <img class={styles.iconBtn} src={headImg(`shenggui.png`)} />
  897. <span>声部</span>
  898. </div>
  899. )}
  900. {
  901. <div
  902. class={[styles.btn, restoreBtn.value.disabled && styles.disabled, styles.cxSetBtn, "driver-5-1"]}
  903. onClick={() => resetSettings()}
  904. >
  905. <img class={styles.iconBtn} src={headImg("reset.png")} />
  906. <span>重置</span>
  907. </div>
  908. }
  909. <div
  910. id={state.platform === IPlatform.PC ? "teacherTop-6" : "studnetT-6"}
  911. style={{ display: settingBtn.value.display ? "" : "none" }}
  912. class={["driver-6", styles.btn, settingBtn.value.disabled && styles.disabled, headTopData.settingMode && styles.isSettingMode, styles.settingMode]}
  913. onClick={() => (headTopData.settingMode = true)}
  914. >
  915. <img class={styles.iconBtn} src={headImg("icon_menu.png")} />
  916. <span>设置</span>
  917. </div>
  918. </div>
  919. </div>
  920. {/** 指法点击区域 */}
  921. {
  922. state.fingeringInfo.direction === "transverse" && state.setting.displayFingering ?
  923. <div class={styles.headerMid} onClick={() => {
  924. fingerRef.value?.doubeClick()
  925. }}></div> : null
  926. }
  927. {/* 播放按钮 */}
  928. <div
  929. id="studnetT-7"
  930. style={{ display: playBtn.value.display ? "" : "none" }}
  931. class={[
  932. // 引导使用的类
  933. "driver-1",
  934. styles.playBtn,
  935. playBtn.value.disabled && styles.disabled,
  936. state.platform === IPlatform.PC && state.musicScoreBtnDirection === "left" ? styles.playLeftButton : state.platform === IPlatform.PC && state.musicScoreBtnDirection === "right" ? styles.playRightButton : "",
  937. ]}
  938. onClick={() => {
  939. // C调能播放唱名,非C调时,只有谱面类型是首调时,才能播放唱名
  940. if (!state.isCTone && state.playSource === 'mingSong') {
  941. const notPlayDesc = state.musicRenderType === EnumMusicRenderType.staff ? '该曲目的五线谱目前还不支持播放唱名' : state.musicRenderType === EnumMusicRenderType.fixedTone ? '该曲目的固定调目前还不支持播放唱名' : '';
  942. if (notPlayDesc) {
  943. showToast({
  944. message: notPlayDesc,
  945. position: "top",
  946. className: "selectionToast",
  947. });
  948. return
  949. }
  950. }
  951. togglePlay(state.playState === "play" ? "paused" : "play")
  952. }}
  953. >
  954. <div class={styles.btnWrap}>
  955. <img style={{ display: state.playState === "play" ? "none" : "" }} class={styles.iconBtn} src={headImg("icon_play.png")} />
  956. <img style={{ display: state.playState === "play" ? "" : "none" }} class={styles.iconBtn} src={headImg("icon_pause.png")} />
  957. <Circle style={{ opacity: state.playState === "play" ? 1 : 0 }} class={styles.progress} stroke-width={60} stroke-linecap={"square"} currentRate={state.playProgress} rate={100} color="#FFED78" layer-color="rgba(255,255,255,0.5)" />
  958. </div>
  959. </div>
  960. {/* 重播按钮 */}
  961. <div
  962. id="tips-step-9"
  963. style={{ display: resetBtn.value.display ? "" : "none" }}
  964. class={[styles.resetBtn, resetBtn.value.disabled && styles.disabled, state.platform === IPlatform.PC && state.musicScoreBtnDirection === "left" ? styles.pauseLeftButton : state.platform === IPlatform.PC && state.musicScoreBtnDirection === "right" ? styles.pauseRightButton : ""]}
  965. onClick={() => handleResetPlay()}
  966. >
  967. <img class={styles.iconBtn} src={headImg("icon_reset.png")} />
  968. </div>
  969. <Popup v-model:show={headTopData.settingMode} class="popup-custom van-scale center-closeBtn settingBoxClass_drag" transition="van-scale" teleport="body" style={positionInfo.styleDrag.value} overlay-style={{ background: "rgba(0, 0, 0, 0.7)" }}>
  970. <Settting />
  971. {state.platform === IPlatform.PC && <Dragbom showGuide={!state.guideInfo?.teacherDrag} onGuideDone={handleGuide} />}
  972. </Popup>
  973. {/* 模式切换 */}
  974. {/* <ModeTypeMode /> */}
  975. <ModeView></ModeView>
  976. {/* isAllBtns */}
  977. {/* {isAllBtns.value && !query.isCbs && showGuideIndex.value && <TeacherTop></TeacherTop>}
  978. {isAllBtnsStudent.value && !query.isCbs && showGuideIndex.value && <StudentTop></StudentTop>} */}
  979. {/* 练习模式功能引导 加载音频完成 不是会员 */}
  980. {state.modeType === "practise" && headTopData.modeType !== "init" && !query.isCbs && state.audioDone && !state.isLoading && showWebGuide.value && (
  981. <PractiseDriver
  982. statusAll={{
  983. playBtnStatus: playBtn.value.display,
  984. subjectStatus: state.musicRendered && !query.lessonTrainingId && !query.questionId && state.isConcert,
  985. modelTypeStatus: toggleBtn.value.display,
  986. playType: playTypeBtn.value.display,
  987. originPlayType: state.playType === "play" ? true : false,
  988. originBtnStatus: originBtn.value.display,
  989. backTitle: !(state.playState == "play" || followData.start || evaluatingData.startBegin) && isMusicList.value,
  990. titleType: smoothAnimationState.isShow.value ? "TEXT" : isMusicList.value ? "IMG" : "NONE",
  991. showSwitchList: isMusicList.value && !state.isHomeWork && !query.isHideMusicList,
  992. }}
  993. />
  994. )}
  995. {/* 跟练模式功能引导 加载音频完成 不是会员 */}
  996. {state.modeType === "follow" && headTopData.modeType !== "init" && !query.isCbs && state.audioDone && !state.isLoading && showWebGuide.value && (
  997. <FollowDriver
  998. statusAll={{
  999. subjectStatus: state.musicRendered && !query.lessonTrainingId && !query.questionId && state.isConcert,
  1000. }}
  1001. />
  1002. )}
  1003. {/* 评测模式功能引导 加载音频完成 不是会员 */}
  1004. {state.modeType === "evaluating" && headTopData.modeType !== "init" && !evaluatingData.earphoneMode && !query.isCbs && state.audioDone && !state.isLoading && evaluatingData.websocketState && !evaluatingData.startBegin && evaluatingData.checkEnd && showWebGuide.value && (
  1005. <EvaluatingDriver
  1006. statusAll={{
  1007. subjectStatus: state.musicRendered && !query.lessonTrainingId && !query.questionId && state.isConcert,
  1008. }}
  1009. />
  1010. )}
  1011. </>
  1012. );
  1013. },
  1014. });